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

Zigbee protocol stack to device interface. More...

#include "zigbee-stack.h"

+ Inheritance diagram for ns3::zigbee::ZigbeeStack:
+ Collaboration diagram for ns3::zigbee::ZigbeeStack:

Public Member Functions

 ZigbeeStack ()
 Default constructor.
 
 ~ZigbeeStack () override
 
Ptr< ChannelGetChannel () const
 Get the Channel object of the underlying LrWpanNetDevice.
 
Ptr< NetDeviceGetNetDevice () const
 Returns a smart pointer to the underlying NetDevice.
 
Ptr< NodeGetNode () const
 Get the node currently using this ZigbeeStack.
 
Ptr< ZigbeeNwkGetNwk () const
 Get the NWK layer used by this ZigbeeStack.
 
void SetNetDevice (Ptr< NetDevice > netDevice)
 Setup Zigbee to be the next set of higher layers for the specified NetDevice.
 
void SetNwk (Ptr< ZigbeeNwk > nwk)
 Set the NWK layer used by this ZigbeeStack.
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor.
 
 ~Object () override
 Destructor.
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together.
 
void Dispose ()
 Dispose of this Object.
 
AggregateIterator GetAggregateIterator () const
 Get an iterator to the Objects aggregated to this one.
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object.
 
template<typename T >
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated Object.
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object.
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId.
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object.
 
void Initialize ()
 Invoke DoInitialize on all Objects aggregated to this one.
 
bool IsInitialized () const
 Check if the object has been initialized.
 
void UnidirectionalAggregateObject (Ptr< Object > other)
 Aggregate an Object to another Object.
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor.
 
void GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const
 Get the value of an attribute, raising fatal errors if unsuccessful.
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising errors.
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful.
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors.
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context.
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context.
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context.
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context.
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type ID.
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID.
 

Protected Member Functions

void DoDispose () override
 Dispose of the Objects used by the ZigbeeStack.
 
void DoInitialize () override
 Initialize of the Objects used by the ZigbeeStack.
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
 
virtual void NotifyNewAggregate ()
 Notify all Objects aggregated to this one of a new Object being aggregated.
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes.
 
virtual void NotifyConstructionCompleted ()
 Notifier called once the ObjectBase is fully constructed.
 

Private Attributes

Ptr< lrwpan::LrWpanMacBasem_mac
 The underlying LrWpan MAC connected to this Zigbee Stack.
 
Ptr< NetDevicem_netDevice
 Smart pointer to the underlying NetDevice.
 
Ptr< Nodem_node
 The node associated with this NetDevice.
 
Ptr< ZigbeeNwkm_nwk
 The Zigbee Network layer.
 

Additional Inherited Members

Detailed Description

Zigbee protocol stack to device interface.

Introspection did not find any typical Config paths.

This class is an encapsulating class representing the protocol stack as described by the Zigbee Specification. In the current implementation only the Zigbee network layer (NWK) is included. However, this class is meant be later be extended to include other layer and sublayers part of the Zigbee Specification. The implementation is analogous to a NetDevice which encapsulates PHY and MAC layers and provide the necessary hooks. Zigbee Stack is meant to encapsulate NWK, APS, ZLC layers (and others if applicable).


No Attributes are defined for this type.
No TraceSources are defined for this type.
Group: Zigbee

Size of this type is 88 bytes (on a 64-bit architecture).

Definition at line 45 of file zigbee-stack.h.

Constructor & Destructor Documentation

◆ ZigbeeStack()

ns3::zigbee::ZigbeeStack::ZigbeeStack ( )

Default constructor.

Definition at line 38 of file zigbee-stack.cc.

References ns3::CreateObject(), m_nwk, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ ~ZigbeeStack()

ns3::zigbee::ZigbeeStack::~ZigbeeStack ( )
override

Definition at line 47 of file zigbee-stack.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ DoDispose()

