Public Member Functions | Static Public Attributes | Private Attributes | List of all members
sick::datastructure::DatagramHeader Class Reference

Contains the contents of a udp datagram header. Used to match the datagrams together to form a complete data packet. More...

#include <DatagramHeader.h>

Public Member Functions

 DatagramHeader ()
 Constructor of the datagram header. More...
 
uint32_t getDatagramMarker () const
 Gets the datagram marker. More...
 
uint32_t getFragmentOffset () const
 Gets the fragment offset of the data. More...
 
uint32_t getIdentification () const
 Gets the identification of the data. More...
 
uint8_t getMajorVersion () const
 Gets the major version number. More...
 
uint8_t getMinorVersion () const
 Gets the minor version number. More...
 
uint16_t getProtocol () const
 Gets the used Protocol. More...
 
uint32_t getTotalLength () const
 Gets the total length of the data packet. More...
 
void setDatagramMarker (const uint32_t &value)
 Sets the datagram marker. More...
 
void setFragmentOffset (const uint32_t &value)
 Sets the fragment offset of the data. More...
 
void setIdentification (const uint32_t &value)
 Sets the identification of the data. More...
 
void setMajorVersion (const uint8_t &value)
 Sets the major version number. More...
 
void setMinorVersion (const uint8_t &value)
 Sets the minor version number. More...
 
void setProtocol (const uint16_t &value)
 Sets the used protocol. More...
 
void setTotalLength (const uint32_t &value)
 Sets the total length of the data packet. More...
 

Static Public Attributes

static const uint32_t HEADER_SIZE = 24
 

Private Attributes

uint32_t m_datagram_marker
 
uint32_t m_fragment_offset
 
uint32_t m_identification
 
uint8_t m_major_version
 
uint8_t m_minor_version
 
uint16_t m_protocol
 
uint32_t m_total_length
 

Detailed Description

Contains the contents of a udp datagram header. Used to match the datagrams together to form a complete data packet.

Definition at line 48 of file DatagramHeader.h.

Constructor & Destructor Documentation

sick::datastructure::DatagramHeader::DatagramHeader ( )

Constructor of the datagram header.

Definition at line 40 of file DatagramHeader.cpp.

Member Function Documentation

uint32_t sick::datastructure::DatagramHeader::getDatagramMarker ( ) const

Gets the datagram marker.

Returns
The datagram marker.

Definition at line 42 of file DatagramHeader.cpp.

uint32_t sick::datastructure::DatagramHeader::getFragmentOffset ( ) const

Gets the fragment offset of the data.

Offset (in bytes) of the measurement data carried in this datagram (fragment) relative to the start of the overall measurement data output instance.

Returns
The fragment offset.

Definition at line 102 of file DatagramHeader.cpp.

uint32_t sick::datastructure::DatagramHeader::getIdentification ( ) const

Gets the identification of the data.

Datagrams (fragments) that belong to the same measurement data output instance share the same identifier. The number will increase with each measurement data instance generated per channel.

Returns
The identification.

Definition at line 92 of file DatagramHeader.cpp.

uint8_t sick::datastructure::DatagramHeader::getMajorVersion ( ) const

Gets the major version number.

Returns
The major version number.

Definition at line 62 of file DatagramHeader.cpp.

uint8_t sick::datastructure::DatagramHeader::getMinorVersion ( ) const

Gets the minor version number.

Returns
The minor version number.

Definition at line 72 of file DatagramHeader.cpp.

uint16_t sick::datastructure::DatagramHeader::getProtocol ( ) const

Gets the used Protocol.

Returns
The protocol.

Definition at line 52 of file DatagramHeader.cpp.

uint32_t sick::datastructure::DatagramHeader::getTotalLength ( ) const

Gets the total length of the data packet.

Total length of the (possibly fragmented) measurement data instance (excluding headers).

Returns
The total length.

Definition at line 82 of file DatagramHeader.cpp.

void sick::datastructure::DatagramHeader::setDatagramMarker ( const uint32_t &  value)

Sets the datagram marker.

Parameters
valueThe new datagram marker.

Definition at line 47 of file DatagramHeader.cpp.

void sick::datastructure::DatagramHeader::setFragmentOffset ( const uint32_t &  value)

Sets the fragment offset of the data.

Parameters
valueThe fragment offset.

Definition at line 107 of file DatagramHeader.cpp.

void sick::datastructure::DatagramHeader::setIdentification ( const uint32_t &  value)

Sets the identification of the data.

Parameters
valueThe identification.

Definition at line 97 of file DatagramHeader.cpp.

void sick::datastructure::DatagramHeader::setMajorVersion ( const uint8_t &  value)

Sets the major version number.

Parameters
valueThe major version number.

Definition at line 67 of file DatagramHeader.cpp.

void sick::datastructure::DatagramHeader::setMinorVersion ( const uint8_t &  value)

Sets the minor version number.

Parameters
valueThe minor version number.

Definition at line 77 of file DatagramHeader.cpp.

void sick::datastructure::DatagramHeader::setProtocol ( const uint16_t &  value)

Sets the used protocol.

Parameters
valueThe used protocol.

Definition at line 57 of file DatagramHeader.cpp.

void sick::datastructure::DatagramHeader::setTotalLength ( const uint32_t &  value)

Sets the total length of the data packet.

Parameters
valueThe total length of the data packet.

Definition at line 87 of file DatagramHeader.cpp.

Member Data Documentation

const uint32_t sick::datastructure::DatagramHeader::HEADER_SIZE = 24
static

Definition at line 51 of file DatagramHeader.h.

uint32_t sick::datastructure::DatagramHeader::m_datagram_marker
private

Definition at line 159 of file DatagramHeader.h.

uint32_t sick::datastructure::DatagramHeader::m_fragment_offset
private

Definition at line 165 of file DatagramHeader.h.

uint32_t sick::datastructure::DatagramHeader::m_identification
private

Definition at line 164 of file DatagramHeader.h.

uint8_t sick::datastructure::DatagramHeader::m_major_version
private

Definition at line 161 of file DatagramHeader.h.

uint8_t sick::datastructure::DatagramHeader::m_minor_version
private

Definition at line 162 of file DatagramHeader.h.

uint16_t sick::datastructure::DatagramHeader::m_protocol
private

Definition at line 160 of file DatagramHeader.h.

uint32_t sick::datastructure::DatagramHeader::m_total_length
private

Definition at line 163 of file DatagramHeader.h.


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


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