ITS
LongPositionVector Class Reference

#include <LongPositionVector.h>

Collaboration diagram for LongPositionVector:
[legend]

Public Types

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

Public Member Functions

 LongPositionVector ()
 LongPositionVector Default constructor. More...
 
 LongPositionVector (GnAddr gnA, quint32 tmstmp, qint32 lat, qint32 lon, quint16 paiSpeed, quint16 head)
 LongPositionVector Initialization constructor. More...
 
 LongPositionVector (GnAddr gnA, quint32 tmstmp, qint32 lat, qint32 lon, quint8 pai, quint16 speed, quint16 head)
 LongPositionVector Initialization constructor. More...
 
 LongPositionVector (ShortPositionVector spv)
 LongPositionVector Initialization constructor. More...
 
 LongPositionVector (const LongPositionVector &other)
 LongPositionVector Copy constructor. More...
 
 LongPositionVector (char *data, int *offset)
 
LongPositionVectoroperator= (const LongPositionVector &other)
 operator = Overload of = operator More...
 
quint64 extract (uchar *packet)
 extract Fill the LongPositionVector with values contained in the packet More...
 
QByteArray toHex ()
 toHex Create a QByteArray containing the hexadecimal format of the LongPositionVector. More...
 
GnAddr gnAddr () const
 gnAddr GnAddr field getter More...
 
quint32 timestamp () const
 timestamp Timestamp field getter More...
 
qint32 latitude () const
 latitude Latitude field getter More...
 
qint32 longitude () const
 longitude Longitude field getter More...
 
quint16 pai_Speed () const
 pai_Speed Pai_Speed field getter (16 bits) More...
 
quint8 pai () const
 pai Pai field getter (1 bit) More...
 
quint16 speed () const
 speed Speed field getter (15 bits) More...
 
quint16 heading () const
 heading Heading field getter More...
 

Private Attributes

GnAddr m_gnAddr
 
quint32 m_timestamp
 
qint32 m_latitude
 
qint32 m_longitude
 
quint16 m_pai_Speed
 
quint16 m_heading
 

Detailed Description

Definition at line 24 of file LongPositionVector.h.

Member Enumeration Documentation

◆ e_helper

The e_helper enum is used to help to have sizes.

Enumerator
helper_size 

Size of the LPV.

Definition at line 30 of file LongPositionVector.h.

Constructor & Destructor Documentation

◆ LongPositionVector() [1/6]

LongPositionVector::LongPositionVector ( )

LongPositionVector Default constructor.

Definition at line 4 of file LongPositionVector.cpp.

References m_gnAddr, m_heading, m_latitude, m_longitude, m_pai_Speed, and m_timestamp.

◆ LongPositionVector() [2/6]

LongPositionVector::LongPositionVector ( GnAddr  gnA,
quint32  tmstmp,
qint32  lat,
qint32  lon,
quint16  paiSpeed,
quint16  head 
)

LongPositionVector Initialization constructor.

Parameters
gnAGnAddr field.
tmstmpTimestamp field.
latLatitude field
lonLongitude field
paiSpeedPai_Speed field
headHeader field

Definition at line 14 of file LongPositionVector.cpp.

References m_gnAddr, m_heading, m_latitude, m_longitude, m_pai_Speed, and m_timestamp.

◆ LongPositionVector() [3/6]

LongPositionVector::LongPositionVector ( GnAddr  gnA,
quint32  tmstmp,
qint32  lat,
qint32  lon,
quint8  pai,
quint16  speed,
quint16  head 
)

LongPositionVector Initialization constructor.

Parameters
gnAGnAddr field.
tmstmpTimestamp field.
latLatitude field
lonLongitude field
paiPai field
speedSpeed field
headHeader field
Note
This constructor will take the only needed bits from Pai and Speed.

Definition at line 24 of file LongPositionVector.cpp.

References m_gnAddr, m_heading, m_latitude, m_longitude, m_pai_Speed, m_timestamp, pai(), and speed().

Here is the call graph for this function:

◆ LongPositionVector() [4/6]

LongPositionVector::LongPositionVector ( ShortPositionVector  spv)

LongPositionVector Initialization constructor.

Parameters
SPVShort Position Vector.

Definition at line 35 of file LongPositionVector.cpp.

References ShortPositionVector::gnAddr(), ShortPositionVector::latitude(), ShortPositionVector::longitude(), m_gnAddr, m_latitude, m_longitude, m_timestamp, and ShortPositionVector::timestamp().

Here is the call graph for this function:

◆ LongPositionVector() [5/6]

LongPositionVector::LongPositionVector ( const LongPositionVector other)

LongPositionVector Copy constructor.

Parameters
otherThe LongPositionVector to copy.

Definition at line 52 of file LongPositionVector.cpp.

References gnAddr(), heading(), latitude(), longitude(), m_gnAddr, m_heading, m_latitude, m_longitude, m_pai_Speed, m_timestamp, pai_Speed(), and timestamp().

Here is the call graph for this function:

◆ LongPositionVector() [6/6]

LongPositionVector::LongPositionVector ( char *  data,
int *  offset 
)

Definition at line 43 of file LongPositionVector.cpp.

References extractInt(), extractUInt(), m_gnAddr, m_latitude, m_longitude, and m_timestamp.

Here is the call graph for this function:

Member Function Documentation

◆ extract()

quint64 LongPositionVector::extract ( uchar *  packet)

extract Fill the LongPositionVector with values contained in the packet

