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::ParsedPacketBufferVector > | m_parsed_packet_buffer_map |
Merges udp packets together to a complete data packet.
Definition at line 52 of file UDPPacketMerger.h.
sick::data_processing::UDPPacketMerger::UDPPacketMerger | ( | ) |
Constructor of udp packet merger.
Definition at line 40 of file UDPPacketMerger.cpp.
|
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.
buffer | The new udp packet. |
Definition at line 57 of file UDPPacketMerger.cpp.
|
private |
Definition at line 128 of file UDPPacketMerger.cpp.
|
private |
Definition at line 114 of file UDPPacketMerger.cpp.
|
private |
Definition at line 93 of file UDPPacketMerger.cpp.
sick::datastructure::PacketBuffer sick::data_processing::UDPPacketMerger::getDeployedPacketBuffer | ( | ) |
Get the latest complete data packet.
Definition at line 51 of file UDPPacketMerger.cpp.
|
private |
Definition at line 142 of file UDPPacketMerger.cpp.
bool sick::data_processing::UDPPacketMerger::isComplete | ( | ) | const |
Returns if a data packet is complete.
Definition at line 46 of file UDPPacketMerger.cpp.
|
private |
Definition at line 152 of file UDPPacketMerger.cpp.
|
private |
Definition at line 89 of file UDPPacketMerger.h.
|
private |
Definition at line 85 of file UDPPacketMerger.h.
|
private |
Definition at line 84 of file UDPPacketMerger.h.
|
private |
Definition at line 88 of file UDPPacketMerger.h.