ITS
LocationServicePacketBuffer Class Reference

#include <LocationServicePacketBuffer.h>

Public Member Functions

 LocationServicePacketBuffer ()
 LocationServicePacketBuffer Default constructor. More...
 
 LocationServicePacketBuffer (const LocationServicePacketBuffer &other)
 LocationServicePacketBuffer Copy constructor. More...
 
void addPacket (GnAddr destination, gnDataRequest_t packet, quint32 timestamp)
 addPacket Add packet to the buffer. More...
 
bool find (GnAddr destination)
 find Search packet in the buffer. More...
 
void erase (GnAddr destination)
 find Remove packet in the buffer. More...
 
void remove (LocationServicePacketEntry lspe)
 find Remove packet in the buffer. More...
 
void clear ()
 clear Clear the buffer. More...
 
QList< LocationServicePacketEntrylsPacketBuffer ()
 lsPacketBuffer The LS buffer getter. More...
 

Public Attributes

QMutex * m_mutex
 

Static Public Attributes

static int nbLSForwardingPacketQueued = 0
 

Private Attributes

QList< LocationServicePacketEntrym_lsPacketBuffer
 

Detailed Description

Definition at line 16 of file LocationServicePacketBuffer.h.

Constructor & Destructor Documentation

◆ LocationServicePacketBuffer() [1/2]

LocationServicePacketBuffer::LocationServicePacketBuffer ( )

LocationServicePacketBuffer Default constructor.

Definition at line 5 of file LocationServicePacketBuffer.cpp.

References m_mutex.

◆ LocationServicePacketBuffer() [2/2]

LocationServicePacketBuffer::LocationServicePacketBuffer ( const LocationServicePacketBuffer other)

LocationServicePacketBuffer Copy constructor.

Parameters
otherThe LocationServicePacketBuffer to copy.

Definition at line 10 of file LocationServicePacketBuffer.cpp.

References m_lsPacketBuffer, and m_mutex.

Member Function Documentation

◆ addPacket()

void LocationServicePacketBuffer::addPacket ( GnAddr  destination,
gnDataRequest_t  packet,
quint32  timestamp 
)

addPacket Add packet to the buffer.

Parameters
destinationThe destination.
packetThe packet.
timestampTimestamp of the packet.

Definition at line 16 of file LocationServicePacketBuffer.cpp.

References itsGnLocationServicePacketBufferSize, m_lsPacketBuffer, m_mutex, and nbLSForwardingPacketQueued.

Referenced by GeoNet::sendLsRequest().

Here is the caller graph for this function:

◆ clear()

void LocationServicePacketBuffer::clear ( )

clear Clear the buffer.

Definition at line 90 of file LocationServicePacketBuffer.cpp.

References m_lsPacketBuffer, m_mutex, and nbLSForwardingPacketQueued.

Referenced by GeoNet::utInitialize().

Here is the caller graph for this function:

◆ erase()

void LocationServicePacketBuffer::erase ( GnAddr  destination)

find Remove packet in the buffer.

Parameters
destinationThe packet to remove.

Definition at line 58 of file LocationServicePacketBuffer.cpp.

References m_lsPacketBuffer, m_mutex, and nbLSForwardingPacketQueued.

Referenced by GeoNet::lsRetransmit().

Here is the caller graph for this function:

◆ find()

bool LocationServicePacketBuffer::find ( GnAddr  destination)

find Search packet in the buffer.

Parameters
destinationThe packet to find.
Returns
True if the packet is in the buffer.

Definition at line 37 of file LocationServicePacketBuffer.cpp.

References m_lsPacketBuffer, and m_mutex.

◆ lsPacketBuffer()

QList<LocationServicePacketEntry> LocationServicePacketBuffer::lsPacketBuffer ( )
inline

lsPacketBuffer The LS buffer getter.

Returns
The LS buffer.

Definition at line 67 of file LocationServicePacketBuffer.h.

References m_lsPacketBuffer.

Referenced by GeoNet::flushLSPB().

Here is the caller graph for this function:

◆ remove()

void LocationServicePacketBuffer::remove ( LocationServicePacketEntry  lspe)

find Remove packet in the buffer.

Parameters
destinationThe packet to remove.

Definition at line 79 of file LocationServicePacketBuffer.cpp.

References m_lsPacketBuffer, and m_mutex.

Referenced by GeoNet::flushLSPB().

Here is the caller graph for this function:

Member Data Documentation

◆ m_lsPacketBuffer

QList<LocationServicePacketEntry> LocationServicePacketBuffer::m_lsPacketBuffer
private

◆ m_mutex

QMutex* LocationServicePacketBuffer::m_mutex

Mutex used to look in thebuffer.

Definition at line 61 of file LocationServicePacketBuffer.h.

Referenced by addPacket(), clear(), erase(), find(), LocationServicePacketBuffer(), and remove().

◆ nbLSForwardingPacketQueued

int LocationServicePacketBuffer::nbLSForwardingPacketQueued = 0
static

Number of entries in the buffer.

Definition at line 54 of file LocationServicePacketBuffer.h.

Referenced by addPacket(), clear(), erase(), and GeoNet::flushLSPB().


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