DatagramHeader.h
Go to the documentation of this file.
1 // this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
2 
3 // -- BEGIN LICENSE BLOCK ----------------------------------------------
4 
24 // -- END LICENSE BLOCK ------------------------------------------------
25 
26 //----------------------------------------------------------------------
33 //----------------------------------------------------------------------
34 
35 #ifndef SICK_SAFETYSCANNERS_DATASTRUCTURE_DATAGRAMHEADER_H
36 #define SICK_SAFETYSCANNERS_DATASTRUCTURE_DATAGRAMHEADER_H
37 
38 #include <stdint.h>
39 
40 namespace sick {
41 namespace datastructure {
42 
43 
49 {
50 public:
51  static const uint32_t HEADER_SIZE = 24;
52 
57 
63  uint32_t getDatagramMarker() const;
69  void setDatagramMarker(const uint32_t& value);
70 
76  uint16_t getProtocol() const;
82  void setProtocol(const uint16_t& value);
83 
89  uint8_t getMajorVersion() const;
95  void setMajorVersion(const uint8_t& value);
96 
102  uint8_t getMinorVersion() const;
108  void setMinorVersion(const uint8_t& value);
109 
117  uint32_t getTotalLength() const;
123  void setTotalLength(const uint32_t& value);
124 
134  uint32_t getIdentification() const;
140  void setIdentification(const uint32_t& value);
141 
150  uint32_t getFragmentOffset() const;
156  void setFragmentOffset(const uint32_t& value);
157 
158 private:
160  uint16_t m_protocol;
163  uint32_t m_total_length;
166 };
167 
168 } // namespace datastructure
169 } // namespace sick
170 
171 #endif // SICK_SAFETYSCANNERS_DATASTRUCTURE_DATAGRAMHEADER_H
uint32_t getFragmentOffset() const
Gets the fragment offset of the data.
DatagramHeader()
Constructor of the datagram header.
void setMinorVersion(const uint8_t &value)
Sets the minor version number.
void setProtocol(const uint16_t &value)
Sets the used protocol.
uint16_t getProtocol() const
Gets the used Protocol.
void setTotalLength(const uint32_t &value)
Sets the total length of the data packet.
void setDatagramMarker(const uint32_t &value)
Sets the datagram marker.
uint8_t getMajorVersion() const
Gets the major version number.
uint8_t getMinorVersion() const
Gets the minor version number.
void setMajorVersion(const uint8_t &value)
Sets the major version number.
uint32_t getIdentification() const
Gets the identification of the data.
void setIdentification(const uint32_t &value)
Sets the identification of the data.
Contains the contents of a udp datagram header. Used to match the datagrams together to form a comple...
uint32_t getTotalLength() const
Gets the total length of the data packet.
static const uint32_t HEADER_SIZE
uint32_t getDatagramMarker() const
Gets the datagram marker.
void setFragmentOffset(const uint32_t &value)
Sets the fragment offset of the data.


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