Merges incoming tcp packets together to get a complete data packet.
More...
#include <TCPPacketMerger.h>
Merges incoming tcp packets together to get a complete data packet.
Definition at line 51 of file TCPPacketMerger.h.
sick::data_processing::TCPPacketMerger::TCPPacketMerger |
( |
| ) |
|
Adds a new tcp packet to the merger. Returns true if this tcp packet completes a data packet.
- Parameters
-
buffer | The new tcp packet. |
- Returns
- True if the data packet is complete with the new packet.
Definition at line 62 of file TCPPacketMerger.cpp.
bool sick::data_processing::TCPPacketMerger::deployPacket |
( |
| ) |
|
|
private |
bool sick::data_processing::TCPPacketMerger::deployPacketIfComplete |
( |
| ) |
|
|
private |
uint32_t sick::data_processing::TCPPacketMerger::getCurrentSize |
( |
| ) |
|
|
private |
Gets the latest complete data packet.
- Returns
- The latest complete data packet.
Definition at line 56 of file TCPPacketMerger.cpp.
uint32_t sick::data_processing::TCPPacketMerger::getTargetSize |
( |
| ) |
const |
Returns the expected target size of a complete data packet.
- Returns
- The target size of a complete data packet.
Definition at line 115 of file TCPPacketMerger.cpp.
bool sick::data_processing::TCPPacketMerger::isComplete |
( |
| ) |
const |
Check if the packet is complete.
- Returns
- True if the packet is complete.
Definition at line 46 of file TCPPacketMerger.cpp.
bool sick::data_processing::TCPPacketMerger::isEmpty |
( |
| ) |
const |
Checks if the buffer vector is empty.
- Returns
- True if the buffer vector is empty.
Definition at line 51 of file TCPPacketMerger.cpp.
void sick::data_processing::TCPPacketMerger::setTargetSize |
( |
const uint32_t & |
targetSize | ) |
|
Sets the target size of a data packet.
- Parameters
-
targetSize | The new target size of a data packet. |
Definition at line 120 of file TCPPacketMerger.cpp.
std::mutex sick::data_processing::TCPPacketMerger::m_buffer_mutex |
|
private |
bool sick::data_processing::TCPPacketMerger::m_is_complete |
|
private |
uint32_t sick::data_processing::TCPPacketMerger::m_targetSize |
|
private |
The documentation for this class was generated from the following files: