A Discrete-Event Network Simulator
API
ns3::aodv::QueueEntry Class Reference

AODV Queue Entry. More...

#include "aodv-rqueue.h"

+ Collaboration diagram for ns3::aodv::QueueEntry:

Public Types

typedef Ipv4RoutingProtocol::ErrorCallback ErrorCallback
 IPv4 routing error callback typedef. More...
 
typedef Ipv4RoutingProtocol::UnicastForwardCallback UnicastForwardCallback
 IPv4 routing unicast forward callback typedef. More...
 

Public Member Functions

 QueueEntry (Ptr< const Packet > pa=nullptr, const Ipv4Header &h=Ipv4Header(), UnicastForwardCallback ucb=UnicastForwardCallback(), ErrorCallback ecb=ErrorCallback(), Time exp=Simulator::Now())
 constructor More...
 
ErrorCallback GetErrorCallback () const
 Get error callback. More...
 
Time GetExpireTime () const
 Get expire time. More...
 
Ipv4Header GetIpv4Header () const
 Get IPv4 header. More...
 
Ptr< const PacketGetPacket () const
 Get packet from entry. More...
 
UnicastForwardCallback GetUnicastForwardCallback () const
 Get unicast forward callback. More...
 
bool operator== (const QueueEntry &o) const
 Compare queue entries. More...
 
void SetErrorCallback (ErrorCallback ecb)
 Set error callback. More...
 
void SetExpireTime (Time exp)
 Set expire time. More...
 
void SetIpv4Header (Ipv4Header h)
 Set IPv4 header. More...
 
void SetPacket (Ptr< const Packet > p)
 Set packet in entry. More...
 
void SetUnicastForwardCallback (UnicastForwardCallback ucb)
 Set unicast forward callback. More...
 

Private Attributes

ErrorCallback m_ecb
 Error callback. More...
 
Time m_expire
 Expire time for queue entry. More...
 
Ipv4Header m_header
 IP header. More...
 
Ptr< const Packetm_packet
 Data packet. More...
 
UnicastForwardCallback m_ucb
 Unicast forward callback. More...
 

Detailed Description

AODV Queue Entry.

Definition at line 44 of file aodv-rqueue.h.

Member Typedef Documentation

◆ ErrorCallback

IPv4 routing error callback typedef.

Definition at line 50 of file aodv-rqueue.h.

◆ UnicastForwardCallback

IPv4 routing unicast forward callback typedef.

Definition at line 48 of file aodv-rqueue.h.

Constructor & Destructor Documentation

◆ QueueEntry()

ns3::aodv::QueueEntry::QueueEntry ( Ptr< const Packet pa = nullptr,
const Ipv4Header h = Ipv4Header(),
UnicastForwardCallback  ucb = UnicastForwardCallback(),
ErrorCallback  ecb = ErrorCallback(),
Time  exp = Simulator::Now() 
)
inline

constructor

Parameters
pathe packet to add to the queue
hthe Ipv4Header
ucbthe UnicastForwardCallback function
ecbthe ErrorCallback function
expthe expiration time

Definition at line 61 of file aodv-rqueue.h.

Member Function Documentation

◆ GetErrorCallback()

ErrorCallback ns3::aodv::QueueEntry::GetErrorCallback ( ) const
inline

Get error callback.

Returns
the error callback

Definition at line 109 of file aodv-rqueue.h.

References m_ecb.

Referenced by ns3::aodv::QueueEntryTest::DoRun(), and ns3::aodv::RequestQueue::Drop().

+ Here is the caller graph for this function:

◆ GetExpireTime()

Time ns3::aodv::QueueEntry::GetExpireTime ( ) const
inline

Get expire time.

Returns
the expiration time

Definition at line 172 of file aodv-rqueue.h.

References m_expire, and ns3::Simulator::Now().

Referenced by ns3::aodv::QueueEntryTest::DoRun(), and ns3::aodv::IsExpired::operator()().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetIpv4Header()

Ipv4Header ns3::aodv::QueueEntry::GetIpv4Header ( ) const
inline

Get IPv4 header.

Returns
the IPv4 header

Definition at line 145 of file aodv-rqueue.h.

References m_header.

Referenced by ns3::aodv::QueueEntryTest::DoRun(), ns3::aodv::RequestQueue::Drop(), ns3::aodv::RequestQueue::Enqueue(), and ns3::aodv::RoutingProtocol::SendPacketFromQueue().