void ns3::zigbee::ZigbeeStack::DoDispose ( )
overrideprotectedvirtual

Dispose of the Objects used by the ZigbeeStack.

Reimplemented from ns3::Object.

Definition at line 53 of file zigbee-stack.cc.

References ns3::Object::DoDispose(), m_mac, m_netDevice, m_node, m_nwk, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ DoInitialize()

◆ GetChannel()

Ptr< Channel > ns3::zigbee::ZigbeeStack::GetChannel ( ) const

Get the Channel object of the underlying LrWpanNetDevice.

Returns
The LrWpanNetDevice Channel Object

Definition at line 112 of file zigbee-stack.cc.

References m_netDevice.

◆ GetNetDevice()

Ptr< NetDevice > ns3::zigbee::ZigbeeStack::GetNetDevice ( ) const

Returns a smart pointer to the underlying NetDevice.

Returns
A smart pointer to the underlying NetDevice.

Definition at line 124 of file zigbee-stack.cc.

References m_netDevice.

◆ GetNode()

Ptr< Node > ns3::zigbee::ZigbeeStack::GetNode ( ) const

Get the node currently using this ZigbeeStack.

Returns
The reference to the node object using this ZigbeeStack.

Definition at line 118 of file zigbee-stack.cc.

References m_node.

◆ GetNwk()

Ptr< zigbee::ZigbeeNwk > ns3::zigbee::ZigbeeStack::GetNwk ( ) const

Get the NWK layer used by this ZigbeeStack.

Returns
the NWK object

Definition at line 138 of file zigbee-stack.cc.

References m_nwk.

◆ GetTypeId()

TypeId ns3::zigbee::ZigbeeStack::GetTypeId ( )
static

Get the type ID.

Returns
the object TypeId

Definition at line 29 of file zigbee-stack.cc.

References ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ SetNetDevice()

void ns3::zigbee::ZigbeeStack::SetNetDevice ( Ptr< NetDevice > netDevice)

Setup Zigbee to be the next set of higher layers for the specified NetDevice.

All the packets incoming and outgoing from the NetDevice will be processed by ZigbeeStack.

Parameters
netDeviceA smart pointer to the NetDevice used by Zigbee.

Definition at line 130 of file zigbee-stack.cc.

References m_netDevice, m_node, and NS_LOG_FUNCTION.

◆ SetNwk()

void ns3::zigbee::ZigbeeStack::SetNwk ( Ptr< ZigbeeNwk > nwk)

Set the NWK layer used by this ZigbeeStack.

Parameters
nwkThe NWK layer object

Definition at line 144 of file zigbee-stack.cc.

References ns3::Object::IsInitialized(), m_nwk, NS_ABORT_MSG_IF, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_mac

Ptr<lrwpan::LrWpanMacBase> ns3::zigbee::ZigbeeStack::m_mac
private

The underlying LrWpan MAC connected to this Zigbee Stack.

Definition at line 115 of file zigbee-stack.h.

Referenced by DoDispose(), and DoInitialize().

◆ m_netDevice

Ptr<NetDevice> ns3::zigbee::ZigbeeStack::m_netDevice
private

Smart pointer to the underlying NetDevice.

Definition at line 118 of file zigbee-stack.h.

Referenced by DoDispose(), DoInitialize(), GetChannel(), GetNetDevice(), and SetNetDevice().

◆ m_node

Ptr<Node> ns3::zigbee::ZigbeeStack::m_node
private

The node associated with this NetDevice.

Definition at line 117 of file zigbee-stack.h.

Referenced by DoDispose(), GetNode(), and SetNetDevice().

◆ m_nwk

Ptr<ZigbeeNwk> ns3::zigbee::ZigbeeStack::m_nwk
private

The Zigbee Network layer.

Definition at line 116 of file zigbee-stack.h.

Referenced by ZigbeeStack(), DoDispose(), DoInitialize(), GetNwk(), and SetNwk().


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