ITS
GBCPacket Class Reference

#include <GBCPacket.h>

Inheritance diagram for GBCPacket:
[legend]
Collaboration diagram for GBCPacket:
[legend]

Public Types

enum  e_helper { helper_size = 4 + LongPositionVector::helper_size + DestinationArea::helper_size }
 The e_helper enum is used to help to have sizes. More...
 

Public Member Functions

 GBCPacket ()
 GBCPacket GBCPacket constructor. More...
 
 GBCPacket (quint16 sequenceNumber, LongPositionVector lpv, DestinationArea da)
 GBCPacket GBCPacket initialization constructor. More...
 
 GBCPacket (const GBCPacket &other)
 GBCPacket GBCPacket copy constructor. More...
 
 ~GBCPacket ()
 ~GBCPacket The GBCPacket destructor. More...
 
GBCPacket operator= (const GBCPacket &other)
 operator= GBCPacket affectation operator. More...
 
bool operator== (const GBCPacket &other)
 operator== GBCPacket equal operator. More...
 
quint64 extract (uchar *packet)
 extract Extract GBC from packet. More...
 
QByteArray toHex ()
 toHex Create a QByteArray containing the hexadecimal format of the GBCPacket. More...
 
quint16 sequenceNumber () const
 sequenceNumber Sequence number getter. More...
 
LongPositionVector soPv () const
 soPv SO PV getter. More...
 
DestinationArea destinationArea () const
 destinationArea Destination area getter. More...
 
void setSoPv (LongPositionVector lpv)
 setSoPv SO PV setter. More...
 
void setSN (quint16 sn)
 setSN Sequence number setter. More...
 

Protected Attributes

quint16 m_sequenceNumber
 
quint16 m_reserved
 
LongPositionVector m_soPv
 
DestinationArea m_destinationArea
 

Detailed Description

Definition at line 27 of file GBCPacket.h.

Member Enumeration Documentation

◆ e_helper

The e_helper enum is used to help to have sizes.

Enumerator
helper_size 

Size of the GBC in bytes.

Definition at line 33 of file GBCPacket.h.

Constructor & Destructor Documentation

◆ GBCPacket() [1/3]

GBCPacket::GBCPacket ( )

GBCPacket GBCPacket constructor.

Definition at line 3 of file GBCPacket.cpp.

References m_reserved.

◆ GBCPacket() [2/3]

GBCPacket::GBCPacket ( quint16  sequenceNumber,
LongPositionVector  lpv,
DestinationArea  da 
)

GBCPacket GBCPacket initialization constructor.

Parameters
sequenceNumberGBC sequence number.
lpvGBC SO PV.
daDestination area.

Definition at line 8 of file GBCPacket.cpp.

References m_destinationArea, m_reserved, m_sequenceNumber, m_soPv, and sequenceNumber().

Here is the call graph for this function:

◆ GBCPacket() [3/3]

GBCPacket::GBCPacket ( const GBCPacket other)

GBCPacket GBCPacket copy constructor.

Parameters
otherThe GBCPacket to copy.

Definition at line 16 of file GBCPacket.cpp.

References m_destinationArea, m_reserved, m_sequenceNumber, m_soPv, and soPv().

Here is the call graph for this function:

◆ ~GBCPacket()

GBCPacket::~GBCPacket ( )

~GBCPacket The GBCPacket destructor.

Definition at line 39 of file GBCPacket.cpp.

Member Function Documentation

◆ destinationArea()

DestinationArea GBCPacket::destinationArea ( ) const
inline

destinationArea Destination area getter.

Returns
The destination area.

Definition at line 100 of file GBCPacket.h.

References m_destinationArea.

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

Here is the caller graph for this function:

◆ extract()

quint64 GBCPacket::extract ( uchar *  packet)

extract Extract GBC from packet.

Parameters
packetThe packet to extract.
Returns
The number of bytes read.

Definition at line 43 of file GBCPacket.cpp.

References DestinationArea::extract(), LongPositionVector::extract(), get_UINT16(), m_destinationArea, m_reserved, m_sequenceNumber, and m_soPv.

