ITS
UnicastForwardingPacketBuffer.h
Go to the documentation of this file.
1 
7 #ifndef UnicastForwardingPacketBuffer_H
8 #define UnicastForwardingPacketBuffer_H
9 
10 #include <QVector>
11 #include <QThread>
12 #include <apiNetwork.h>
13 #include <FakeGPSProvider.h>
14 #include <LocationTableEntry.h>
16 
18 {
19 public:
20  /* Constructors */
25 
31 
40  void addPacket(BasicHeader bh, CommonHeader ch, GUCPacket packet, QByteArray payload, QByteArray sender);
46  bool isDuplicateTimestamp(GUCPacket packet);
52  bool erase(GUCPacket packet);
58  void clear();
59 
60  QMutex *m_mutex;
66  QVector<UnicastForwardingPacketEntry> ucForwardPacketBuffer() const{return m_ucForwardPacketBuffer;}
67 
68 private:
69  QVector<UnicastForwardingPacketEntry> m_ucForwardPacketBuffer;
71 };
72 
73 #endif // _UnicastForwardingPacketBuffer_H_
Location table entry definition.
void addPacket(BasicHeader bh, CommonHeader ch, GUCPacket packet, QByteArray payload, QByteArray sender)
addPacket Add packet to the buffer.
QVector< UnicastForwardingPacketEntry > m_ucForwardPacketBuffer
Entry of the UnicastForwardingPacketBuffer.
UnicastForwardingPacketBuffer()
UnicastForwardingPacketBuffer Default constructor.
bool isDuplicateTimestamp(GUCPacket packet)
isDuplicateTimestamp Check is the packet is duplicate.
bool erase(GUCPacket packet)
erase Remove packet from the buffer.
GPS provider for testing purposes.
QVector< UnicastForwardingPacketEntry > ucForwardPacketBuffer() const
ucForwardPacketBuffer Buffer getter.
void clear()
clear Clear the buffer.