Public Member Functions | Private Member Functions | Private Attributes
sick::data_processing::TCPPacketMerger Class Reference

Merges incoming tcp packets together to get a complete data packet. More...

#include <TCPPacketMerger.h>

List of all members.

Public Member Functions

bool addTCPPacket (const sick::datastructure::PacketBuffer &buffer)
 Adds a new tcp packet to the merger. Returns true if this tcp packet completes a data packet.
sick::datastructure::PacketBuffer getDeployedPacketBuffer ()
 Gets the latest complete data packet.
uint32_t getTargetSize () const
 Returns the expected target size of a complete data packet.
bool isComplete () const
 Check if the packet is complete.
bool isEmpty () const
 Checks if the buffer vector is empty.
void setTargetSize (const uint32_t &targetSize)
 Sets the target size of a data packet.
 TCPPacketMerger ()
 Constructor of merger.

Private Member Functions

bool addToMap (const sick::datastructure::PacketBuffer &newPacket)
bool deployPacket ()
bool deployPacketIfComplete ()
uint32_t getCurrentSize () const

Private Attributes

std::vector
< sick::datastructure::PacketBuffer
m_buffer_vector
sick::datastructure::PacketBuffer m_deployed_packet_buffer
bool m_is_complete
uint32_t m_targetSize

Detailed Description

Merges incoming tcp packets together to get a complete data packet.

Definition at line 50 of file TCPPacketMerger.h.


Constructor & Destructor Documentation

Constructor of merger.

Definition at line 40 of file TCPPacketMerger.cpp.


Member Function Documentation

Adds a new tcp packet to the merger. Returns true if this tcp packet completes a data packet.

Parameters:
bufferThe new tcp packet.
Returns:
True if the data packet is complete with the new packet.

Definition at line 63 of file TCPPacketMerger.cpp.

Definition at line 75 of file TCPPacketMerger.cpp.

Definition at line 98 of file TCPPacketMerger.cpp.

Definition at line 88 of file TCPPacketMerger.cpp.

Definition at line 124 of file TCPPacketMerger.cpp.

Gets the latest complete data packet.

Returns:
The latest complete data packet.

Definition at line 57 of file TCPPacketMerger.cpp.

Returns the expected target size of a complete data packet.

Returns:
The target size of a complete data packet.

Definition at line 114 of file TCPPacketMerger.cpp.

Check if the packet is complete.

Returns:
True if the packet is complete.

Definition at line 47 of file TCPPacketMerger.cpp.

Checks if the buffer vector is empty.

Returns:
True if the buffer vector is empty.

Definition at line 52 of file TCPPacketMerger.cpp.

void sick::data_processing::TCPPacketMerger::setTargetSize ( const uint32_t &  targetSize)

Sets the target size of a data packet.

Parameters:
targetSizeThe new target size of a data packet.

Definition at line 119 of file TCPPacketMerger.cpp.


Member Data Documentation

Definition at line 107 of file TCPPacketMerger.h.

Definition at line 105 of file TCPPacketMerger.h.

Definition at line 104 of file TCPPacketMerger.h.

Definition at line 108 of file TCPPacketMerger.h.


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


sick_safetyscanners
Author(s): Lennart Puck
autogenerated on Tue May 7 2019 03:27:37