Referenced by GeoNet::gacPacketProcessing(), and GeoNet::gbcPacketProcessing().

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

◆ operator=()

GBCPacket GBCPacket::operator= ( const GBCPacket other)

operator= GBCPacket affectation operator.

Parameters
otherThe GBCPacket to affect.
Returns
The affected GBCPacket.

Definition at line 24 of file GBCPacket.cpp.

References m_destinationArea, m_reserved, m_sequenceNumber, m_soPv, and soPv().

Here is the call graph for this function:

◆ operator==()

bool GBCPacket::operator== ( const GBCPacket other)

operator== GBCPacket equal operator.

Parameters
otherThe GBCPacket to compare.
Returns
True if they are equal.

Definition at line 33 of file GBCPacket.cpp.

References isDuplicatePacketDetectionTimestampSN(), m_sequenceNumber, m_soPv, and LongPositionVector::timestamp().

Here is the call graph for this function:

◆ sequenceNumber()

quint16 GBCPacket::sequenceNumber ( ) const
inline

sequenceNumber Sequence number getter.

Returns
The sequence number.

Definition at line 90 of file GBCPacket.h.

References m_sequenceNumber.

Referenced by HistoryPacketBuffer::addPacket(), GeoNet::advancedForwarding(), GeoNet::CBFUnicast(), CBFPacketBuffer::erase(), GBCPacket(), CBFPacketBuffer::isDuplicateTimestamp(), BroadcastForwardingPacketBuffer::isDuplicateTimestamp(), HistoryPacketBuffer::isDuplicateTimestamp(), BroadcastForwardingPacketEntry::operator==(), PacketBuffersEntry::operator==(), CBFPacketBuffer::sendPacket(), CBFPacketBuffer::stopPacket(), and CBFPacketBuffer::update().

Here is the caller graph for this function:

◆ setSN()

void GBCPacket::setSN ( quint16  sn)
inline

setSN Sequence number setter.

Parameters
snThe new sequence number.

Definition at line 111 of file GBCPacket.h.

References m_sequenceNumber.

◆ setSoPv()

void GBCPacket::setSoPv ( LongPositionVector  lpv)
inline

setSoPv SO PV setter.

Parameters
lpvThe new SO PV.

Definition at line 106 of file GBCPacket.h.

References m_soPv.

Referenced by CBFPacketEntry::sendPacket(), and BroadcastForwardingPacketEntry::updateSourcePacketSoPv().

Here is the caller graph for this function:

◆ soPv()

◆ toHex()

QByteArray GBCPacket::toHex ( )

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

Returns
The created QByteArray.

Definition at line 55 of file GBCPacket.cpp.

References LongPositionVector::helper_size, DestinationArea::helper_size, m_destinationArea, m_reserved, m_sequenceNumber, m_soPv, DestinationArea::toHex(), and LongPositionVector::toHex().

Referenced by GeoNet::checkBCFPB(), and CBFPacketEntry::sendPacket().

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

Member Data Documentation

◆ m_destinationArea

DestinationArea GBCPacket::m_destinationArea
protected

Destination area.

Definition at line 117 of file GBCPacket.h.

Referenced by destinationArea(), extract(), GBCPacket(), operator=(), and toHex().

◆ m_reserved

quint16 GBCPacket::m_reserved
protected

Reserved field.

Definition at line 115 of file GBCPacket.h.

Referenced by extract(), GBCPacket(), operator=(), and toHex().

◆ m_sequenceNumber

quint16 GBCPacket::m_sequenceNumber
protected

The sequence number.

Definition at line 114 of file GBCPacket.h.

Referenced by extract(), GBCPacket(), operator=(), operator==(), sequenceNumber(), setSN(), and toHex().

◆ m_soPv

LongPositionVector GBCPacket::m_soPv
protected

The SO PV.

Definition at line 116 of file GBCPacket.h.

Referenced by extract(), GBCPacket(), operator=(), operator==(), setSoPv(), soPv(), and toHex().


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