32 #ifndef DSR_NETWORK_QUEUE_H
33 #define DSR_NETWORK_QUEUE_H
36 #include "ns3/ipv4-routing-protocol.h"
37 #include "ns3/simulator.h"
38 #include "ns3/ipv4-header.h"
keep track of time values and allow control of global simulation resolution
DsrNetworkQueueEntry(Ptr< const Packet > pa=0, Ipv4Address s=Ipv4Address(), Ipv4Address n=Ipv4Address(), Time exp=Simulator::Now(), Ptr< Ipv4Route > r=0)
Construct a DsrNetworkQueueEntry with the given parameters.
uint32_t GetSize()
Number of entries.
bool operator==(DsrNetworkQueueEntry const &o) const
Compare send buffer entries.
bool Enqueue(DsrNetworkQueueEntry &entry)
Push entry in queue, if there is no entry with the same packet and destination address in queue...
uint32_t m_maxSize
Maximum queue size.
Doxygen introspection did not find any typical Config paths.
void SetPacket(Ptr< const Packet > p)
bool Dequeue(DsrNetworkQueueEntry &entry)
Return first found (the earliest) entry for given destination.
Ptr< const Packet > GetPacket() const
Ptr< const Packet > m_packet
Data packet.
void SetIpv4Route(Ptr< Ipv4Route > route)
uint32_t GetMaxNetworkSize(void) const
Return the maximum queue size.
Ipv4Address GetNextHopAddress() const
void SetMaxNetworkDelay(Time delay)
Set the maximum entry lifetime in the queue.
Time GetMaxNetworkDelay(void) const
Return the maximum entry lifetime for this queue.
Ptr< Ipv4Route > m_ipv4Route
Ipv4Route.
static Time Now(void)
Return the "current simulation time".
std::vector< DsrNetworkQueueEntry > & GetQueue()
void Cleanup(void)
Clean the queue by removing entries that exceeded lifetime.
uint32_t m_size
Current queue size.
void SetInsertedTimeStamp(Time time)
Ipv4Address GetSourceAddress() const
Ptr< Ipv4Route > GetIpv4Route() const
Ipv4 addresses are stored in host order in this class.
void SetSourceAddress(Ipv4Address addr)
void Flush(void)
Clear the queue.
std::vector< DsrNetworkQueueEntry > m_dsrNetworkQueue
Queue (vector) of entries.
Time m_maxDelay
Maximum entry lifetime.
static TypeId GetTypeId(void)
void SetMaxNetworkSize(uint32_t maxSize)
Set the maximum queue size.
a base class which provides memory management and object aggregation
Time GetInsertedTimeStamp(void) const
a unique identifier for an interface.
Ipv4Address m_nextHopAddr
void SetNextHopAddress(Ipv4Address addr)