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"
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. | |
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.
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.
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).
src | The source entry portion of the table. |
dst | The destination entry portion of the table. |
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().
|
private |
Compare the equality of 2 destination entries.
first | The first destination entry to compare. |
second | The second destination entry to compare. |
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().
|
private |
Compare the equality of 2 source entries.
first | The first source entry to compare. |
second | The second source entry to compare. |
Definition at line 176 of file zigbee-aps-tables.cc.
Referenced by Bind(), LookUpEntries(), and Unbind().
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.
src | The source entry portion of the table to search. |
dstEntries | The resulting destination entries binded to the provided source entry portion |
Definition at line 263 of file zigbee-aps-tables.cc.
References CompareSources(), and m_bindingTable.
Referenced by ns3::zigbee::ZigbeeAps::SendDataWithBindingTable().
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.
src | The source entry portion of the table. |
dst | The destination entry portion of the table. |
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.
|
private |
The binding table object.
Definition at line 264 of file zigbee-aps-tables.h.
Referenced by Bind(), LookUpEntries(), and Unbind().
|
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().
|
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().