Public Member Functions | Private Member Functions | Private Attributes | List of all members
sick::data_processing::UDPPacketMerger Class Reference

Merges udp packets together to a complete data packet. More...

#include <UDPPacketMerger.h>

Public Member Functions

bool addUDPPacket (const sick::datastructure::PacketBuffer &buffer)
 Adds a udp packet to the packet map, when a data packet is complete it will return true. More...
 
sick::datastructure::PacketBuffer getDeployedPacketBuffer ()
 Get the latest complete data packet. More...
 
bool isComplete () const
 Returns if a data packet is complete. More...
 
 UDPPacketMerger ()
 Constructor of udp packet merger. More...
 

Private Member Functions

bool addToMap (const sick::datastructure::PacketBuffer &buffer, const sick::datastructure::DatagramHeader &header)
 
uint32_t calcualteCurrentLengthOfParsedPacketBuffer (const sick::datastructure::ParsedPacketBuffer::ParsedPacketBufferVector &vec)
 
bool checkIfComplete (sick::datastructure::DatagramHeader &header)
 
bool deployPacketIfComplete (datastructure::DatagramHeader &header)
 
sick::datastructure::ParsedPacketBuffer::ParsedPacketBufferVector getSortedParsedPacketBufferForIdentification (const sick::datastructure::DatagramHeader &header)
 
std::vector< uint8_t > removeHeaderFromParsedPacketBuffer (const sick::datastructure::ParsedPacketBuffer::ParsedPacketBufferVector &vec)
 

Private Attributes

std::mutex m_buffer_mutex
 
sick::datastructure::PacketBuffer m_deployed_packet_buffer
 
bool m_is_complete
 
std::map< uint32_t, sick::datastructure::ParsedPacketBuffer::ParsedPacketBufferVectorm_parsed_packet_buffer_map
 

Detailed Description

Merges udp packets together to a complete data packet.

Definition at line 52 of file UDPPacketMerger.h.

Constructor & Destructor Documentation

sick::data_processing::UDPPacketMerger::UDPPacketMerger ( )

Constructor of udp packet merger.

Definition at line 40 of file UDPPacketMerger.cpp.

Member Function Documentation

bool sick::data_processing::UDPPacketMerger::addToMap ( const sick::datastructure::PacketBuffer buffer,
const sick::datastructure::DatagramHeader header 
)
private

Definition at line 75 of file UDPPacketMerger.cpp.

bool sick::data_processing::UDPPacketMerger::addUDPPacket ( const sick::datastructure::PacketBuffer buffer)

Adds a udp packet to the packet map, when a data packet is complete it will return true.

Parameters
bufferThe new udp packet.
Returns
True if a data packet is complete.

Definition at line 57 of file UDPPacketMerger.cpp.

uint32_t sick::data_processing::UDPPacketMerger::calcualteCurrentLengthOfParsedPacketBuffer ( const sick::datastructure::ParsedPacketBuffer::ParsedPacketBufferVector vec)
private

Definition at line 128 of file UDPPacketMerger.cpp.

bool sick::data_processing::UDPPacketMerger::checkIfComplete ( sick::datastructure::DatagramHeader header)
private

Definition at line 114 of file UDPPacketMerger.cpp.

bool sick::data_processing::UDPPacketMerger::deployPacketIfComplete ( datastructure::DatagramHeader header)
private

Definition at line 93 of file UDPPacketMerger.cpp.

sick::datastructure::PacketBuffer sick::data_processing::UDPPacketMerger::getDeployedPacketBuffer ( )

Get the latest complete data packet.

Returns
The latest complete data packet.

Definition at line 51 of file UDPPacketMerger.cpp.

sick::datastructure::ParsedPacketBuffer::ParsedPacketBufferVector sick::data_processing::UDPPacketMerger::getSortedParsedPacketBufferForIdentification ( const sick::datastructure::DatagramHeader header)
private

Definition at line 142 of file UDPPacketMerger.cpp.

bool sick::data_processing::UDPPacketMerger::isComplete ( ) const

Returns if a data packet is complete.

Returns
If a data packet is complete.

Definition at line 46 of file UDPPacketMerger.cpp.

std::vector< uint8_t > sick::data_processing::UDPPacketMerger::removeHeaderFromParsedPacketBuffer ( const sick::datastructure::ParsedPacketBuffer::ParsedPacketBufferVector vec)
private

Definition at line 152 of file UDPPacketMerger.cpp.

Member Data Documentation

std::mutex sick::data_processing::UDPPacketMerger::m_buffer_mutex
private

Definition at line 89 of file UDPPacketMerger.h.

sick::datastructure::PacketBuffer sick::data_processing::UDPPacketMerger::m_deployed_packet_buffer
private

Definition at line 85 of file UDPPacketMerger.h.

bool sick::data_processing::UDPPacketMerger::m_is_complete
private

Definition at line 84 of file UDPPacketMerger.h.

std::map<uint32_t, sick::datastructure::ParsedPacketBuffer::ParsedPacketBufferVector> sick::data_processing::UDPPacketMerger::m_parsed_packet_buffer_map
private

Definition at line 88 of file UDPPacketMerger.h.


The documentation for this class was generated from the following files:


sick_safetyscanners
Author(s): Lennart Puck
autogenerated on Fri Apr 2 2021 02:45:42