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 |
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.
sick::datastructure::DatagramHeader::DatagramHeader | ( | ) |
Constructor of the datagram header.
Definition at line 40 of file DatagramHeader.cpp.
uint32_t sick::datastructure::DatagramHeader::getDatagramMarker | ( | ) | const |
Gets 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.
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.
Definition at line 92 of file DatagramHeader.cpp.
uint8_t sick::datastructure::DatagramHeader::getMajorVersion | ( | ) | const |
Gets the major version number.
Definition at line 62 of file DatagramHeader.cpp.
uint8_t sick::datastructure::DatagramHeader::getMinorVersion | ( | ) | const |
Gets the minor version number.
Definition at line 72 of file DatagramHeader.cpp.
uint16_t sick::datastructure::DatagramHeader::getProtocol | ( | ) | const |
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).
Definition at line 82 of file DatagramHeader.cpp.
void sick::datastructure::DatagramHeader::setDatagramMarker | ( | const uint32_t & | value | ) |
Sets the datagram marker.
value | The 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.
value | The 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.
value | The identification. |
Definition at line 97 of file DatagramHeader.cpp.
void sick::datastructure::DatagramHeader::setMajorVersion | ( | const uint8_t & | value | ) |
Sets the major version number.
value | The 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.
value | The minor version number. |
Definition at line 77 of file DatagramHeader.cpp.
void sick::datastructure::DatagramHeader::setProtocol | ( | const uint16_t & | value | ) |
Sets the used protocol.
value | The 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.
value | The total length of the data packet. |
Definition at line 87 of file DatagramHeader.cpp.
|
static |
Definition at line 51 of file DatagramHeader.h.
|
private |
Definition at line 159 of file DatagramHeader.h.
|
private |
Definition at line 165 of file DatagramHeader.h.
|
private |
Definition at line 164 of file DatagramHeader.h.
|
private |
Definition at line 161 of file DatagramHeader.h.
|
private |
Definition at line 162 of file DatagramHeader.h.
|
private |
Definition at line 160 of file DatagramHeader.h.
|
private |
Definition at line 163 of file DatagramHeader.h.