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

Parser for an incoming TCP packet. More...

#include <ParseTCPPacket.h>

List of all members.

Public Member Functions

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

Private Member Functions

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

Private Attributes

std::shared_ptr
< sick::data_processing::ReadWriteHelper
m_reader_ptr

Detailed Description

Parser for an incoming TCP packet.

Definition at line 59 of file ParseTCPPacket.h.


Constructor & Destructor Documentation

Constructor of parser.

Definition at line 42 of file ParseTCPPacket.cpp.


Member Function Documentation

Gets the expected packet length for a buffer.

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

Definition at line 47 of file ParseTCPPacket.cpp.

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 53 of file ParseTCPPacket.cpp.

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 60 of file ParseTCPPacket.cpp.

uint8_t sick::data_processing::ParseTCPPacket::readCommandMode ( const uint8_t *&  data_ptr) const [private]

Definition at line 114 of file ParseTCPPacket.cpp.

uint8_t sick::data_processing::ParseTCPPacket::readCommandType ( const uint8_t *&  data_ptr) const [private]

Definition at line 110 of file ParseTCPPacket.cpp.

void sick::data_processing::ParseTCPPacket::readData ( const datastructure::PacketBuffer buffer,
std::vector< uint8_t > &  byteVector 
) const [private]

Definition at line 123 of file ParseTCPPacket.cpp.

uint16_t sick::data_processing::ParseTCPPacket::readErrorCode ( const uint8_t *&  data_ptr) const [private]

Definition at line 118 of file ParseTCPPacket.cpp.

uint8_t sick::data_processing::ParseTCPPacket::readHubCntr ( const uint8_t *&  data_ptr) const [private]

Definition at line 92 of file ParseTCPPacket.cpp.

uint32_t sick::data_processing::ParseTCPPacket::readLength ( const uint8_t *&  data_ptr) const [private]

Definition at line 87 of file ParseTCPPacket.cpp.

uint8_t sick::data_processing::ParseTCPPacket::readNoC ( const uint8_t *&  data_ptr) const [private]

Definition at line 96 of file ParseTCPPacket.cpp.

uint16_t sick::data_processing::ParseTCPPacket::readRequestID ( const uint8_t *&  data_ptr) const [private]

Definition at line 105 of file ParseTCPPacket.cpp.

uint32_t sick::data_processing::ParseTCPPacket::readSessionID ( const uint8_t *&  data_ptr) const [private]

Definition at line 100 of file ParseTCPPacket.cpp.

uint32_t sick::data_processing::ParseTCPPacket::readSTx ( const uint8_t *&  data_ptr) const [private]

Definition at line 82 of file ParseTCPPacket.cpp.

Definition at line 72 of file ParseTCPPacket.cpp.


Member Data Documentation

Definition at line 97 of file ParseTCPPacket.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