ITS
DestinationArea Class Reference

#include <DestinationArea.h>

Public Types

enum  e_helper { helper_size = 16 }
 The e_helper enum is used to help to have sizes. More...
 

Public Member Functions

 DestinationArea ()
 DestinationArea DestinationArea constructor. More...
 
 DestinationArea (qint32 geoAreaPosLatitude, qint32 geoAreaPosLongitude, quint16 distanceA, quint16 distanceB, quint16 angle)
 DestinationArea DestinationArea initialization constructor. More...
 
 DestinationArea (const DestinationArea &other)
 DestinationArea DestinationArea copy constructor. More...
 
 DestinationArea (sniff_destinationArea_t da)
 DestinationArea DestinationArea initialization constructor. More...
 
 ~DestinationArea ()
 
quint64 extract (uchar *packet)
 extract Extract DestinationArea from byte array. More...
 
QByteArray toHex ()
 toHex Create a QByteArray containing the hexadecimal format of the DestinationArea. More...
 
qint32 geoAreaPosLatitude () const
 geoAreaPosLatitude Geo area position latitude field getter. More...
 
qint32 geoAreaPosLongitude () const
 geoAreaPosLatitude Geo area position longitude field getter. More...
 
quint16 distanceA () const
 geoAreaPosLatitude Distance A field getter. More...
 
quint16 distanceB () const
 geoAreaPosLatitude Distance B field getter. More...
 
quint16 angle () const
 geoAreaPosLatitude Angle field getter. More...
 
void setDistanceA (quint16 a)
 setDistanceA Distance A field setter. More...
 

Private Attributes

qint32 m_geoAreaPosLatitude
 
qint32 m_geoAreaPosLongitude
 
quint16 m_distanceA
 
quint16 m_distanceB
 
quint16 m_angle
 
quint16 m_reserved
 

Detailed Description

Definition at line 35 of file DestinationArea.h.

Member Enumeration Documentation

◆ e_helper

The e_helper enum is used to help to have sizes.

Enumerator
helper_size 

Size of the destination area in bytes.

Definition at line 41 of file DestinationArea.h.

Constructor & Destructor Documentation

◆ DestinationArea() [1/4]

DestinationArea::DestinationArea ( )

◆ DestinationArea() [2/4]

DestinationArea::DestinationArea ( qint32  geoAreaPosLatitude,
qint32  geoAreaPosLongitude,
quint16  distanceA,
quint16  distanceB,
quint16  angle 
)

DestinationArea DestinationArea initialization constructor.

Parameters
geoAreaPosLatitudeGeo area position latitude field.
geoAreaPosLongitudeGeo area position longitude field.
distanceADistance A field.
distanceBDistance B field.
angleAngle field.

Definition at line 13 of file DestinationArea.cpp.

References angle(), distanceA(), distanceB(), geoAreaPosLatitude(), geoAreaPosLongitude(), m_angle, m_distanceA, m_distanceB, m_geoAreaPosLatitude, m_geoAreaPosLongitude, and m_reserved.

Here is the call graph for this function:

◆ DestinationArea() [3/4]

DestinationArea::DestinationArea ( const DestinationArea other)

DestinationArea DestinationArea copy constructor.

Parameters
otherThe DestinationArea to copy.

Definition at line 23 of file DestinationArea.cpp.

References m_angle, m_distanceA, m_distanceB, m_geoAreaPosLatitude, m_geoAreaPosLongitude, and m_reserved.

◆ DestinationArea() [4/4]

◆ ~DestinationArea()

DestinationArea::~DestinationArea ( )

~DestinationArea DestinationArea destructor.

Definition at line 42 of file DestinationArea.cpp.

Member Function Documentation

◆ angle()

quint16 DestinationArea::angle ( ) const
inline

geoAreaPosLatitude Angle field getter.

Returns
The angle field.

Definition at line 112 of file DestinationArea.h.

References m_angle.

Referenced by GeoNet::advancedForwarding(), GeoNet::contentionBasedForwardingAlgorithm(), DestinationArea(), and GeoNet::simpleForwardingAlgorithm().

Here is the caller graph for this function:

◆ distanceA()

quint16 DestinationArea::distanceA ( ) const
inline

geoAreaPosLatitude Distance A field getter.

Returns
The distance A field.

Definition at line 102 of file DestinationArea.h.

References m_distanceA.

