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

Setup a Zigbee stack to be used with LrWpanNetDevice. More...

#include "zigbee-helper.h"

+ Collaboration diagram for ns3::ZigbeeHelper:

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.
 

Private Attributes

ObjectFactory m_stackFactory
 Zigbee stack object factory.
 

Detailed Description

Setup a Zigbee stack to be used with LrWpanNetDevice.

Definition at line 32 of file zigbee-helper.h.

Constructor & Destructor Documentation

◆ ZigbeeHelper()

ns3::ZigbeeHelper::ZigbeeHelper ( )

Definition at line 23 of file zigbee-helper.cc.

References m_stackFactory, NS_LOG_FUNCTION, and ns3::ObjectFactory::SetTypeId().

+ Here is the call graph for this function:

Member Function Documentation

◆ AssignStreams()

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.

Parameters
[in]cNetDeviceContainer of the set of net devices for which the ZigbeeStack should be modified to use a fixed stream.
[in]streamFirst stream index to use.
Returns
The number of stream indices assigned by this helper.

◆ Install()

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.

Parameters
[in]cThe NetDevice container with LrWpanNetDevices.
Returns
A container with the newly created ZigbeeStacks.

Definition at line 37 of file zigbee-helper.cc.

References ns3::zigbee::ZigbeeStackContainer::Add(), ns3::ObjectFactory::Create(), ns3::NetDeviceContainer::Get(), ns3::NetDeviceContainer::GetN(), m_stackFactory, NS_ASSERT_MSG, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

Referenced by ZigbeeRreqRetryTestCase::DoRun().

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

◆ SetDeviceAttribute()

void ns3::ZigbeeHelper::SetDeviceAttribute ( std::string n1,
const AttributeValue & v1 )

Set an attribute on each ns3::ZigbeeStack created by ZigbeeHelper::Install.

Parameters
n1[in] The name of the attribute to set.
v1[in] The value of the attribute to set.

Definition at line 30 of file zigbee-helper.cc.

References m_stackFactory, NS_LOG_FUNCTION, and ns3::ObjectFactory::Set().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_stackFactory

ObjectFactory ns3::ZigbeeHelper::m_stackFactory
private

Zigbee stack object factory.

Definition at line 80 of file zigbee-helper.h.

Referenced by ZigbeeHelper(), Install(), and SetDeviceAttribute().


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