Zigbee protocol stack to device interface. More...
#include "zigbee-stack.h"
Public Member Functions | |
ZigbeeStack () | |
Default constructor. | |
~ZigbeeStack () override | |
Ptr< Channel > | GetChannel () const |
Get the Channel object of the underlying LrWpanNetDevice. | |
Ptr< NetDevice > | GetNetDevice () const |
Returns a smart pointer to the underlying NetDevice. | |
Ptr< Node > | GetNode () const |
Get the node currently using this ZigbeeStack. | |
Ptr< ZigbeeNwk > | GetNwk () 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. | |
![]() | |
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< Object > | GetObject () 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< Object > | GetObject (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. | |
![]() | |
SimpleRefCount () | |
Default constructor. | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. | |
void | Ref () const |
Increment the reference count. | |
void | Unref () const |
Decrement the reference count. | |
![]() | |
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 TypeId | GetTypeId () |
Register this type. | |
![]() | |
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. | |
![]() | |
Object (const Object &o) | |
Copy an Object. | |
virtual void | NotifyNewAggregate () |
Notify all Objects aggregated to this one of a new Object being aggregated. | |
![]() | |
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::LrWpanMacBase > | m_mac |
The underlying LrWpan MAC connected to this Zigbee Stack. | |
Ptr< NetDevice > | m_netDevice |
Smart pointer to the underlying NetDevice. | |
Ptr< Node > | m_node |
The node associated with this NetDevice. | |
Ptr< ZigbeeNwk > | m_nwk |
The Zigbee Network layer. | |
Additional Inherited Members | |
![]() | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
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.
ns3::zigbee::ZigbeeStack::ZigbeeStack | ( | ) |
Default constructor.
Definition at line 38 of file zigbee-stack.cc.
References ns3::CreateObject(), m_nwk, and NS_LOG_FUNCTION.
|
override |
Definition at line 47 of file zigbee-stack.cc.
References NS_LOG_FUNCTION.
|
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.
|
overrideprotectedvirtual |
Initialize of the Objects used by the ZigbeeStack.
Reimplemented from ns3::Object.
Definition at line 65 of file zigbee-stack.cc.
References ns3::Object::AggregateObject(), ns3::Object::DoInitialize(), m_mac, m_netDevice, m_nwk, ns3::MakeCallback(), ns3::zigbee::ZigbeeNwk::McpsDataConfirm(), ns3::zigbee::ZigbeeNwk::McpsDataIndication(), ns3::zigbee::ZigbeeNwk::MlmeAssociateConfirm(), ns3::zigbee::ZigbeeNwk::MlmeAssociateIndication(), ns3::zigbee::ZigbeeNwk::MlmeBeaconNotifyIndication(), ns3::zigbee::ZigbeeNwk::MlmeCommStatusIndication(), ns3::zigbee::ZigbeeNwk::MlmeGetConfirm(), ns3::zigbee::ZigbeeNwk::MlmeOrphanIndication(), ns3::zigbee::ZigbeeNwk::MlmeScanConfirm(), ns3::zigbee::ZigbeeNwk::MlmeSetConfirm(), ns3::zigbee::ZigbeeNwk::MlmeStartConfirm(), NS_ABORT_MSG_UNLESS, and NS_LOG_FUNCTION.
Get the Channel object of the underlying LrWpanNetDevice.
Definition at line 112 of file zigbee-stack.cc.
References m_netDevice.
Returns a smart pointer to the underlying NetDevice.
Definition at line 124 of file zigbee-stack.cc.
References m_netDevice.
Get the node currently using this ZigbeeStack.
Definition at line 118 of file zigbee-stack.cc.
References m_node.
Ptr< zigbee::ZigbeeNwk > ns3::zigbee::ZigbeeStack::GetNwk | ( | ) | const |
Get the NWK layer used by this ZigbeeStack.
Definition at line 138 of file zigbee-stack.cc.
References m_nwk.
|
static |
Get the type ID.
Definition at line 29 of file zigbee-stack.cc.
References ns3::TypeId::SetParent().
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.
netDevice | A 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.
Set the NWK layer used by this ZigbeeStack.
nwk | The 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.
|
private |
The underlying LrWpan MAC connected to this Zigbee Stack.
Definition at line 115 of file zigbee-stack.h.
Referenced by DoDispose(), and DoInitialize().
Smart pointer to the underlying NetDevice.
Definition at line 118 of file zigbee-stack.h.
Referenced by DoDispose(), DoInitialize(), GetChannel(), GetNetDevice(), and SetNetDevice().
The node associated with this NetDevice.
Definition at line 117 of file zigbee-stack.h.
Referenced by DoDispose(), GetNode(), and SetNetDevice().
The Zigbee Network layer.
Definition at line 116 of file zigbee-stack.h.
Referenced by ZigbeeStack(), DoDispose(), DoInitialize(), GetNwk(), and SetNwk().