ITS
CommonHeader Class Reference

#include <CommonHeader.h>

Collaboration diagram for CommonHeader:
[legend]

Public Types

enum  e_helper { helper_size = 8 }
 The e_helper enum is used to help to have sizes. More...
 
enum  e_upperProtocolEntity { nextHeaderType_any = 0, nextHeaderType_BTP_A = 1, nextHeaderType_BTP_B = 2, nextHeaderType_IPv6 = 3 }
 The e_upperProtocolEntity enum defines the Next header values. More...
 
enum  e_headerType {
  headerType_any = 0, headerType_beacon = 1, headerType_geoUnicast = 2, headerType_geoAnycast = 3,
  headerType_geoBroadcast = 4, headerType_topologicallyScopedBroadcast = 5, headerType_locationService = 6
}
 The e_headerType enum defines the Header type values. More...
 
enum  e_headerSubTypeAny { headerSubTypeAny_unspecified = 0 }
 The e_headerSubTypeAny enum defines the Header sub-type values of ANY type. More...
 
enum  e_headerSubTypeBeacon { headerSubTypeBeacon_unspecified = 0 }
 The e_headerSubTypeAny enum defines the Header sub-type values of Beacon type. More...
 
enum  e_headerSubTypeGeoUnicast { headerSubTypeGeoUnicast_unspecified = 0 }
 The e_headerSubTypeAny enum defines the Header sub-type values of Beacon type. More...
 
enum  e_headerSubTypeGeoAnycast { headerSubTypeGeoAnycast_circle = 0, headerSubTypeGeoAnycast_rectangle = 1, headerSubTypeGeoAnycast_ellipse = 2 }
 The e_headerSubTypeAny enum defines the Header sub-type values of Beacon type. More...
 
enum  e_headerSubTypeGeoBroadcast { headerSubTypeGeoBroadcast_circle = 0, headerSubTypeGeoBroadcast_rectangle = 1, headerSubTypeGeoBroadcast_ellipse = 2 }
 The e_headerSubTypeAny enum defines the Header sub-type values of Beacon type. More...
 
enum  e_headerSubTypeTopologicallyScopedBroadcast { headerSubTypeTopologicallyScopedBroadcast_singleHop = 0, headerSubTypeTopologicallyScopedBroadcast_multiHop = 1 }
 The e_headerSubTypeAny enum defines the Header sub-type values of Beacon type. More...
 
enum  e_headerSubTypeLocationService { headerSubTypeLocationService_Request = 0, headerSubTypeLocationService_Reply = 1 }
 The e_headerSubTypeAny enum defines the Header sub-type values of Beacon type. More...
 

Public Member Functions

 CommonHeader ()
 CommonHeader Default constructor. More...
 
 CommonHeader (quint8 nextHeader, enum e_headerType headerType, quint8 headerSubType, TrafficClass trafficClass, quint8 flags, quint16 payloadLength, quint8 maximumHopLimit)
 CommonHeader Initialization constructor. More...
 
 CommonHeader (quint8 nextHeader, quint8 headerType_HeaderSubType, TrafficClass trafficClass, quint8 flags, quint16 payloadLength, quint8 maximumHopLimit)
 CommonHeader Initialization constructor. More...
 
 CommonHeader (const CommonHeader &other)
 CommonHeader Copy constructor. More...
 
 CommonHeader (sniff_commonHeader_t ch)
 CommonHeader CommonHeader initialization constructor. More...
 
QByteArray toHex ()
 toHex Create a QByteArray containing the hexadecimal format of the CommonHeader. More...
 
quint8 nextHeader () const
 nextHeader Next header field getter. More...
 
quint8 headerType_HeaderSubType () const
 headerType_HeaderSubType Header type + header sub-type fields getter. More...
 
quint8 headerType () const
 headerType Header field getter. More...
 
quint8 headerSubType () const
 headerSubType Header sub-type field getter. More...
 
