Setup a Zigbee stack to be used with LrWpanNetDevice. More...
#include "zigbee-helper.h"
Public Member Functions | |
ZigbeeHelper () | |
int64_t | AssignStreams (NetDeviceContainer c, int64_t stream) |
Assign a fixed random variable stream number to the random variables used by this model. | |
zigbee::ZigbeeStackContainer | Install (NetDeviceContainer c) |
Install the Zigbee stack on top of an existing LrWpanNetDevice. | |
void | SetDeviceAttribute (std::string n1, const AttributeValue &v1) |
Set an attribute on each ns3::ZigbeeStack created by ZigbeeHelper::Install. | |
void | SetNwkLayerOnly () |
If this is set, the helper will only create Zigbee stacks that contain only the NWK layer. | |
Private Attributes | |
bool | m_nwkLayerOnly |
Flag indicating that only the NWK layer is present. | |
ObjectFactory | m_stackFactory |
Zigbee stack object factory. | |
Setup a Zigbee stack to be used with LrWpanNetDevice.
Definition at line 33 of file zigbee-helper.h.
ns3::ZigbeeHelper::ZigbeeHelper | ( | ) |
Definition at line 23 of file zigbee-helper.cc.
References m_nwkLayerOnly, m_stackFactory, NS_LOG_FUNCTION, and ns3::ObjectFactory::SetTypeId().
int64_t ns3::ZigbeeHelper::AssignStreams | ( | NetDeviceContainer | c, |
int64_t | stream ) |
Assign a fixed random variable stream number to the random variables used by this model.
Return the number of streams (possibly zero) that have been assigned. The Install() method should have previously been called by the user.
[in] | c | NetDeviceContainer of the set of net devices for which the ZigbeeStack should be modified to use a fixed stream. |
[in] | stream | First stream index to use. |
zigbee::ZigbeeStackContainer ns3::ZigbeeHelper::Install | ( | NetDeviceContainer | c | ) |
Install the Zigbee stack on top of an existing LrWpanNetDevice.
This function requires a set of properly configured LrWpanNetDevices passed in as the parameter "c". After the installation, the set Zigbee stack contains the upper layers that communicate directly with the application.
Note that Zigbee is specific designed to be used on top of LrWpanDevice (IEEE 802.15.4). Any other protocol will be discarded by Zigbee.
[in] | c | The NetDevice container with LrWpanNetDevices. |
Definition at line 38 of file zigbee-helper.cc.
References ns3::zigbee::ZigbeeStackContainer::Add(), ns3::ObjectFactory::Create(), ns3::NetDeviceContainer::Get(), ns3::NetDeviceContainer::GetN(), m_nwkLayerOnly, m_stackFactory, NS_ASSERT_MSG, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
Referenced by ZigbeeApsDataTestCase::DoRun(), and ZigbeeRreqRetryTestCase::DoRun().
void ns3::ZigbeeHelper::SetDeviceAttribute | ( | std::string | n1, |
const AttributeValue & | v1 ) |
Set an attribute on each ns3::ZigbeeStack created by ZigbeeHelper::Install.
n1 | [in] The name of the attribute to set. |
v1 | [in] The value of the attribute to set. |
Definition at line 31 of file zigbee-helper.cc.
References m_stackFactory, NS_LOG_FUNCTION, and ns3::ObjectFactory::Set().
void ns3::ZigbeeHelper::SetNwkLayerOnly | ( | ) |
If this is set, the helper will only create Zigbee stacks that contain only the NWK layer.
Definition at line 67 of file zigbee-helper.cc.
References m_nwkLayerOnly.
Referenced by ZigbeeRreqRetryTestCase::DoRun().
|
private |
Flag indicating that only the NWK layer is present.
Definition at line 88 of file zigbee-helper.h.
Referenced by ZigbeeHelper(), Install(), and SetNwkLayerOnly().
|
private |
Zigbee stack object factory.
Definition at line 87 of file zigbee-helper.h.
Referenced by ZigbeeHelper(), Install(), and SetDeviceAttribute().