A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::zigbee::RouteDiscoveryTableEntry Class Reference

The Network layer Route Discovery Table Entry See Zigbee specification r22.1.0, Table 3-68. More...

#include "zigbee-nwk-tables.h"

+ Inheritance diagram for ns3::zigbee::RouteDiscoveryTableEntry:
+ Collaboration diagram for ns3::zigbee::RouteDiscoveryTableEntry:

Public Member Functions

 RouteDiscoveryTableEntry ()
 
 RouteDiscoveryTableEntry (uint8_t rreqId, Mac16Address src, Mac16Address snd, uint8_t forwardCost, uint8_t residualCost, Time expTime)
 The constructor of the route discovery entry.
 
 ~RouteDiscoveryTableEntry ()
 
Time GetExpTime () const
 Get the expiration time of this entry.
 
uint8_t GetForwardCost () const
 Get the forward cost of this entry.
 
uint8_t GetResidualCost () const
 Get the value of a residual cost (pathcost) updated by a RREP in this entry.
 
uint8_t GetRreqId () const
 Get the route request id (The sequence number used by the RREQ command frame).
 
Mac16Address GetSenderAddr () const
 Get the sender address of the entry.
 
Mac16Address GetSourceAddr () const
 Get the source address of the entry's RREQ initiator.
 
void Print (Ptr< OutputStreamWrapper > stream) const
 Print the values of the route discovery table entry.
 
void SetExpTime (Time exp)
 Set the expiration time of the route discovery entry.
 
void SetForwardCost (uint8_t pathCost)
 Set the forward cost of this entry.
 
void SetResidualCost (uint8_t pathcost)
 Set the resulting pathcost on a reception of a RREP previously requested.
 
void SetSenderAddr (Mac16Address sender)
 Set the sender address of this entry.
 
- Public Member Functions inherited from ns3::SimpleRefCount< RouteDiscoveryTableEntry >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 

Private Attributes

Time m_expirationTime
 A time stamp indicating the expiration time.
 
uint8_t m_forwardCost
 The accumulated path cost from the source of the RREQ to the current device.
 
uint8_t m_residualCost
 The accumulated path cost from the current device to the destination device.
 
uint8_t m_routeRequestId
 The sequence number for a RREQ command frame that is incremented each time a device initiates a RREQ.
 
Mac16Address m_senderAddr
 The 16-bit network address of the device that has sent the most recent lowest cost RREQ command frame corresponding to this entry's RREQ id and source addr.
 
Mac16Address m_sourceAddr
 The 16-bit network address of the RREQ initiator.
 

Detailed Description

The Network layer Route Discovery Table Entry See Zigbee specification r22.1.0, Table 3-68.

Definition at line 213 of file zigbee-nwk-tables.h.

Constructor & Destructor Documentation

◆ RouteDiscoveryTableEntry() [1/2]

ns3::zigbee::RouteDiscoveryTableEntry::RouteDiscoveryTableEntry ( uint8_t rreqId,
Mac16Address src,
Mac16Address snd,
uint8_t forwardCost,
uint8_t residualCost,
Time expTime )

The constructor of the route discovery entry.

Parameters
rreqIdThe sequence number used by the RREQ command frame
srcThe source address of the RREQ initiator.
sndThe address of the device that has sent most recent lowest cost RREQ.
forwardCostThe accumulated path cost from the RREQ src to this device.
residualCostThe accumulated path cost from this device to the destination.
expTimeThe expiration time of this entry.

Definition at line 432 of file zigbee-nwk-tables.cc.

References m_expirationTime, m_forwardCost, m_residualCost, m_routeRequestId, m_senderAddr, and m_sourceAddr.

◆ RouteDiscoveryTableEntry() [2/2]

ns3::zigbee::RouteDiscoveryTableEntry::RouteDiscoveryTableEntry ( )

Definition at line 447 of file zigbee-nwk-tables.cc.

◆ ~RouteDiscoveryTableEntry()

ns3::zigbee::RouteDiscoveryTableEntry::~RouteDiscoveryTableEntry ( )

Definition at line 451 of file zigbee-nwk-tables.cc.

Member Function Documentation

◆ GetExpTime()

Time ns3::zigbee::RouteDiscoveryTableEntry::GetExpTime ( ) const

Get the expiration time of this entry.

Returns
The expiration time of this entry.

Definition at line 504 of file zigbee-nwk-tables.cc.

References m_expirationTime.

◆ GetForwardCost()

uint8_t ns3::zigbee::RouteDiscoveryTableEntry::GetForwardCost ( ) const

Get the forward cost of this entry.

Returns
The forward cost

Definition at line 474 of file zigbee-nwk-tables.cc.

References m_forwardCost.

◆ GetResidualCost()

uint8_t ns3::zigbee::RouteDiscoveryTableEntry::GetResidualCost ( ) const

Get the value of a residual cost (pathcost) updated by a RREP in this entry.

Returns
The residual cost.

Definition at line 480 of file zigbee-nwk-tables.cc.

References m_residualCost.

◆ GetRreqId()

