The Network layer Route Discovery Table Entry See Zigbee specification r22.1.0, Table 3-68. More...
#include "zigbee-nwk-tables.h"
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. | |
![]() | |
SimpleRefCount () | |
Default constructor. | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. | |
SimpleRefCount & | operator= (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. | |
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.
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.
rreqId | The sequence number used by the RREQ command frame |
src | The source address of the RREQ initiator. |
snd | The address of the device that has sent most recent lowest cost RREQ. |
forwardCost | The accumulated path cost from the RREQ src to this device. |
residualCost | The accumulated path cost from this device to the destination. |
expTime | The 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.
ns3::zigbee::RouteDiscoveryTableEntry::RouteDiscoveryTableEntry | ( | ) |
Definition at line 447 of file zigbee-nwk-tables.cc.
ns3::zigbee::RouteDiscoveryTableEntry::~RouteDiscoveryTableEntry | ( | ) |
Definition at line 451 of file zigbee-nwk-tables.cc.
Time ns3::zigbee::RouteDiscoveryTableEntry::GetExpTime | ( | ) | const |
Get the expiration time of this entry.
Definition at line 504 of file zigbee-nwk-tables.cc.
References m_expirationTime.
uint8_t ns3::zigbee::RouteDiscoveryTableEntry::GetForwardCost | ( | ) | const |
Get the forward cost of this entry.
Definition at line 474 of file zigbee-nwk-tables.cc.
References m_forwardCost.
uint8_t ns3::zigbee::RouteDiscoveryTableEntry::GetResidualCost | ( | ) | const |
Get the value of a residual cost (pathcost) updated by a RREP in this entry.
Definition at line 480 of file zigbee-nwk-tables.cc.
References m_residualCost.
uint8_t ns3::zigbee::RouteDiscoveryTableEntry::GetRreqId | ( | ) | const |
Get the route request id (The sequence number used by the RREQ command frame).
Definition at line 456 of file zigbee-nwk-tables.cc.
References m_routeRequestId.
Mac16Address ns3::zigbee::RouteDiscoveryTableEntry::GetSenderAddr | ( | ) | const |
Get the sender address of the entry.
Definition at line 468 of file zigbee-nwk-tables.cc.
References m_senderAddr.
Mac16Address ns3::zigbee::RouteDiscoveryTableEntry::GetSourceAddr | ( | ) | const |
Get the source address of the entry's RREQ initiator.
Definition at line 462 of file zigbee-nwk-tables.cc.
References m_sourceAddr.
void ns3::zigbee::RouteDiscoveryTableEntry::Print | ( | Ptr< OutputStreamWrapper > | stream | ) | const |
Print the values of the route discovery table entry.
stream | The 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.
void ns3::zigbee::RouteDiscoveryTableEntry::SetExpTime | ( | Time | exp | ) |
Set the expiration time of the route discovery entry.
exp | The expiration time. |
Definition at line 510 of file zigbee-nwk-tables.cc.
References m_expirationTime.
void ns3::zigbee::RouteDiscoveryTableEntry::SetForwardCost | ( | uint8_t | pathCost | ) |
Set the forward cost of this entry.
pathCost | The pathCost of the most optimal route found. |
Definition at line 486 of file zigbee-nwk-tables.cc.
References m_forwardCost.
void ns3::zigbee::RouteDiscoveryTableEntry::SetResidualCost | ( | uint8_t | pathcost | ) |
Set the resulting pathcost on a reception of a RREP previously requested.
pathcost | The pathcost contained in the RREP |
Definition at line 498 of file zigbee-nwk-tables.cc.
References m_residualCost.
void ns3::zigbee::RouteDiscoveryTableEntry::SetSenderAddr | ( | Mac16Address | sender | ) |
Set the sender address of this entry.
sender | The last hop sender of the last optimal route found. |
Definition at line 492 of file zigbee-nwk-tables.cc.
References m_senderAddr.
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().