TrafficClass trafficClass () const
 trafficClass Traffic class field getter. More...
 
quint8 flags () const
 flags Flags field getter. More...
 
quint8 itsGnIsMobile () const
 itsGnIsMobile First bit of flags field getter. More...
 
quint16 payloadLength () const
 payloadLength Payload length field getter. More...
 
quint8 maximumHopLimit () const
 maximumHopLimit Maximum hop limit field getter. More...
 

Private Attributes

quint8 m_nextHeader
 
quint8 m_headerType_HeaderSubType
 
TrafficClass m_trafficClass
 
quint8 m_flags
 
quint16 m_payloadLength
 
quint8 m_maximumHopLimit
 
quint8 m_reserved
 

Detailed Description

Definition at line 40 of file CommonHeader.h.

Member Enumeration Documentation

◆ e_headerSubTypeAny

The e_headerSubTypeAny enum defines the Header sub-type values of ANY type.

Enumerator
headerSubTypeAny_unspecified 

Unspecified.

Definition at line 78 of file CommonHeader.h.

◆ e_headerSubTypeBeacon

The e_headerSubTypeAny enum defines the Header sub-type values of Beacon type.

Enumerator
headerSubTypeBeacon_unspecified 

Unspecified.

Definition at line 85 of file CommonHeader.h.

◆ e_headerSubTypeGeoAnycast

The e_headerSubTypeAny enum defines the Header sub-type values of Beacon type.

Enumerator
headerSubTypeGeoAnycast_circle 

Circle.

headerSubTypeGeoAnycast_rectangle 

Rectange.

headerSubTypeGeoAnycast_ellipse 

Ellipse.

Definition at line 99 of file CommonHeader.h.

◆ e_headerSubTypeGeoBroadcast

The e_headerSubTypeAny enum defines the Header sub-type values of Beacon type.

Enumerator
headerSubTypeGeoBroadcast_circle 

Circle.

headerSubTypeGeoBroadcast_rectangle 

Rectangle.

headerSubTypeGeoBroadcast_ellipse 

Ellipse.

Definition at line 108 of file CommonHeader.h.

◆ e_headerSubTypeGeoUnicast

The e_headerSubTypeAny enum defines the Header sub-type values of Beacon type.

Enumerator
headerSubTypeGeoUnicast_unspecified 

Unspecified.

Definition at line 92 of file CommonHeader.h.

◆ e_headerSubTypeLocationService

The e_headerSubTypeAny enum defines the Header sub-type values of Beacon type.

Enumerator
headerSubTypeLocationService_Request 

LSRequest.

headerSubTypeLocationService_Reply 

LSReply.

Definition at line 125 of file CommonHeader.h.

◆ e_headerSubTypeTopologicallyScopedBroadcast

The e_headerSubTypeAny enum defines the Header sub-type values of Beacon type.

Enumerator
headerSubTypeTopologicallyScopedBroadcast_singleHop 

SHB.

headerSubTypeTopologicallyScopedBroadcast_multiHop 

TSB.

Definition at line 117 of file CommonHeader.h.

◆ e_headerType

The e_headerType enum defines the Header type values.

Enumerator
headerType_any 

Unspecified.

headerType_beacon 

Beacon.

headerType_geoUnicast 

GUC.

headerType_geoAnycast 

GAC.

headerType_geoBroadcast 

GBC.

headerType_topologicallyScopedBroadcast 

TSB.

headerType_locationService 

LS.

Definition at line 65 of file CommonHeader.h.

◆ e_helper

The e_helper enum is used to help to have sizes.

Enumerator
helper_size 

Size of the CH in bytes.

Definition at line 46 of file CommonHeader.h.

◆ e_upperProtocolEntity

The e_upperProtocolEntity enum defines the Next header values.

Enumerator
nextHeaderType_any 

Next header is the default value (BTP-B).

nextHeaderType_BTP_A 

Next header is the BTP-A.

nextHeaderType_BTP_B 

Next header is the BTP-A.

