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

APS Binding Table See Zigbee specification r22.1.0, Table 2-134 Similar to the z-boss implementation, the binding table is divided in two portions: The source part and the destination part. More...

#include "zigbee-aps-tables.h"

+ Collaboration diagram for ns3::zigbee::BindingTable:

Public Member Functions

 BindingTable ()
 The constructor of the binding table.
 
BindingTableStatus Bind (const SrcBindingEntry &src, const DstBindingEntry &dst)
 Add an entry to the binding table.
 
bool LookUpEntries (const SrcBindingEntry &src, std::vector< DstBindingEntry > &dstEntries)
 Look for destination entries binded to an specific source entry portion in the binding table.
 
BindingTableStatus Unbind (const SrcBindingEntry &src, const DstBindingEntry &dst)
 Unbinds a destination entry portion of a binding table from a source entry portion.
 

Private Member Functions

bool CompareDestinations (const DstBindingEntry &first, const DstBindingEntry &second)
 Compare the equality of 2 destination entries.
 
bool CompareSources (const SrcBindingEntry &first, const SrcBindingEntry &second)
 Compare the equality of 2 source entries.
 

Private Attributes

std::vector< std::pair< SrcBindingEntry, std::vector< DstBindingEntry > > > m_bindingTable
 The binding table object.
 
uint8_t m_maxDstEntries
 The maximum amount of destination entries allowed in the table.
 
uint8_t m_maxSrcEntries
 The maximum amount of source entries allowed in the table.
 

Detailed Description

APS Binding Table See Zigbee specification r22.1.0, Table 2-134 Similar to the z-boss implementation, the binding table is divided in two portions: The source part and the destination part.

A single source can have multiple destination entries as described by the Zigbee specification. This creates a relationship one to many (a source entry with multiple destination entries) which is both useful for 64 bit Address UCST or 16-bit groupcast destination bindings.

Definition at line 204 of file zigbee-aps-tables.h.

Constructor & Destructor Documentation

◆ BindingTable()

ns3::zigbee::BindingTable::BindingTable ( )

The constructor of the binding table.

Definition at line 145 of file zigbee-aps-tables.cc.

References m_maxDstEntries, and m_maxSrcEntries.

Member Function Documentation

◆ Bind()

BindingTableStatus ns3::zigbee::BindingTable::Bind ( const SrcBindingEntry & src,
const DstBindingEntry & dst )

Add an entry to the binding table.

In essence it binds the source entry portion to the table to one or more destination portion entries (one to many).

Parameters
srcThe source entry portion of the table.
dstThe destination entry portion of the table.
Returns
The resulting status of the binding attempt.

Definition at line 184 of file zigbee-aps-tables.cc.

References ns3::zigbee::BOUND, CompareDestinations(), CompareSources(), ns3::zigbee::ENTRY_EXISTS, m_bindingTable, m_maxDstEntries, m_maxSrcEntries, NS_LOG_WARN, and ns3::zigbee::TABLE_FULL.

Referenced by ns3::zigbee::ZigbeeAps::ApsmeBindRequest().

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

◆ CompareDestinations()

bool ns3::zigbee::BindingTable::CompareDestinations ( const DstBindingEntry & first,
const DstBindingEntry & second )
private

Compare the equality of 2 destination entries.

Parameters
firstThe first destination entry to compare.
secondThe second destination entry to compare.
Returns
True if the destinations entries are identical

Definition at line 152 of file zigbee-aps-tables.cc.

References ns3::zigbee::DST_ADDR64_DST_ENDPOINT_PRESENT, and ns3::zigbee::GROUP_ADDR_DST_ENDPOINT_NOT_PRESENT.

Referenced by Bind(), and Unbind().

+ Here is the caller graph for this function:

◆ CompareSources()

bool ns3::zigbee::BindingTable::CompareSources ( const SrcBindingEntry & first,
const SrcBindingEntry & second )
private

Compare the equality of 2 source entries.

Parameters
firstThe first source entry to compare.
secondThe second source entry to compare.
Returns
True if the destinations entries are identical

Definition at line 176 of file zigbee-aps-tables.cc.

Referenced by Bind(), LookUpEntries(), and Unbind().

+ Here is the caller graph for this function:

◆ LookUpEntries()

bool ns3::zigbee::BindingTable::LookUpEntries ( const SrcBindingEntry & src,
std::vector< DstBindingEntry > & dstEntries )

Look for destination entries binded to an specific source entry portion in the binding table.

Parameters
srcThe source entry portion of the table to search.
dstEntriesThe resulting destination entries binded to the provided source entry portion
Returns
True if at least one destination entry portion was retrieved.

Definition at line 263 of file zigbee-aps-tables.cc.

References CompareSources(), and m_bindingTable.

Referenced by ns3::zigbee::ZigbeeAps::SendDataWithBindingTable().

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

◆ Unbind()

BindingTableStatus ns3::zigbee::BindingTable::Unbind ( const SrcBindingEntry & src,
const DstBindingEntry & dst )

Unbinds a destination entry portion of a binding table from a source entry portion.

Parameters
srcThe source entry portion of the table.
dstThe destination entry portion of the table.
Returns
The resulting status of the unbinding attempt.

Definition at line 228 of file zigbee-aps-tables.cc.

References CompareDestinations(), CompareSources(), ns3::zigbee::ENTRY_NOT_FOUND, m_bindingTable, NS_LOG_WARN, and ns3::zigbee::UNBOUND.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_bindingTable

std::vector<std::pair<SrcBindingEntry, std::vector<DstBindingEntry> > > ns3::zigbee::BindingTable::m_bindingTable
private

The binding table object.

Definition at line 264 of file zigbee-aps-tables.h.

Referenced by Bind(), LookUpEntries(), and Unbind().

◆ m_maxDstEntries

uint8_t ns3::zigbee::BindingTable::m_maxDstEntries
private

The maximum amount of destination entries allowed in the table.

Definition at line 266 of file zigbee-aps-tables.h.

Referenced by BindingTable(), and Bind().

◆ m_maxSrcEntries

uint8_t ns3::zigbee::BindingTable::m_maxSrcEntries
private

The maximum amount of source entries allowed in the table.

Definition at line 265 of file zigbee-aps-tables.h.

Referenced by BindingTable(), and Bind().


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