uint8_t ns3::zigbee::RouteDiscoveryTableEntry::GetRreqId ( ) const

Get the route request id (The sequence number used by the RREQ command frame).

Returns
The route request id (RREQ command frame sequence number).

Definition at line 456 of file zigbee-nwk-tables.cc.

References m_routeRequestId.

◆ GetSenderAddr()

Mac16Address ns3::zigbee::RouteDiscoveryTableEntry::GetSenderAddr ( ) const

Get the sender address of the entry.

Returns
The sender address

Definition at line 468 of file zigbee-nwk-tables.cc.

References m_senderAddr.

◆ GetSourceAddr()

Mac16Address ns3::zigbee::RouteDiscoveryTableEntry::GetSourceAddr ( ) const

Get the source address of the entry's RREQ initiator.

Returns
The address of the RREQ initiator.

Definition at line 462 of file zigbee-nwk-tables.cc.

References m_sourceAddr.

◆ Print()

void ns3::zigbee::RouteDiscoveryTableEntry::Print ( Ptr< OutputStreamWrapper > stream) const

Print the values of the route discovery table entry.

Parameters
streamThe stream object used to print.

Definition at line 516 of file zigbee-nwk-tables.cc.

References ns3::Time::As(), m_expirationTime, m_forwardCost, m_residualCost, m_routeRequestId, m_senderAddr, m_sourceAddr, and ns3::Time::S.

+ Here is the call graph for this function:

◆ SetExpTime()

void ns3::zigbee::RouteDiscoveryTableEntry::SetExpTime ( Time exp)

Set the expiration time of the route discovery entry.

Parameters
expThe expiration time.

Definition at line 510 of file zigbee-nwk-tables.cc.

References m_expirationTime.

◆ SetForwardCost()

void ns3::zigbee::RouteDiscoveryTableEntry::SetForwardCost ( uint8_t pathCost)

Set the forward cost of this entry.

Parameters
pathCostThe pathCost of the most optimal route found.

Definition at line 486 of file zigbee-nwk-tables.cc.

References m_forwardCost.

◆ SetResidualCost()

void ns3::zigbee::RouteDiscoveryTableEntry::SetResidualCost ( uint8_t pathcost)

Set the resulting pathcost on a reception of a RREP previously requested.

Parameters
pathcostThe pathcost contained in the RREP

Definition at line 498 of file zigbee-nwk-tables.cc.

References m_residualCost.

◆ SetSenderAddr()

void ns3::zigbee::RouteDiscoveryTableEntry::SetSenderAddr ( Mac16Address sender)

Set the sender address of this entry.

Parameters
senderThe last hop sender of the last optimal route found.

Definition at line 492 of file zigbee-nwk-tables.cc.

References m_senderAddr.

Member Data Documentation

◆ m_expirationTime

Time ns3::zigbee::RouteDiscoveryTableEntry::m_expirationTime
private

A time stamp indicating the expiration time.

The default value of the entry is equals to current time + nwkcRouteDiscoveryTime.

Definition at line 325 of file zigbee-nwk-tables.h.

Referenced by RouteDiscoveryTableEntry(), GetExpTime(), Print(), and SetExpTime().

◆ m_forwardCost

uint8_t ns3::zigbee::RouteDiscoveryTableEntry::m_forwardCost
private

The accumulated path cost from the source of the RREQ to the current device.

Definition at line 321 of file zigbee-nwk-tables.h.

Referenced by RouteDiscoveryTableEntry(), GetForwardCost(), Print(), and SetForwardCost().

◆ m_residualCost

uint8_t ns3::zigbee::RouteDiscoveryTableEntry::m_residualCost
private

The accumulated path cost from the current device to the destination device.

Definition at line 323 of file zigbee-nwk-tables.h.

Referenced by RouteDiscoveryTableEntry(), GetResidualCost(), Print(), and SetResidualCost().

◆ m_routeRequestId

uint8_t ns3::zigbee::RouteDiscoveryTableEntry::m_routeRequestId
private

The sequence number for a RREQ command frame that is incremented each time a device initiates a RREQ.

Definition at line 314 of file zigbee-nwk-tables.h.

Referenced by RouteDiscoveryTableEntry(), GetRreqId(), and Print().

◆ m_senderAddr

Mac16Address ns3::zigbee::RouteDiscoveryTableEntry::m_senderAddr
private

The 16-bit network address of the device that has sent the most recent lowest cost RREQ command frame corresponding to this entry's RREQ id and source addr.

This field is used to determine the path that an eventual RREP command should follow.

Definition at line 317 of file zigbee-nwk-tables.h.

Referenced by RouteDiscoveryTableEntry(), GetSenderAddr(), Print(), and SetSenderAddr().

◆ m_sourceAddr

Mac16Address ns3::zigbee::RouteDiscoveryTableEntry::m_sourceAddr
private

The 16-bit network address of the RREQ initiator.

Definition at line 316 of file zigbee-nwk-tables.h.

Referenced by RouteDiscoveryTableEntry(), GetSourceAddr(), and Print().


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