|
ITS
|
#include <CBFPacketBuffer.h>
Public Slots | |
| void | sendPacket (GBCPacket packet) |
| sendPacket Slot used to send packet (GBC case). More... | |
| void | sendPacket (GUCPacket packet) |
| sendPacket Slot used to send packet (GUC case). More... | |
| void | sendPacket (LSReplyPacket packet) |
| sendPacket Slot used to send packet (LSReply case). More... | |
| void | stopPacket (GBCPacket packet) |
| stopPacket Slot used to stop the packet (GBC case). More... | |
| void | stopPacket (GUCPacket packet) |
| stopPacket Slot used to stop the packet (GUC case). More... | |
| void | stopPacket (LSReplyPacket packet) |
| stopPacket Slot used to stop the packet (LSReply case). More... | |
Signals | |
| void | lpvSent () |
| lpvSent Signal sent to advertised of an LPV sending. More... | |
| void | killAll () |
| killAll Signal used to kill all the buffer entries. More... | |
Public Member Functions | |
| CBFPacketBuffer () | |
| CBFPacketBuffer Default constructor. More... | |
| CBFPacketBuffer (ParameterNetwork *paramNetwork, QHash< QByteArray, LocationTableEntry > *locT, GnAddr *gnaddr, FakeGPSProvider *paramGPS, HistoryPacketBuffer *HPB, quint16 *SN, QHash< QByteArray, int > *CBFPBCounter) | |
| CBFPacketBuffer Initialization constructor. More... | |
| CBFPacketBuffer (const CBFPacketBuffer &other) | |
| CBFPacketBuffer Copy constructor. More... | |
| int | addPacket (BasicHeader bh, CommonHeader ch, GBCPacket packet, QByteArray payload, int timeToBuffer) |
| addPacket Add packet to the buffer. More... | |
| int | addPacket (BasicHeader bh, CommonHeader ch, GUCPacket packet, QByteArray payload, int timeToBuffer) |
| addPacket Add packet to the buffer. More... | |
| int | addPacket (BasicHeader bh, CommonHeader ch, LSReplyPacket packet, QByteArray payload, int timeToBuffer) |
| addPacket Add packet to the buffer. More... | |
| bool | isDuplicateTimestamp (GBCPacket packet) |
| isDuplicateTimestamp Check is the packet is duplicate. More... | |
| bool | isDuplicateTimestamp (GUCPacket packet) |
| isDuplicateTimestamp Check is the packet is duplicate. More... | |
| bool | isDuplicateTimestamp (LSReplyPacket packet) |
| isDuplicateTimestamp Check is the packet is duplicate. More... | |
| bool | erase (GBCPacket packet) |
| erase Remove packet from the buffer. More... | |
| bool | erase (GUCPacket packet) |
| erase Remove packet from the buffer. More... | |
| bool | erase (LSReplyPacket packet) |
| erase Remove packet from the buffer. More... | |
| bool | update (GBCPacket packet, int timeToBuffer) |
| update Update the packet of the buffer. More... | |
| bool | update (GUCPacket packet, int timeToBuffer) |
| update Update the packet of the buffer. More... | |
| bool | update (LSReplyPacket packet, int timeToBuffer) |
| update Update the packet of the buffer. More... | |
| void | clear () |
| clear Clear the buffer. More... | |
Public Attributes | |
| QMutex * | m_mutex |
Static Public Attributes | |
| static int | nbCBFPacketQueued = 0 |
Private Attributes | |
| QVector< CBFPacketEntry * > | m_CBFPacketBuffer |
| QHash< QByteArray, LocationTableEntry > * | m_locationTable |
| ParameterNetwork * | m_paramNetwork |
| FakeGPSProvider * | m_paramGPS |
| GnAddr * | m_gnAddr |
| HistoryPacketBuffer * | m_HPB |
| quint16 * | sequenceNumber |
| QHash< QByteArray, int > * | m_CBFPBCounter |
Definition at line 18 of file CBFPacketBuffer.h.
| CBFPacketBuffer::CBFPacketBuffer | ( | ) |
CBFPacketBuffer Default constructor.
Definition at line 5 of file CBFPacketBuffer.cpp.
References m_CBFPBCounter, m_HPB, m_locationTable, m_mutex, m_paramGPS, and m_paramNetwork.
| CBFPacketBuffer::CBFPacketBuffer | ( | ParameterNetwork * | paramNetwork, |
| QHash< QByteArray, LocationTableEntry > * | locT, | ||
| GnAddr * | gnaddr, | ||
| FakeGPSProvider * | paramGPS, | ||
| HistoryPacketBuffer * | HPB, | ||
| quint16 * | SN, | ||
| QHash< QByteArray, int > * | CBFPBCounter | ||
| ) |
CBFPacketBuffer Initialization constructor.
| gps | GPS Provider |
| locT | Location table |
Definition at line 15 of file CBFPacketBuffer.cpp.
References m_CBFPBCounter, m_gnAddr, m_HPB, m_locationTable, m_mutex, m_paramGPS, m_paramNetwork, and sequenceNumber.
| CBFPacketBuffer::CBFPacketBuffer | ( | const CBFPacketBuffer & | other | ) |
CBFPacketBuffer Copy constructor.
| other | The CBFPacketBuffer to copy. |
Definition at line 27 of file CBFPacketBuffer.cpp.
References m_CBFPacketBuffer, m_CBFPBCounter, m_gnAddr, m_HPB, m_locationTable, m_mutex, m_paramGPS, m_paramNetwork, and sequenceNumber.
| int CBFPacketBuffer::addPacket | ( | BasicHeader | bh, |
| CommonHeader | ch, | ||
| GBCPacket | packet, | ||
| QByteArray | payload, | ||
| int | timeToBuffer | ||
| ) |
addPacket Add packet to the buffer.
| bh | Packet Basic Header. |
| ch | Packet Common Header. |
| packet | The packet (GBC case). |
| payload | The packet payload. |
| timeToBuffer | Time to be in the buffer. |
Definition at line 40 of file CBFPacketBuffer.cpp.
References isDuplicateTimestamp(), itsGnCbfPacketbufferSize, killAll(), m_CBFPacketBuffer, m_gnAddr, m_HPB, m_paramGPS, m_paramNetwork, nbCBFPacketQueued, sendPacket(), sequenceNumber, and stopPacket().
Referenced by GeoNet::advancedForwarding(), GeoNet::CBFUnicast(), and GeoNet::contentionBasedForwardingAlgorithm().
| int CBFPacketBuffer::addPacket | ( | BasicHeader | bh, |
| CommonHeader | ch, | ||
| GUCPacket | packet, | ||
| QByteArray | payload, | ||
| int | timeToBuffer | ||
| ) |
addPacket Add packet to the buffer.
| bh | Packet Basic Header. |
| ch | Packet Common Header. |
| packet | The packet (GUC case). |
| payload | The packet payload. |
| timeToBuffer | Time to be in the buffer. |
Definition at line 76 of file CBFPacketBuffer.cpp.
References isDuplicateTimestamp(), itsGnCbfPacketbufferSize, killAll(), m_CBFPacketBuffer, m_gnAddr, m_HPB, m_paramGPS, m_paramNetwork, nbCBFPacketQueued, sendPacket(), sequenceNumber, and stopPacket().
| int CBFPacketBuffer::addPacket | ( | BasicHeader | bh, |
| CommonHeader | ch, | ||
| LSReplyPacket | packet, | ||
| QByteArray | payload, | ||
| int | timeToBuffer | ||
| ) |
addPacket Add packet to the buffer.
| bh | Packet Basic Header. |
| ch | Packet Common Header. |
| packet | The packet (LSReply case). |
| payload | The packet payload. |
| timeToBuffer | Time to be in the buffer. |
Definition at line 112 of file CBFPacketBuffer.cpp.
References isDuplicateTimestamp(), itsGnCbfPacketbufferSize, killAll(), m_CBFPacketBuffer, m_gnAddr, m_HPB, m_paramGPS, m_paramNetwork, nbCBFPacketQueued, sendPacket(), sequenceNumber, and stopPacket().
| void CBFPacketBuffer::clear | ( | ) |
clear Clear the buffer.
Definition at line 256 of file CBFPacketBuffer.cpp.
References killAll(), m_CBFPacketBuffer, and nbCBFPacketQueued.
Referenced by GeoNet::utInitialize().
| bool CBFPacketBuffer::erase | ( | GBCPacket | packet | ) |
erase Remove packet from the buffer.
| packet | The packet (GBC case). |
Definition at line 211 of file CBFPacketBuffer.cpp.
References isDuplicatePacketDetectionTimestampSN(), m_CBFPacketBuffer, nbCBFPacketQueued, GBCPacket::sequenceNumber(), GBCPacket::soPv(), and LongPositionVector::timestamp().
Referenced by GeoNet::advancedForwarding(), GeoNet::CBFUnicast(), GeoNet::contentionBasedForwardingAlgorithm(), sendPacket(), and stopPacket().
| bool CBFPacketBuffer::erase | ( | GUCPacket | packet | ) |
erase Remove packet from the buffer.
| packet | The packet (GUC case). |
Definition at line 226 of file CBFPacketBuffer.cpp.
References isDuplicatePacketDetectionTimestampSN(), m_CBFPacketBuffer, nbCBFPacketQueued, GUCPacket::sequenceNumber(), GUCPacket::soPv(), and LongPositionVector::timestamp().
| bool CBFPacketBuffer::erase | ( | LSReplyPacket | packet | ) |
erase Remove packet from the buffer.
| packet | The packet (LSReply case). |
Definition at line 241 of file CBFPacketBuffer.cpp.
References isDuplicatePacketDetectionTimestampSN(), m_CBFPacketBuffer, nbCBFPacketQueued, GUCPacket::sequenceNumber(), GUCPacket::soPv(), and LongPositionVector::timestamp().
| bool CBFPacketBuffer::isDuplicateTimestamp | ( | GBCPacket | packet | ) |
isDuplicateTimestamp Check is the packet is duplicate.
| packet | The packet (GBC case). |
Definition at line 184 of file CBFPacketBuffer.cpp.
References CommonHeader::headerType_geoAnycast, CommonHeader::headerType_geoBroadcast, isDuplicatePacketDetectionTimestampSN(), m_CBFPacketBuffer, GBCPacket::sequenceNumber(), GBCPacket::soPv(), and LongPositionVector::timestamp().
Referenced by addPacket(), GeoNet::advancedForwarding(), GeoNet::CBFUnicast(), and GeoNet::contentionBasedForwardingAlgorithm().
| bool CBFPacketBuffer::isDuplicateTimestamp | ( | GUCPacket | packet | ) |
isDuplicateTimestamp Check is the packet is duplicate.
| packet | The packet (GUC case). |
Definition at line 193 of file CBFPacketBuffer.cpp.
References CommonHeader::headerType_geoUnicast, isDuplicatePacketDetectionTimestampSN(), m_CBFPacketBuffer, GUCPacket::sequenceNumber(), GUCPacket::soPv(), and LongPositionVector::timestamp().
| bool CBFPacketBuffer::isDuplicateTimestamp | ( | LSReplyPacket | packet | ) |
isDuplicateTimestamp Check is the packet is duplicate.
| packet | The packet (LSRequest case). |
Definition at line 202 of file CBFPacketBuffer.cpp.
References CommonHeader::headerSubTypeLocationService_Reply, CommonHeader::headerType_locationService, isDuplicatePacketDetectionTimestampSN(), m_CBFPacketBuffer, GUCPacket::sequenceNumber(), GUCPacket::soPv(), and LongPositionVector::timestamp().
|
signal |
killAll Signal used to kill all the buffer entries.
Referenced by addPacket(), and clear().
|
signal |
lpvSent Signal sent to advertised of an LPV sending.
Referenced by sendPacket().
|
slot |
sendPacket Slot used to send packet (GBC case).
| packet | The GBC to send. |
Definition at line 263 of file CBFPacketBuffer.cpp.
References erase(), LongPositionVector::gnAddr(), GnAddr::helper_size, lpvSent(), m_CBFPBCounter, GBCPacket::sequenceNumber(), GBCPacket::soPv(), LongPositionVector::timestamp(), and GnAddr::toHex().
Referenced by addPacket().
|
slot |
sendPacket Slot used to send packet (GUC case).
| packet | The GUC to send. |
Definition at line 270 of file CBFPacketBuffer.cpp.
References erase(), LongPositionVector::gnAddr(), GnAddr::helper_size, lpvSent(), m_CBFPBCounter, GUCPacket::sequenceNumber(), GUCPacket::soPv(), LongPositionVector::timestamp(), and GnAddr::toHex().
|
slot |
sendPacket Slot used to send packet (LSReply case).
| packet | The LSReply to send. |
Definition at line 277 of file CBFPacketBuffer.cpp.
References erase(), LongPositionVector::gnAddr(), GnAddr::helper_size, lpvSent(), m_CBFPBCounter, GUCPacket::sequenceNumber(), GUCPacket::soPv(), LongPositionVector::timestamp(), and GnAddr::toHex().
|
slot |
stopPacket Slot used to stop the packet (GBC case).
| packet | The GBC packet to stop. |
Definition at line 284 of file CBFPacketBuffer.cpp.
References erase(), LongPositionVector::gnAddr(), GnAddr::helper_size, m_CBFPBCounter, GBCPacket::sequenceNumber(), GBCPacket::soPv(), LongPositionVector::timestamp(), and GnAddr::toHex().
Referenced by addPacket().
|
slot |
stopPacket Slot used to stop the packet (GUC case).
| packet | The GUC packet to stop. |
Definition at line 290 of file CBFPacketBuffer.cpp.
References erase(), LongPositionVector::gnAddr(), GnAddr::helper_size, m_CBFPBCounter, GUCPacket::sequenceNumber(), GUCPacket::soPv(), LongPositionVector::timestamp(), and GnAddr::toHex().
|
slot |
stopPacket Slot used to stop the packet (LSReply case).
| packet | The LSReply packet to stop. |
Definition at line 296 of file CBFPacketBuffer.cpp.
References erase(), LongPositionVector::gnAddr(), GnAddr::helper_size, m_CBFPBCounter, GUCPacket::sequenceNumber(), GUCPacket::soPv(), LongPositionVector::timestamp(), and GnAddr::toHex().
| bool CBFPacketBuffer::update | ( | GBCPacket | packet, |
| int | timeToBuffer | ||
| ) |
update Update the packet of the buffer.
| packet | The packet to change (GBC case). |
| timeToBuffer | The new time to be in the buffer. |
Definition at line 148 of file CBFPacketBuffer.cpp.
References CommonHeader::headerType_geoAnycast, CommonHeader::headerType_geoBroadcast, isDuplicatePacketDetectionTimestampSN(), m_CBFPacketBuffer, GBCPacket::sequenceNumber(), GBCPacket::soPv(), and LongPositionVector::timestamp().
Referenced by GeoNet::advancedForwarding().
| bool CBFPacketBuffer::update | ( | GUCPacket | packet, |
| int | timeToBuffer | ||
| ) |
update Update the packet of the buffer.
| packet | The packet to change (GUC case). |
| timeToBuffer | The new time to be in the buffer. |
Definition at line 160 of file CBFPacketBuffer.cpp.
References CommonHeader::headerType_geoUnicast, isDuplicatePacketDetectionTimestampSN(), m_CBFPacketBuffer, GUCPacket::sequenceNumber(), GUCPacket::soPv(), and LongPositionVector::timestamp().
| bool CBFPacketBuffer::update | ( | LSReplyPacket | packet, |
| int | timeToBuffer | ||
| ) |
update Update the packet of the buffer.
| packet | The packet to change (LSReply case). |
| timeToBuffer | The new time to be in the buffer. |
Definition at line 172 of file CBFPacketBuffer.cpp.
References CommonHeader::headerSubTypeLocationService_Reply, CommonHeader::headerType_locationService, isDuplicatePacketDetectionTimestampSN(), m_CBFPacketBuffer, GUCPacket::sequenceNumber(), GUCPacket::soPv(), and LongPositionVector::timestamp().
|
private |
The CBF buffer.
Definition at line 182 of file CBFPacketBuffer.h.
Referenced by addPacket(), CBFPacketBuffer(), clear(), erase(), isDuplicateTimestamp(), and update().
|
private |
HashMap of counters.
Definition at line 190 of file CBFPacketBuffer.h.
Referenced by CBFPacketBuffer(), sendPacket(), and stopPacket().
|
private |
ITS-S GN_ADDR.
Definition at line 187 of file CBFPacketBuffer.h.
Referenced by addPacket(), and CBFPacketBuffer().
|
private |
History packet buffer.
Definition at line 188 of file CBFPacketBuffer.h.
Referenced by addPacket(), and CBFPacketBuffer().
|
private |
HashMap of LocTE.
Definition at line 184 of file CBFPacketBuffer.h.
Referenced by CBFPacketBuffer().
| QMutex* CBFPacketBuffer::m_mutex |
Mutex used when looking into the buffer.
Definition at line 137 of file CBFPacketBuffer.h.
Referenced by CBFPacketBuffer(), and GeoNet::CBFUnicast().
|
private |
GPS.
Definition at line 186 of file CBFPacketBuffer.h.
Referenced by addPacket(), and CBFPacketBuffer().
|
private |
Network configuration.
Definition at line 185 of file CBFPacketBuffer.h.
Referenced by addPacket(), and CBFPacketBuffer().
|
static |
Number of entries in the buffer.
Definition at line 130 of file CBFPacketBuffer.h.
Referenced by addPacket(), clear(), and erase().
|
private |
GN sequence number.
Definition at line 189 of file CBFPacketBuffer.h.
Referenced by addPacket(), and CBFPacketBuffer().