+ Here is the caller graph for this function:

◆ GetPacket()

Ptr<const Packet> ns3::aodv::QueueEntry::GetPacket ( ) const
inline

Get packet from entry.

Returns
the packet

Definition at line 127 of file aodv-rqueue.h.

References m_packet.

Referenced by ns3::aodv::QueueEntryTest::DoRun(), ns3::aodv::RequestQueue::Drop(), ns3::aodv::RequestQueue::Enqueue(), and ns3::aodv::RoutingProtocol::SendPacketFromQueue().

+ Here is the caller graph for this function:

◆ GetUnicastForwardCallback()

UnicastForwardCallback ns3::aodv::QueueEntry::GetUnicastForwardCallback ( ) const
inline

Get unicast forward callback.

Returns
unicast callback

Definition at line 91 of file aodv-rqueue.h.

References m_ucb.

Referenced by ns3::aodv::QueueEntryTest::DoRun(), and ns3::aodv::RoutingProtocol::SendPacketFromQueue().

+ Here is the caller graph for this function:

◆ operator==()

bool ns3::aodv::QueueEntry::operator== ( const QueueEntry o) const
inline

Compare queue entries.

Parameters
oQueueEntry to compare
Returns
true if equal

Definition at line 79 of file aodv-rqueue.h.

References ns3::Ipv4Header::GetDestination(), m_expire, m_header, and m_packet.

+ Here is the call graph for this function:

◆ SetErrorCallback()

void ns3::aodv::QueueEntry::SetErrorCallback ( ErrorCallback  ecb)
inline

Set error callback.

Parameters
ecbThe error callback

Definition at line 118 of file aodv-rqueue.h.

References m_ecb.

Referenced by ns3::aodv::QueueEntryTest::DoRun().

+ Here is the caller graph for this function:

◆ SetExpireTime()

void ns3::aodv::QueueEntry::SetExpireTime ( Time  exp)
inline

Set expire time.

Parameters
expThe expiration time

Definition at line 163 of file aodv-rqueue.h.

References m_expire, and ns3::Simulator::Now().

Referenced by ns3::aodv::QueueEntryTest::DoRun(), and ns3::aodv::RequestQueue::Enqueue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetIpv4Header()

void ns3::aodv::QueueEntry::SetIpv4Header ( Ipv4Header  h)
inline

Set IPv4 header.

Parameters
hthe IPv4 header

Definition at line 154 of file aodv-rqueue.h.

References m_header.

Referenced by ns3::aodv::QueueEntryTest::DoRun().

+ Here is the caller graph for this function:

◆ SetPacket()

void ns3::aodv::QueueEntry::SetPacket ( Ptr< const Packet p)
inline

Set packet in entry.

Parameters
pThe packet

Definition at line 136 of file aodv-rqueue.h.

References m_packet.

◆ SetUnicastForwardCallback()

void ns3::aodv::QueueEntry::SetUnicastForwardCallback ( UnicastForwardCallback  ucb)
inline

Set unicast forward callback.

Parameters
ucbThe unicast callback

Definition at line 100 of file aodv-rqueue.h.

References m_ucb.

Referenced by ns3::aodv::QueueEntryTest::DoRun().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_ecb

ErrorCallback ns3::aodv::QueueEntry::m_ecb
private

Error callback.

Definition at line 185 of file aodv-rqueue.h.

Referenced by GetErrorCallback(), and SetErrorCallback().

◆ m_expire

Time ns3::aodv::QueueEntry::m_expire
private

Expire time for queue entry.

Definition at line 187 of file aodv-rqueue.h.

Referenced by GetExpireTime(), operator==(), and SetExpireTime().

◆ m_header

Ipv4Header ns3::aodv::QueueEntry::m_header
private

IP header.

Definition at line 181 of file aodv-rqueue.h.

Referenced by GetIpv4Header(), operator==(), and SetIpv4Header().

◆ m_packet

Ptr<const Packet> ns3::aodv::QueueEntry::m_packet
private

Data packet.

Definition at line 179 of file aodv-rqueue.h.

Referenced by GetPacket(), operator==(), and SetPacket().

◆ m_ucb

UnicastForwardCallback ns3::aodv::QueueEntry::m_ucb
private

Unicast forward callback.

Definition at line 183 of file aodv-rqueue.h.

Referenced by GetUnicastForwardCallback(), and SetUnicastForwardCallback().


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