Holds a vector of ns3::ZigbeeStack pointers. More...
#include "zigbee-stack-container.h"
Public Types | |
typedef std::vector< Ptr< ZigbeeStack > >::const_iterator | Iterator |
The iterator used in this Container. | |
Public Member Functions | |
ZigbeeStackContainer () | |
The default constructor, create an empty ZigbeeStackContainer. | |
ZigbeeStackContainer (Ptr< ZigbeeStack > stack) | |
Create a ZigbeeStackContainer with exactly one ZigbeeStack that has previously been instantiated. | |
ZigbeeStackContainer (std::string stackName) | |
Create a ZigbeeStackContainer with exactly one device which has been previously instantiated and assigned a name using the Object name service. | |
void | Add (Ptr< ZigbeeStack > stack) |
Append a single Ptr<ZigbeeStack> to this container. | |
void | Add (std::string stackName) |
Append to this container the single Ptr<ZigbeeStack> referred to via its object name service registered name. | |
void | Add (ZigbeeStackContainer other) |
Append the contents of another ZigbeeStackContainer to the end of this container. | |
Iterator | Begin () const |
Get and iterator which refers to the first ZigbeeStack in the container. | |
Iterator | End () const |
Get an iterator which indicates past the last ZigbeeStack in the container. | |
Ptr< ZigbeeStack > | Get (uint32_t i) const |
Get a stack element from the container. | |
uint32_t | GetN () const |
Get the number of stacks present in the stack container. | |
Private Attributes | |
std::vector< Ptr< ZigbeeStack > > | m_stacks |
ZigbeeStack smart pointers. | |
Holds a vector of ns3::ZigbeeStack pointers.
Typically ZigbeeStacks are installed on top of a pre-existing NetDevice (an LrWpanNetDevice) which on itself has already being aggregated to a node. A ZigbeeHelper Install method takes a LrWpanNetDeviceContainer. For each of the LrWpanNetDevice in the LrWpanNetDeviceContainer the helper will instantiate a ZigbeeStack, connect the necessary hooks between the MAC (LrWpanMac) and the NWK (ZigbeeNwk) and install it to the node. For each of these ZigbeeStacks, the helper also adds the ZigbeeStack into a Container for later use by the caller. This is that container used to hold the Ptr<ZigbeeStack> which are instantiated by the ZigbeeHelper.
Definition at line 36 of file zigbee-stack-container.h.
typedef std::vector<Ptr<ZigbeeStack>>::const_iterator ns3::zigbee::ZigbeeStackContainer::Iterator |
The iterator used in this Container.
Definition at line 40 of file zigbee-stack-container.h.
ns3::zigbee::ZigbeeStackContainer::ZigbeeStackContainer | ( | ) |
The default constructor, create an empty ZigbeeStackContainer.
Definition at line 19 of file zigbee-stack-container.cc.
ns3::zigbee::ZigbeeStackContainer::ZigbeeStackContainer | ( | Ptr< ZigbeeStack > | stack | ) |
Create a ZigbeeStackContainer with exactly one ZigbeeStack that has previously been instantiated.
stack | A ZigbeeStack to add to the container |
Definition at line 23 of file zigbee-stack-container.cc.
References m_stacks.
ns3::zigbee::ZigbeeStackContainer::ZigbeeStackContainer | ( | std::string | stackName | ) |
Create a ZigbeeStackContainer with exactly one device which has been previously instantiated and assigned a name using the Object name service.
This ZigbeeStack is specified by its assigned name.
stackName | The name of the ZigbeeStack to add to the container |
Create a ZigbeeStackContainer with exactly one device
Definition at line 28 of file zigbee-stack-container.cc.
References ns3::Names::Find(), and m_stacks.
void ns3::zigbee::ZigbeeStackContainer::Add | ( | Ptr< ZigbeeStack > | stack | ) |
Append a single Ptr<ZigbeeStack> to this container.
stack | The Ptr<ZigbeeStack> to append. |
Definition at line 68 of file zigbee-stack-container.cc.
References m_stacks.
void ns3::zigbee::ZigbeeStackContainer::Add | ( | std::string | stackName | ) |
Append to this container the single Ptr<ZigbeeStack> referred to via its object name service registered name.
stackName | The name of the ZigbeeStack object to add to the container. |
Definition at line 74 of file zigbee-stack-container.cc.
References ns3::Names::Find(), and m_stacks.
void ns3::zigbee::ZigbeeStackContainer::Add | ( | ZigbeeStackContainer | other | ) |
Append the contents of another ZigbeeStackContainer to the end of this container.
other | The ZigbeeStackContainer to append. |
Definition at line 59 of file zigbee-stack-container.cc.
References Begin(), End(), and m_stacks.
Referenced by ns3::ZigbeeHelper::Install().
ZigbeeStackContainer::Iterator ns3::zigbee::ZigbeeStackContainer::Begin | ( | ) | const |
Get and iterator which refers to the first ZigbeeStack in the container.
Definition at line 35 of file zigbee-stack-container.cc.
References m_stacks.
Referenced by Add().
ZigbeeStackContainer::Iterator ns3::zigbee::ZigbeeStackContainer::End | ( | ) | const |
Get an iterator which indicates past the last ZigbeeStack in the container.
Definition at line 41 of file zigbee-stack-container.cc.
References m_stacks.
Referenced by Add().
Ptr< ZigbeeStack > ns3::zigbee::ZigbeeStackContainer::Get | ( | uint32_t | i | ) | const |
Get a stack element from the container.
i | The element number in the container |
Definition at line 53 of file zigbee-stack-container.cc.
References m_stacks.
Referenced by ZigbeeRreqRetryTestCase::DoRun().
uint32_t ns3::zigbee::ZigbeeStackContainer::GetN | ( | ) | const |
Get the number of stacks present in the stack container.
Definition at line 47 of file zigbee-stack-container.cc.
References m_stacks.
|
private |
ZigbeeStack smart pointers.
Definition at line 106 of file zigbee-stack-container.h.
Referenced by ZigbeeStackContainer(), ZigbeeStackContainer(), Add(), Add(), Add(), Begin(), End(), Get(), and GetN().