Parameters
packetThe packet that contains the LongPositionVector data

Definition at line 73 of file LongPositionVector.cpp.

References GnAddr::extract(), get_INT32(), get_UINT16(), get_UINT32(), m_gnAddr, m_heading, m_latitude, m_longitude, m_pai_Speed, and m_timestamp.

Referenced by BeaconPacket::extract(), SHBPacket::extract(), LSRequestPacket::extract(), TSBPacket::extract(), GUCPacket::extract(), and GBCPacket::extract().

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

◆ gnAddr()

◆ heading()

quint16 LongPositionVector::heading ( ) const
inline

heading Heading field getter

Returns
Heading field

Definition at line 135 of file LongPositionVector.h.

References m_heading.

Referenced by LongPositionVector(), operator=(), and LocationTableEntry::print().

Here is the caller graph for this function:

◆ latitude()

qint32 LongPositionVector::latitude ( ) const
inline

latitude Latitude field getter

Returns
Latitude field

Definition at line 110 of file LongPositionVector.h.

References m_latitude.

Referenced by GeoNet::advancedForwarding(), GeoNet::CBFUnicast(), GeoNet::contentionBasedForwardingAlgorithm(), LongPositionVector(), operator=(), LocationTableEntry::print(), GUCPacket::setDePv(), and GeoNet::simpleForwardingAlgorithm().

Here is the caller graph for this function:

◆ longitude()

qint32 LongPositionVector::longitude ( ) const
inline

longitude Longitude field getter

Returns
Longitude field

Definition at line 115 of file LongPositionVector.h.

References m_longitude.

Referenced by GeoNet::advancedForwarding(), GeoNet::CBFUnicast(), GeoNet::contentionBasedForwardingAlgorithm(), LongPositionVector(), operator=(), LocationTableEntry::print(), GUCPacket::setDePv(), and GeoNet::simpleForwardingAlgorithm().

Here is the caller graph for this function:

◆ operator=()

LongPositionVector & LongPositionVector::operator= ( const LongPositionVector other)

operator = Overload of = operator

Parameters
lpvLongPositionVector to assign
Returns
Will return this object updated

Definition at line 62 of file LongPositionVector.cpp.

References gnAddr(), heading(), latitude(), longitude(), m_gnAddr, m_heading, m_latitude, m_longitude, m_pai_Speed, m_timestamp, pai_Speed(), and timestamp().

Here is the call graph for this function:

◆ pai()

quint8 LongPositionVector::pai ( ) const
inline

pai Pai field getter (1 bit)

Returns
Pai_Speed field

Definition at line 125 of file LongPositionVector.h.

References m_pai_Speed.

Referenced by LongPositionVector().

Here is the caller graph for this function:

◆ pai_Speed()

quint16 LongPositionVector::pai_Speed ( ) const
inline

pai_Speed Pai_Speed field getter (16 bits)

Returns
Pai_Speed field

Definition at line 120 of file LongPositionVector.h.

References m_pai_Speed.

Referenced by LongPositionVector(), operator=(), and LocationTableEntry::print().

Here is the caller graph for this function:

◆ speed()

quint16 LongPositionVector::speed ( ) const
inline

speed Speed field getter (15 bits)

Returns
Speed field

Definition at line 130 of file LongPositionVector.h.

References m_pai_Speed.

Referenced by LongPositionVector().

Here is the caller graph for this function:

◆ timestamp()

◆ toHex()

QByteArray LongPositionVector::toHex ( )

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

Returns
The created QByteArray.

Definition at line 87 of file LongPositionVector.cpp.

References GnAddr::helper_size, m_gnAddr, m_heading, m_latitude, m_longitude, m_pai_Speed, m_timestamp, and GnAddr::toHex().

Referenced by BeaconPacket::toHex(), SHBPacket::toHex(), LSRequestPacket::toHex(), TSBPacket::toHex(), GUCPacket::toHex(), and GBCPacket::toHex().

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

Member Data Documentation

◆ m_gnAddr

GnAddr LongPositionVector::m_gnAddr
private

GN_ADDR field.

Definition at line 138 of file LongPositionVector.h.

Referenced by extract(), gnAddr(), LongPositionVector(), operator=(), and toHex().

◆ m_heading

quint16 LongPositionVector::m_heading
private

Heading field.

Definition at line 143 of file LongPositionVector.h.

Referenced by extract(), heading(), LongPositionVector(), operator=(), and toHex().

◆ m_latitude

qint32 LongPositionVector::m_latitude
private

Latitude field.

Definition at line 140 of file LongPositionVector.h.

Referenced by extract(), latitude(), LongPositionVector(), operator=(), and toHex().

◆ m_longitude

qint32 LongPositionVector::m_longitude
private

Longitude field.

Definition at line 141 of file LongPositionVector.h.

Referenced by extract(), longitude(), LongPositionVector(), operator=(), and toHex().

◆ m_pai_Speed

quint16 LongPositionVector::m_pai_Speed
private

PAI (1 bit) + Speed (15 bits) fields.

Definition at line 142 of file LongPositionVector.h.

Referenced by extract(), LongPositionVector(), operator=(), pai(), pai_Speed(), speed(), and toHex().

◆ m_timestamp

quint32 LongPositionVector::m_timestamp
private

Timestamp field (Timestamp % 2³²).

Definition at line 139 of file LongPositionVector.h.

Referenced by extract(), LongPositionVector(), operator=(), timestamp(), and toHex().


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