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

The network layer Routing Table. More...

#include "zigbee-nwk-tables.h"

+ Collaboration diagram for ns3::zigbee::RoutingTable:

Public Member Functions

 RoutingTable ()
 The constructuctor of a Routing Table object.
 
bool AddEntry (Ptr< RoutingTableEntry > rt)
 Adds an entry to the routing table.
 
void Delete (Mac16Address dst)
 Remove an entry from the routing table.
 
void DeleteExpiredEntry ()
 Delete the first occrurance of an expired entry (ROUTE_INACTIVE status)
 
void Dispose ()
 Dispose of the table and all its elements.
 
uint32_t GetMaxTableSize () const
 Get the maximum size of the routing table.
 
uint32_t GetSize ()
 Get the size of the routing table.
 
void IdentifyExpiredEntries ()
 Identify and mark entries as ROUTE_INACTIVE status for entries who have exceeded their lifetimes.
 
bool LookUpEntry (Mac16Address dstAddr, Ptr< RoutingTableEntry > &entryFound)
 Look for an specific entry in the routing table.
 
void Print (Ptr< OutputStreamWrapper > stream) const
 Print the Routing table.
 
void Purge ()
 Purge old entries from the routing table.
 
void SetMaxTableSize (uint32_t size)
 Set the maximum size of the routing table.
 

Private Attributes

uint32_t m_maxTableSize
 The maximum size of the routing table;.
 
std::deque< Ptr< RoutingTableEntry > > m_routingTable
 The object that represents the routing table.
 

Detailed Description

The network layer Routing Table.

See Zigbee specification r22.1.0, 3.6.3.2

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

Constructor & Destructor Documentation

◆ RoutingTable()

ns3::zigbee::RoutingTable::RoutingTable ( )

The constructuctor of a Routing Table object.

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

References m_maxTableSize.

Member Function Documentation

◆ AddEntry()

bool ns3::zigbee::RoutingTable::AddEntry ( Ptr< RoutingTableEntry > rt)

Adds an entry to the routing table.

Parameters
rtThe routing table entry
Returns
True if the entry was added to the table.

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

References m_maxTableSize, and m_routingTable.

Referenced by ns3::zigbee::ZigbeeNwk::FindNextHop(), and ns3::zigbee::ZigbeeNwk::ProcessManyToOneRoute().

+ Here is the caller graph for this function:

◆ Delete()

void ns3::zigbee::RoutingTable::Delete ( Mac16Address dst)

Remove an entry from the routing table.

Parameters
dstThe MAC 16 bit destination address of the entry to remove.

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

References m_routingTable.

◆ DeleteExpiredEntry()

void ns3::zigbee::RoutingTable::DeleteExpiredEntry ( )

Delete the first occrurance of an expired entry (ROUTE_INACTIVE status)

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

References m_routingTable.

Referenced by ns3::zigbee::ZigbeeNwk::FindNextHop(), and ns3::zigbee::ZigbeeNwk::ProcessManyToOneRoute().

+ Here is the caller graph for this function:

◆ Dispose()

void ns3::zigbee::RoutingTable::Dispose ( )

Dispose of the table and all its elements.

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

References m_routingTable.

Referenced by ns3::zigbee::ZigbeeNwk::DoDispose().

+ Here is the caller graph for this function:

◆ GetMaxTableSize()

uint32_t ns3::zigbee::RoutingTable::GetMaxTableSize ( ) const

Get the maximum size of the routing table.

Returns
The maximum size of the routing table.

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

References m_maxTableSize.

Referenced by ns3::zigbee::ZigbeeNwk::FindNextHop(), and ns3::zigbee::ZigbeeNwk::ProcessManyToOneRoute().

+ Here is the caller graph for this function:

◆ GetSize()

uint32_t ns3::zigbee::RoutingTable::GetSize ( )

Get the size of the routing table.

Returns
The current size of the routing table

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

References m_routingTable.

Referenced by ns3::zigbee::ZigbeeNwk::FindNextHop(), and ns3::zigbee::ZigbeeNwk::ProcessManyToOneRoute().

+ Here is the caller graph for this function:

◆ IdentifyExpiredEntries()

void ns3::zigbee::RoutingTable::IdentifyExpiredEntries ( )

Identify and mark entries as ROUTE_INACTIVE status for entries who have exceeded their lifetimes.

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

References m_routingTable, ns3::Simulator::Now(), and ns3::zigbee::ROUTE_INACTIVE.

Referenced by LookUpEntry().

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

◆ LookUpEntry()

bool ns3::zigbee::RoutingTable::LookUpEntry ( Mac16Address dstAddr,
Ptr< RoutingTableEntry > & entryFound )

Look for an specific entry in the routing table.

Parameters
dstAddrThe value of the destination address used to look for an entry.
entryFoundThe returned entry if found
Returns
True if the entry was found in the routing table.

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

References IdentifyExpiredEntries(), m_routingTable, and NS_LOG_FUNCTION.

Referenced by ns3::zigbee::ZigbeeNwk::FindNextHop(), ns3::zigbee::ZigbeeNwk::FindRoute(), ns3::zigbee::ZigbeeNwk::ProcessManyToOneRoute(), and ns3::zigbee::ZigbeeNwk::ReceiveRREP().

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

◆ Print()

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

Print the Routing table.

Parameters
streamThe stream object used to print the routing table.

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

References m_routingTable.

Referenced by ns3::zigbee::ZigbeeNwk::PrintRoutingTable().

+ Here is the caller graph for this function:

◆ Purge()

void ns3::zigbee::RoutingTable::Purge ( )

Purge old entries from the routing table.

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

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

+ Here is the call graph for this function:

◆ SetMaxTableSize()

void ns3::zigbee::RoutingTable::SetMaxTableSize ( uint32_t size)

Set the maximum size of the routing table.

Parameters
sizeThe size of the routing table.

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

References m_maxTableSize.

Member Data Documentation

◆ m_maxTableSize

uint32_t ns3::zigbee::RoutingTable::m_maxTableSize
private

The maximum size of the routing table;.

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

Referenced by RoutingTable(), AddEntry(), GetMaxTableSize(), and SetMaxTableSize().

◆ m_routingTable

std::deque<Ptr<RoutingTableEntry> > ns3::zigbee::RoutingTable::m_routingTable
private

The object that represents the routing table.

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

Referenced by AddEntry(), Delete(), DeleteExpiredEntry(), Dispose(), GetSize(), IdentifyExpiredEntries(), LookUpEntry(), Print(), and Purge().


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