Public Member Functions | Private Member Functions | List of all members
sick::data_processing::ParseTCPPacket Class Reference

Parser for an incoming TCP packet. More...

#include <ParseTCPPacket.h>

Public Member Functions

uint32_t getExpectedPacketLength (const datastructure::PacketBuffer &buffer)
 Gets the expected packet length for a buffer. More...
 
uint16_t getRequestID (const datastructure::PacketBuffer &buffer) const
 Gets the request ID of the incoming tcp packet. More...
 
 ParseTCPPacket ()
 Constructor of parser. More...
 
bool parseTCPSequence (const datastructure::PacketBuffer &buffer, sick::cola2::Command &command) const
 Parse the tcp sequence to get the header information of the cola2 protocol. More...
 

Private Member Functions

uint8_t readCommandMode (std::vector< uint8_t >::const_iterator data_ptr) const
 
uint8_t readCommandType (std::vector< uint8_t >::const_iterator data_ptr) const
 
std::vector< uint8_t > readData (const datastructure::PacketBuffer &buffer) const
 
uint16_t readErrorCode (std::vector< uint8_t >::const_iterator data_ptr) const
 
uint8_t readHubCntr (std::vector< uint8_t >::const_iterator data_ptr) const
 
uint32_t readLength (std::vector< uint8_t >::const_iterator data_ptr) const
 
uint8_t readNoC (std::vector< uint8_t >::const_iterator data_ptr) const
 
uint16_t readRequestID (std::vector< uint8_t >::const_iterator data_ptr) const
 
uint32_t readSessionID (std::vector< uint8_t >::const_iterator data_ptr) const
 
uint32_t readSTx (std::vector< uint8_t >::const_iterator data_ptr) const
 
void setCommandValuesFromPacket (const sick::datastructure::PacketBuffer &buffer, sick::cola2::Command &command) const
 

Detailed Description

Parser for an incoming TCP packet.

Definition at line 59 of file ParseTCPPacket.h.

Constructor & Destructor Documentation

sick::data_processing::ParseTCPPacket::ParseTCPPacket ( )

Constructor of parser.

Definition at line 42 of file ParseTCPPacket.cpp.

Member Function Documentation

uint32_t sick::data_processing::ParseTCPPacket::getExpectedPacketLength ( const datastructure::PacketBuffer buffer)

Gets the expected packet length for a buffer.

Parameters
bufferThe incoming tcp packet.
Returns
Expected length of the incoming packet buffer.

Definition at line 44 of file ParseTCPPacket.cpp.

uint16_t sick::data_processing::ParseTCPPacket::getRequestID ( const datastructure::PacketBuffer buffer) const

Gets the request ID of the incoming tcp packet.

Parameters
bufferThe incoming tcp packet.
Returns
The request ID of the incoming packet buffer.

Definition at line 52 of file ParseTCPPacket.cpp.

bool sick::data_processing::ParseTCPPacket::parseTCPSequence ( const datastructure::PacketBuffer buffer,
sick::cola2::Command command 
) const

Parse the tcp sequence to get the header information of the cola2 protocol.

Parameters
bufferThe incoming tcp connection.
commandReference to the command and set the returned method type and mode and the data.
Returns
If parsing was successful.

Definition at line 61 of file ParseTCPPacket.cpp.

uint8_t sick::data_processing::ParseTCPPacket::readCommandMode ( std::vector< uint8_t >::const_iterator  data_ptr) const
private

Definition at line 116 of file ParseTCPPacket.cpp.

uint8_t sick::data_processing::ParseTCPPacket::readCommandType ( std::vector< uint8_t >::const_iterator  data_ptr) const
private

Definition at line 112 of file ParseTCPPacket.cpp.

std::vector< uint8_t > sick::data_processing::ParseTCPPacket::readData ( const datastructure::PacketBuffer buffer) const
private

Definition at line 125 of file ParseTCPPacket.cpp.

uint16_t sick::data_processing::ParseTCPPacket::readErrorCode ( std::vector< uint8_t >::const_iterator  data_ptr) const
private

Definition at line 120 of file ParseTCPPacket.cpp.

uint8_t sick::data_processing::ParseTCPPacket::readHubCntr ( std::vector< uint8_t >::const_iterator  data_ptr) const
private

Definition at line 94 of file ParseTCPPacket.cpp.

uint32_t sick::data_processing::ParseTCPPacket::readLength ( std::vector< uint8_t >::const_iterator  data_ptr) const
private

Definition at line 89 of file ParseTCPPacket.cpp.

uint8_t sick::data_processing::ParseTCPPacket::readNoC ( std::vector< uint8_t >::const_iterator  data_ptr) const
private

Definition at line 98 of file ParseTCPPacket.cpp.

uint16_t sick::data_processing::ParseTCPPacket::readRequestID ( std::vector< uint8_t >::const_iterator  data_ptr) const
private

Definition at line 107 of file ParseTCPPacket.cpp.

uint32_t sick::data_processing::ParseTCPPacket::readSessionID ( std::vector< uint8_t >::const_iterator  data_ptr) const
private

Definition at line 102 of file ParseTCPPacket.cpp.

uint32_t sick::data_processing::ParseTCPPacket::readSTx ( std::vector< uint8_t >::const_iterator  data_ptr) const
private

Definition at line 84 of file ParseTCPPacket.cpp.

void sick::data_processing::ParseTCPPacket::setCommandValuesFromPacket ( const sick::datastructure::PacketBuffer buffer,
sick::cola2::Command command 
) const
private

Definition at line 72 of file ParseTCPPacket.cpp.


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


sick_safetyscanners
Author(s): Lennart Puck
autogenerated on Fri Apr 2 2021 02:45:42