UDPPacketMerger.h
Go to the documentation of this file.
1 // this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
2 
3 // -- BEGIN LICENSE BLOCK ----------------------------------------------
4 
24 // -- END LICENSE BLOCK ------------------------------------------------
25 
26 //----------------------------------------------------------------------
33 //----------------------------------------------------------------------
34 
35 #ifndef SICK_SAFETYSCANNERS_DATA_PROCESSING_UDPPACKETMERGER_H
36 #define SICK_SAFETYSCANNERS_DATA_PROCESSING_UDPPACKETMERGER_H
37 
40 
42 
43 #include <algorithm>
44 
45 namespace sick {
46 namespace data_processing {
47 
52 {
53 public:
58 
64  bool isComplete() const;
65 
74 
81 
82 private:
85 
86  std::map<uint32_t, sick::datastructure::ParsedPacketBuffer::ParsedPacketBufferVector>
88 
99 };
100 
101 } // namespace data_processing
102 } // namespace sick
103 
104 #endif // SICK_SAFETYSCANNERS_DATA_PROCESSING_UDPPACKETMERGER_H
bool deployPacketIfComplete(datastructure::DatagramHeader &header)
sick::datastructure::PacketBuffer getDeployedPacketBuffer()
Get the latest complete data packet.
A packetbuffer for the raw data from the sensor.
Definition: PacketBuffer.h:61
bool addToMap(const sick::datastructure::PacketBuffer &buffer, const sick::datastructure::DatagramHeader &header)
bool checkIfComplete(sick::datastructure::DatagramHeader &header)
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.
sick::datastructure::PacketBuffer::VectorBuffer removeHeaderFromParsedPacketBuffer(const sick::datastructure::ParsedPacketBuffer::ParsedPacketBufferVector &vec)
std::map< uint32_t, sick::datastructure::ParsedPacketBuffer::ParsedPacketBufferVector > m_parsed_packet_buffer_map
Merges udp packets together to a complete data packet.
uint32_t calcualteCurrentLengthOfParsedPacketBuffer(const sick::datastructure::ParsedPacketBuffer::ParsedPacketBufferVector &vec)
UDPPacketMerger()
Constructor of udp packet merger.
sick::datastructure::ParsedPacketBuffer::ParsedPacketBufferVector getSortedParsedPacketBufferForIdentification(const sick::datastructure::DatagramHeader &header)
std::vector< ParsedPacketBuffer > ParsedPacketBufferVector
sick::datastructure::PacketBuffer m_deployed_packet_buffer
Contains the contents of a udp datagram header. Used to match the datagrams together to form a comple...
std::vector< uint8_t > VectorBuffer
Typedef for a vector buffer, to sort the incoming packets.
Definition: PacketBuffer.h:71


sick_safetyscanners
Author(s): Lennart Puck
autogenerated on Thu May 9 2019 02:41:08