Referenced by GeoNet::advancedForwarding(), GeoNet::checkBCFPB(), GeoNet::contentionBasedForwardingAlgorithm(), DestinationArea(), and GeoNet::simpleForwardingAlgorithm().

Here is the caller graph for this function:

◆ distanceB()

quint16 DestinationArea::distanceB ( ) const
inline

geoAreaPosLatitude Distance B field getter.

Returns
The distance B field.

Definition at line 107 of file DestinationArea.h.

References m_distanceB.

Referenced by GeoNet::advancedForwarding(), GeoNet::checkBCFPB(), GeoNet::contentionBasedForwardingAlgorithm(), DestinationArea(), and GeoNet::simpleForwardingAlgorithm().

Here is the caller graph for this function:

◆ extract()

quint64 DestinationArea::extract ( uchar *  packet)

extract Extract DestinationArea from byte array.

Parameters
packetThe byte array.
Returns
The extracted DestinationArea.

Definition at line 46 of file DestinationArea.cpp.

References get_INT32(), get_UINT16(), m_angle, m_distanceA, m_distanceB, m_geoAreaPosLatitude, m_geoAreaPosLongitude, and m_reserved.

Referenced by GBCPacket::extract().

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

◆ geoAreaPosLatitude()

qint32 DestinationArea::geoAreaPosLatitude ( ) const
inline

geoAreaPosLatitude Geo area position latitude field getter.

Returns
The geo area position latitude field.

Definition at line 92 of file DestinationArea.h.

References m_geoAreaPosLatitude.

Referenced by GeoNet::advancedForwarding(), GeoNet::CBFUnicast(), GeoNet::contentionBasedForwardingAlgorithm(), DestinationArea(), GeoNet::greedy(), and GeoNet::simpleForwardingAlgorithm().

Here is the caller graph for this function:

◆ geoAreaPosLongitude()

qint32 DestinationArea::geoAreaPosLongitude ( ) const
inline

geoAreaPosLatitude Geo area position longitude field getter.

Returns
The geo area position longitude field.

Definition at line 97 of file DestinationArea.h.

References m_geoAreaPosLongitude.

Referenced by GeoNet::advancedForwarding(), GeoNet::CBFUnicast(), GeoNet::contentionBasedForwardingAlgorithm(), DestinationArea(), GeoNet::greedy(), and GeoNet::simpleForwardingAlgorithm().

Here is the caller graph for this function:

◆ setDistanceA()

void DestinationArea::setDistanceA ( quint16  a)
inline

setDistanceA Distance A field setter.

Parameters
aThe new distance A.

Definition at line 118 of file DestinationArea.h.

References m_distanceA.

◆ toHex()

QByteArray DestinationArea::toHex ( )

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

Returns
The created QByteArray.

Definition at line 60 of file DestinationArea.cpp.

References m_angle, m_distanceA, m_distanceB, m_geoAreaPosLatitude, m_geoAreaPosLongitude, and m_reserved.

Referenced by GBCPacket::toHex().

Here is the caller graph for this function:

Member Data Documentation

◆ m_angle

quint16 DestinationArea::m_angle
private

Angle field.

Definition at line 125 of file DestinationArea.h.

Referenced by angle(), DestinationArea(), extract(), and toHex().

◆ m_distanceA

quint16 DestinationArea::m_distanceA
private

Distance A field.

Definition at line 123 of file DestinationArea.h.

Referenced by DestinationArea(), distanceA(), extract(), setDistanceA(), and toHex().

◆ m_distanceB

quint16 DestinationArea::m_distanceB
private

Distance B field.

Definition at line 124 of file DestinationArea.h.

Referenced by DestinationArea(), distanceB(), extract(), and toHex().

◆ m_geoAreaPosLatitude

qint32 DestinationArea::m_geoAreaPosLatitude
private

Geo area position longitude field.

Definition at line 121 of file DestinationArea.h.

Referenced by DestinationArea(), extract(), geoAreaPosLatitude(), and toHex().

◆ m_geoAreaPosLongitude

qint32 DestinationArea::m_geoAreaPosLongitude
private

Geo area position longitude field.

Definition at line 122 of file DestinationArea.h.

Referenced by DestinationArea(), extract(), geoAreaPosLongitude(), and toHex().

◆ m_reserved

quint16 DestinationArea::m_reserved
private

Reserved field.

Definition at line 126 of file DestinationArea.h.

Referenced by DestinationArea(), extract(), and toHex().


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