ITS
UnicastForwardingPacketBuffer Class Reference

#include <UnicastForwardingPacketBuffer.h>

Public Member Functions

 UnicastForwardingPacketBuffer ()
 UnicastForwardingPacketBuffer Default constructor. More...
 
 UnicastForwardingPacketBuffer (const UnicastForwardingPacketBuffer &other)
 UnicastForwardingPacketBuffer Copy constructor. More...
 
void addPacket (BasicHeader bh, CommonHeader ch, GUCPacket packet, QByteArray payload, QByteArray sender)
 addPacket Add packet to the buffer. More...
 
bool isDuplicateTimestamp (GUCPacket packet)
 isDuplicateTimestamp Check is the packet is duplicate. More...
 
bool erase (GUCPacket packet)
 erase Remove packet from the buffer. More...
 
void clear ()
 clear Clear the buffer. More...
 
QVector< UnicastForwardingPacketEntryucForwardPacketBuffer () const
 ucForwardPacketBuffer Buffer getter. More...
 

Public Attributes

QMutex * m_mutex
 

Static Public Attributes

static int nbUCForwardingPacketQueued = 0
 

Private Attributes

QVector< UnicastForwardingPacketEntrym_ucForwardPacketBuffer
 

Detailed Description

Definition at line 17 of file UnicastForwardingPacketBuffer.h.

Constructor & Destructor Documentation

◆ UnicastForwardingPacketBuffer() [1/2]

UnicastForwardingPacketBuffer::UnicastForwardingPacketBuffer ( )

UnicastForwardingPacketBuffer Default constructor.

Definition at line 5 of file UnicastForwardingPacketBuffer.cpp.

References m_mutex.

◆ UnicastForwardingPacketBuffer() [2/2]

UnicastForwardingPacketBuffer::UnicastForwardingPacketBuffer ( const UnicastForwardingPacketBuffer other)

UnicastForwardingPacketBuffer Copy constructor.

Parameters
otherThe UnicastForwardingPacketBuffer to copy.

Definition at line 10 of file UnicastForwardingPacketBuffer.cpp.

References m_mutex, and m_ucForwardPacketBuffer.

Member Function Documentation

◆ addPacket()

void UnicastForwardingPacketBuffer::addPacket ( BasicHeader  bh,
CommonHeader  ch,
GUCPacket  packet,
QByteArray  payload,
QByteArray  sender 
)

addPacket Add packet to the buffer.

Parameters
bhPacket Basic Header.
chPacket Common Header.
packetThe packet.
payloadThe packet payload.
senderThe sender.

Definition at line 16 of file UnicastForwardingPacketBuffer.cpp.

References itsGnUcForwardingPacketBufferSize, UnicastForwardingPacketEntry::m_elapsed, m_mutex, m_ucForwardPacketBuffer, and nbUCForwardingPacketQueued.

Referenced by GeoNet::greedy().

Here is the caller graph for this function:

◆ clear()

void UnicastForwardingPacketBuffer::clear ( )

clear Clear the buffer.

Definition at line 61 of file UnicastForwardingPacketBuffer.cpp.

References m_mutex, m_ucForwardPacketBuffer, and nbUCForwardingPacketQueued.

Referenced by GeoNet::utInitialize().

Here is the caller graph for this function:

◆ erase()

bool UnicastForwardingPacketBuffer::erase ( GUCPacket  packet)

erase Remove packet from the buffer.

Parameters
packetThe packet (GBC case).
Returns
True if the remove succeed.

Definition at line 36 of file UnicastForwardingPacketBuffer.cpp.

References isDuplicatePacketDetectionTimestampSN(), m_ucForwardPacketBuffer, nbUCForwardingPacketQueued, GUCPacket::sequenceNumber(), GUCPacket::soPv(), and LongPositionVector::timestamp().

Referenced by GeoNet::checkUCFPB(), and GeoNet::flushUCFPB().

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

◆ isDuplicateTimestamp()

bool UnicastForwardingPacketBuffer::isDuplicateTimestamp ( GUCPacket  packet)

isDuplicateTimestamp Check is the packet is duplicate.

Parameters
packetThe packet.
Returns
True if the packet is a duplicate one.

Definition at line 50 of file UnicastForwardingPacketBuffer.cpp.

References isDuplicatePacketDetectionTimestampSN(), m_mutex, m_ucForwardPacketBuffer, GUCPacket::sequenceNumber(), GUCPacket::soPv(), and LongPositionVector::timestamp().

Here is the call graph for this function:

◆ ucForwardPacketBuffer()

QVector<UnicastForwardingPacketEntry> UnicastForwardingPacketBuffer::ucForwardPacketBuffer ( ) const
inline

ucForwardPacketBuffer Buffer getter.

Returns
The buffer.

Definition at line 66 of file UnicastForwardingPacketBuffer.h.

References m_ucForwardPacketBuffer.

Referenced by GeoNet::checkUCFPB(), and GeoNet::flushUCFPB().

Here is the caller graph for this function:

Member Data Documentation

◆ m_mutex

QMutex* UnicastForwardingPacketBuffer::m_mutex

Mutex used to look at the buffer.

Definition at line 60 of file UnicastForwardingPacketBuffer.h.

Referenced by addPacket(), clear(), isDuplicateTimestamp(), and UnicastForwardingPacketBuffer().

◆ m_ucForwardPacketBuffer

QVector<UnicastForwardingPacketEntry> UnicastForwardingPacketBuffer::m_ucForwardPacketBuffer
private

◆ nbUCForwardingPacketQueued

int UnicastForwardingPacketBuffer::nbUCForwardingPacketQueued = 0
static

Number of entries in the buffer.

Definition at line 53 of file UnicastForwardingPacketBuffer.h.

Referenced by addPacket(), clear(), and erase().


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