Class DatagramHeader
Defined in File DatagramHeader.h
Class Documentation
-
class DatagramHeader
Contains the contents of a udp datagram header. Used to match the datagrams together to form a complete data packet.
Public Functions
-
DatagramHeader()
Constructor of the datagram header.
-
uint32_t getDatagramMarker() const
Gets the datagram marker.
- Returns:
The datagram marker.
-
void setDatagramMarker(const uint32_t &value)
Sets the datagram marker.
- Parameters:
value – The new datagram marker.
-
uint16_t getProtocol() const
Gets the used Protocol.
- Returns:
The protocol.
-
void setProtocol(const uint16_t &value)
Sets the used protocol.
- Parameters:
value – The used protocol.
-
uint8_t getMajorVersion() const
Gets the major version number.
- Returns:
The major version number.
-
void setMajorVersion(const uint8_t &value)
Sets the major version number.
- Parameters:
value – The major version number.
-
uint8_t getMinorVersion() const
Gets the minor version number.
- Returns:
The minor version number.
-
void setMinorVersion(const uint8_t &value)
Sets the minor version number.
- Parameters:
value – The minor version number.
-
uint32_t 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.
-
void setTotalLength(const uint32_t &value)
Sets the total length of the data packet.
- Parameters:
value – The total length of the data packet.
-
uint32_t 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.
-
void setIdentification(const uint32_t &value)
Sets the identification of the data.
- Parameters:
value – The identification.
-
uint32_t 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.
-
void setFragmentOffset(const uint32_t &value)
Sets the fragment offset of the data.
- Parameters:
value – The fragment offset.
Public Static Attributes
-
static const uint32_t HEADER_SIZE = 24
-
DatagramHeader()