38 namespace data_processing {
41 : m_is_complete(false)
42 , m_deployed_packet_buffer()
80 it->second.push_back(parsed_packet_buffer);
85 vec.push_back(parsed_packet_buffer);
116 if (cur_length != total_length)
127 uint32_t cur_length = 0;
129 for (
auto& parsed_packet_buffer : vec)
152 for (
auto& parsed_packet_buffer : vec)
156 headerless_packet_buffer.insert(headerless_packet_buffer.end(),
161 return headerless_packet_buffer;
bool deployPacketIfComplete(datastructure::DatagramHeader &header)
sick::datastructure::PacketBuffer getDeployedPacketBuffer()
Get the latest complete data packet.
Struct of a PacketBuffer with a parsed header.
A packetbuffer for the raw data from the sensor.
bool addToMap(const sick::datastructure::PacketBuffer &buffer, const sick::datastructure::DatagramHeader &header)
bool checkIfComplete(sick::datastructure::DatagramHeader &header)
void setBuffer(const VectorBuffer &buffer)
Setter for the PacketBuffer.
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...
bool isComplete() const
Returns if a data packet is complete.
const VectorBuffer & getBuffer() const
Getter to return the VectorBuffer saved in the PacketBuffer.
sick::datastructure::PacketBuffer::VectorBuffer removeHeaderFromParsedPacketBuffer(const sick::datastructure::ParsedPacketBuffer::ParsedPacketBufferVector &vec)
std::map< uint32_t, sick::datastructure::ParsedPacketBuffer::ParsedPacketBufferVector > m_parsed_packet_buffer_map
uint32_t calcualteCurrentLengthOfParsedPacketBuffer(const sick::datastructure::ParsedPacketBuffer::ParsedPacketBufferVector &vec)
UDPPacketMerger()
Constructor of udp packet merger.
static bool sortForIncreasingOffset(const ParsedPacketBuffer &ppb1, const ParsedPacketBuffer &ppb2)
Static function to sort ParsedPacketBuffers.
size_t getLength() const
Returns length of the current PacketBuffer.
sick::datastructure::ParsedPacketBuffer::ParsedPacketBufferVector getSortedParsedPacketBufferForIdentification(const sick::datastructure::DatagramHeader &header)
std::vector< ParsedPacketBuffer > ParsedPacketBufferVector
sick::datastructure::PacketBuffer m_deployed_packet_buffer
std::vector< uint8_t > VectorBuffer
Typedef for a vector buffer, to sort the incoming packets.