nextHeaderType_IPv6 

Next header is the IPv6.

Definition at line 54 of file CommonHeader.h.

Constructor & Destructor Documentation

◆ CommonHeader() [1/5]

◆ CommonHeader() [2/5]

CommonHeader::CommonHeader ( quint8  nextHeader,
enum e_headerType  headerType,
quint8  headerSubType,
TrafficClass  trafficClass,
quint8  flags,
quint16  payloadLength,
quint8  maximumHopLimit 
)

CommonHeader Initialization constructor.

Parameters
nextHeaderNextHeader field
headerTypeHeaderType field
headerSubTypeHeaderSubType field
trafficClassTrafficClass field
flagsFlags field
payloadLengthPayloadLength field
maximumHopLimitMaximumHopLimit field
Note
This constructor will take the only needed bits from HeaderType and HeaderSubType.

Definition at line 15 of file CommonHeader.cpp.

References flags(), headerSubType(), headerType(), m_flags, m_headerType_HeaderSubType, m_maximumHopLimit, m_nextHeader, m_payloadLength, m_reserved, m_trafficClass, maximumHopLimit(), nextHeader(), payloadLength(), and trafficClass().

Here is the call graph for this function:

◆ CommonHeader() [3/5]

CommonHeader::CommonHeader ( quint8  nextHeader,
quint8  headerType_HeaderSubType,
TrafficClass  trafficClass,
quint8  flags,
quint16  payloadLength,
quint8  maximumHopLimit 
)

CommonHeader Initialization constructor.

Parameters
nextHeaderNextHeader field
headerType_HeaderSubTypeHeaderType_HeaderSubType field
trafficClassTrafficClass field
flagsFlags field
payloadLengthPayloadLength field
maximumHopLimitMaximumHopLimit field

Definition at line 27 of file CommonHeader.cpp.

References flags(), headerType_HeaderSubType(), m_flags, m_headerType_HeaderSubType, m_maximumHopLimit, m_nextHeader, m_payloadLength, m_reserved, m_trafficClass, maximumHopLimit(), nextHeader(), payloadLength(), and trafficClass().

Here is the call graph for this function:

◆ CommonHeader() [4/5]

CommonHeader::CommonHeader ( const CommonHeader other)

CommonHeader Copy constructor.

Parameters
otherThe CommonHeader to copy.

Definition at line 38 of file CommonHeader.cpp.

References flags(), headerType_HeaderSubType(), m_flags, m_headerType_HeaderSubType, m_maximumHopLimit, m_nextHeader, m_payloadLength, m_reserved, m_trafficClass, maximumHopLimit(), nextHeader(), payloadLength(), and trafficClass().

Here is the call graph for this function:

◆ CommonHeader() [5/5]

Member Function Documentation

◆ flags()

quint8 CommonHeader::flags ( ) const
inline

flags Flags field getter.

Returns
The flags field.

Definition at line 208 of file CommonHeader.h.

References m_flags.

Referenced by CommonHeader().

Here is the caller graph for this function:

◆ headerSubType()

◆ headerType()

◆ headerType_HeaderSubType()

quint8 CommonHeader::headerType_HeaderSubType ( ) const
inline

headerType_HeaderSubType Header type + header sub-type fields getter.

Returns
The Header type and header sub-type fields.

Definition at line 187 of file CommonHeader.h.

References m_headerType_HeaderSubType.

Referenced by CommonHeader().

Here is the caller graph for this function:

◆ itsGnIsMobile()

quint8 CommonHeader::itsGnIsMobile ( ) const
inline

itsGnIsMobile First bit of flags field getter.

Returns
The first bit of flags field.

Definition at line 213 of file CommonHeader.h.

References m_flags.

◆ maximumHopLimit()

quint8 CommonHeader::maximumHopLimit ( ) const
inline

maximumHopLimit Maximum hop limit field getter.

Returns
The maximum hop limit field.

Definition at line 223 of file CommonHeader.h.

