ITS
|
#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< UnicastForwardingPacketEntry > | ucForwardPacketBuffer () const |
ucForwardPacketBuffer Buffer getter. More... | |
Public Attributes | |
QMutex * | m_mutex |
Static Public Attributes | |
static int | nbUCForwardingPacketQueued = 0 |
Private Attributes | |
QVector< UnicastForwardingPacketEntry > | m_ucForwardPacketBuffer |
Definition at line 17 of file UnicastForwardingPacketBuffer.h.
UnicastForwardingPacketBuffer::UnicastForwardingPacketBuffer | ( | ) |
UnicastForwardingPacketBuffer Default constructor.
Definition at line 5 of file UnicastForwardingPacketBuffer.cpp.
References m_mutex.
UnicastForwardingPacketBuffer::UnicastForwardingPacketBuffer | ( | const UnicastForwardingPacketBuffer & | other | ) |
UnicastForwardingPacketBuffer Copy constructor.
other | The UnicastForwardingPacketBuffer to copy. |
Definition at line 10 of file UnicastForwardingPacketBuffer.cpp.
References m_mutex, and m_ucForwardPacketBuffer.
void UnicastForwardingPacketBuffer::addPacket | ( | BasicHeader | bh, |
CommonHeader | ch, | ||
GUCPacket | packet, | ||
QByteArray | payload, | ||
QByteArray | sender | ||
) |
addPacket Add packet to the buffer.
bh | Packet Basic Header. |
ch | Packet Common Header. |
packet | The packet. |
payload | The packet payload. |
sender | The sender. |
Definition at line 16 of file UnicastForwardingPacketBuffer.cpp.
References itsGnUcForwardingPacketBufferSize, UnicastForwardingPacketEntry::m_elapsed, m_mutex, m_ucForwardPacketBuffer, and nbUCForwardingPacketQueued.
Referenced by GeoNet::greedy().
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().
bool UnicastForwardingPacketBuffer::erase | ( | GUCPacket | packet | ) |
erase Remove packet from the buffer.
packet | The packet (GBC case). |
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().
bool UnicastForwardingPacketBuffer::isDuplicateTimestamp | ( | GUCPacket | packet | ) |
isDuplicateTimestamp Check is the packet is duplicate.
packet | The packet. |
Definition at line 50 of file UnicastForwardingPacketBuffer.cpp.
References isDuplicatePacketDetectionTimestampSN(), m_mutex, m_ucForwardPacketBuffer, GUCPacket::sequenceNumber(), GUCPacket::soPv(), and LongPositionVector::timestamp().
|
inline |
ucForwardPacketBuffer Buffer getter.
Definition at line 66 of file UnicastForwardingPacketBuffer.h.
References m_ucForwardPacketBuffer.
Referenced by GeoNet::checkUCFPB(), and GeoNet::flushUCFPB().
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().
|
private |
The buffer.
Definition at line 69 of file UnicastForwardingPacketBuffer.h.
Referenced by addPacket(), clear(), erase(), isDuplicateTimestamp(), ucForwardPacketBuffer(), and UnicastForwardingPacketBuffer().
|
static |
Number of entries in the buffer.
Definition at line 53 of file UnicastForwardingPacketBuffer.h.
Referenced by addPacket(), clear(), and erase().