References m_maximumHopLimit.

Referenced by CommonHeader(), and GeoNet::commonHeaderProcessing().

Here is the caller graph for this function:

◆ nextHeader()

quint8 CommonHeader::nextHeader ( ) const
inline

nextHeader Next header field getter.

Returns
The Next header field.

Definition at line 182 of file CommonHeader.h.

References m_nextHeader.

Referenced by CommonHeader().

Here is the caller graph for this function:

◆ payloadLength()

quint16 CommonHeader::payloadLength ( ) const
inline

payloadLength Payload length field getter.

Returns
The payload length field.

Definition at line 218 of file CommonHeader.h.

References m_payloadLength.

Referenced by CommonHeader(), GeoNet::gacPacketProcessing(), GeoNet::gbcPacketProcessing(), GeoNet::gucPacketProcessing(), GeoNet::LSRequestPacketProcessing(), GeoNet::shbPacketProcessing(), and GeoNet::tsbPacketProcessing().

Here is the caller graph for this function:

◆ toHex()

QByteArray CommonHeader::toHex ( )

toHex Create a QByteArray containing the hexadecimal format of the CommonHeader.

Returns
The created QByteArray.

Definition at line 59 of file CommonHeader.cpp.

References TrafficClass::helper_size, m_flags, m_headerType_HeaderSubType, m_maximumHopLimit, m_nextHeader, m_payloadLength, m_reserved, m_trafficClass, and TrafficClass::toHex().

Referenced by GeoNet::checkUCFPB(), GeoNet::gacPacketProcessing(), GeoNet::gbcPacketProcessing(), GeoNet::gucPacketProcessing(), GeoNet::LSReplyPacketProcessing(), GeoNet::LSRequestPacketProcessing(), GeoNet::sendGAC(), GeoNet::sendGBC(), GeoNet::sendGUC(), and GeoNet::tsbPacketProcessing().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ trafficClass()

TrafficClass CommonHeader::trafficClass ( ) const
inline

trafficClass Traffic class field getter.

Returns
The traffic class field.

Definition at line 203 of file CommonHeader.h.

References m_trafficClass.

Referenced by CommonHeader(), GeoNet::greedy(), and GeoNet::tsbPacketProcessing().

Here is the caller graph for this function:

Member Data Documentation

◆ m_flags

quint8 CommonHeader::m_flags
private

Flags field.

Definition at line 229 of file CommonHeader.h.

Referenced by CommonHeader(), flags(), itsGnIsMobile(), and toHex().

◆ m_headerType_HeaderSubType

quint8 CommonHeader::m_headerType_HeaderSubType
private

HeaderType (4 bits) + HeaderSubType (4 bits)

Definition at line 227 of file CommonHeader.h.

Referenced by CommonHeader(), headerSubType(), headerType(), headerType_HeaderSubType(), and toHex().

◆ m_maximumHopLimit

quint8 CommonHeader::m_maximumHopLimit
private

Maximum hop limit field.

Definition at line 231 of file CommonHeader.h.

Referenced by CommonHeader(), maximumHopLimit(), and toHex().

◆ m_nextHeader

quint8 CommonHeader::m_nextHeader
private

Next header + reserved fields.

Definition at line 226 of file CommonHeader.h.

Referenced by CommonHeader(), nextHeader(), and toHex().

◆ m_payloadLength

quint16 CommonHeader::m_payloadLength
private

Payload length field.

Definition at line 230 of file CommonHeader.h.

Referenced by CommonHeader(), payloadLength(), and toHex().

◆ m_reserved

quint8 CommonHeader::m_reserved
private

Reserved field.

Definition at line 232 of file CommonHeader.h.

Referenced by CommonHeader(), and toHex().

◆ m_trafficClass

TrafficClass CommonHeader::m_trafficClass
private

Traffic class field.

Definition at line 228 of file CommonHeader.h.

Referenced by CommonHeader(), toHex(), and trafficClass().


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