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

Represents the payload portion of a beacon frame. More...

#include "zigbee-nwk-payload-header.h"

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

Public Member Functions

 ZigbeeBeaconPayload ()
 
uint32_t Deserialize (Buffer::Iterator start) override
 
uint8_t GetDeviceDepth () const
 Get the device depth.
 
bool GetEndDevCapacity () const
 Get the end dev capacity.
 
uint64_t GetExtPanId () const
 Get the extended PAN identifier.
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object.
 
uint8_t GetNwkUpdateId () const
 Get the value of the nwkUpdateId set to this beacon payload.
 
uint8_t GetProtocolId () const
 Get the Protocol Id used.
 
bool GetRouterCapacity () const
 Get the router capacity capability.
 
uint32_t GetSerializedSize () const override
 
uint8_t GetStackProfile () const
 Get the Stack Profile used.
 
uint32_t GetTxOffset () const
 Get the Tx Offset time in symbols.
 
void Print (std::ostream &os) const override
 
void Serialize (Buffer::Iterator start) const override
 
void SetDeviceDepth (uint8_t deviceDepth)
 Set the cevice depth object.
 
void SetEndDevCapacity (bool endDevCapacity)
 Set the end device Capacity.
 
void SetExtPanId (uint64_t extPanId)
 Set the extended PAN id.
 
void SetNwkUpdateId (uint8_t nwkUpdateId)
 Set the value of the nwkUpdateId to this beacon payload.
 
void SetRouterCapacity (bool routerCapacity)
 Set the Router Capacity capability True = The device is able to accept join.request from router-capable devices.
 
void SetStackProfile (uint8_t stackProfile)
 Set the network profile identifier.
 
void SetTxOffset (uint32_t txOffset)
 Set the Tx Offset time in symbols.
 
- Public Member Functions inherited from ns3::Header
 ~Header () override
 
virtual uint32_t Deserialize (Buffer::Iterator start, Buffer::Iterator end)
 Deserialize the object from a buffer iterator.
 
- 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::Header
static TypeId GetTypeId ()
 Get the type ID.
 
- Static Public Member Functions inherited from ns3::Chunk
static TypeId GetTypeId ()
 Get the type ID.
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID.
 

Private Attributes

uint8_t m_deviceDepth
 The network depth of this device.
 
bool m_endDevCapacity {false}
 True if the device is capable of accepting join request from end devices seeking to join the network.
 
uint64_t m_extPanId
 The globally unique id for the PAN.
 
uint8_t m_nwkUpdateId
 The value of nwkUpdateId from the NIB.
 
uint8_t m_protocolId {0}
 Identifies the network layer in use, in this specification this value is always 0.
 
uint8_t m_protocolVer
 The version of the zigbee protocol.
 
bool m_routerCapacity {false}
 True if this device is capable of accepting join requests from router capable devices.
 
uint8_t m_stackProfile
 The zigbee stack profile identifier.
 
uint32_t m_txOffset
 This indicates the difference in time, measured in symbols, between the beacon transmission time of its parent.
 

Additional Inherited Members

- 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.
 

Detailed Description

Represents the payload portion of a beacon frame.

See Zigbee specification r22.1.0, Table 3-71 (NWK layer Information fields)

Definition at line 321 of file zigbee-nwk-payload-header.h.

Constructor & Destructor Documentation

◆ ZigbeeBeaconPayload()

ns3::zigbee::ZigbeeBeaconPayload::ZigbeeBeaconPayload ( )

Member Function Documentation

◆ Deserialize()

uint32_t ns3::zigbee::ZigbeeBeaconPayload::Deserialize ( Buffer::Iterator start)
overridevirtual
Parameters
startan iterator which points to where the header should read from.
Returns
the number of bytes read.

This method is used by Packet::RemoveHeader to re-create a header from the byte buffer of a packet. The data read is expected to match bit-for-bit the representation of this header in real networks.

Note that data is not actually removed from the buffer to which the iterator points. Both Packet::RemoveHeader() and Packet::PeekHeader() call Deserialize(), but only the RemoveHeader() has additional statements to remove the header bytes from the underlying buffer and associated metadata.

Implements ns3::Header.

Definition at line 568 of file zigbee-nwk-payload-header.cc.

References ns3::Buffer::Iterator::GetDistanceFrom(), m_deviceDepth, m_endDevCapacity, m_extPanId, m_nwkUpdateId, m_protocolId, m_protocolVer, m_routerCapacity, m_stackProfile, m_txOffset, ns3::Buffer::Iterator::ReadLsbtohU16(), ns3::Buffer::Iterator::ReadLsbtohU32(), ns3::Buffer::Iterator::ReadU64(), and ns3::Buffer::Iterator::ReadU8().

+ Here is the call graph for this function:

◆ GetDeviceDepth()

uint8_t ns3::zigbee::ZigbeeBeaconPayload::GetDeviceDepth ( ) const

Get the device depth.

Returns
The device depth

Definition at line 645 of file zigbee-nwk-payload-header.cc.

References m_deviceDepth.

◆ GetEndDevCapacity()

bool ns3::zigbee::ZigbeeBeaconPayload::GetEndDevCapacity ( ) const

Get the end dev capacity.

Returns
Whether or not the device is capable of accepting join requests from end devices.

Definition at line 657 of file zigbee-nwk-payload-header.cc.

References m_endDevCapacity.

Referenced by ns3::zigbee::ZigbeeNwk::MlmeBeaconNotifyIndication().

+ Here is the caller graph for this function:

◆ GetExtPanId()

uint64_t ns3::zigbee::ZigbeeBeaconPayload::GetExtPanId ( ) const

Get the extended PAN identifier.

Returns
The extended PAN identifier

Definition at line 669 of file zigbee-nwk-payload-header.cc.

References m_extPanId.

Referenced by ns3::zigbee::ZigbeeNwk::MlmeBeaconNotifyIndication().

+ Here is the caller graph for this function:

◆ GetInstanceTypeId()

TypeId ns3::zigbee::ZigbeeBeaconPayload::GetInstanceTypeId ( ) const
overridevirtual

Get the most derived TypeId for this Object.

This method is typically implemented by ns3::Object::GetInstanceTypeId but some classes which derive from ns3::ObjectBase directly have to implement it themselves.

Returns
The TypeId associated to the most-derived type of this instance.

Implements ns3::ObjectBase.

Definition at line 534 of file zigbee-nwk-payload-header.cc.

References GetTypeId().

+ Here is the call graph for this function:

◆ GetNwkUpdateId()

uint8_t ns3::zigbee::ZigbeeBeaconPayload::GetNwkUpdateId ( ) const

Get the value of the nwkUpdateId set to this beacon payload.

Returns
The value of the nwkUpdateId in the beacon payload.

Definition at line 693 of file zigbee-nwk-payload-header.cc.

References m_nwkUpdateId.

◆ GetProtocolId()

uint8_t ns3::zigbee::ZigbeeBeaconPayload::GetProtocolId ( ) const

Get the Protocol Id used.

In this standard this value is always 0.

Returns
The protocol id used in this standard.

Definition at line 615 of file zigbee-nwk-payload-header.cc.

References m_protocolId.

Referenced by ns3::zigbee::ZigbeeNwk::MlmeBeaconNotifyIndication().

+ Here is the caller graph for this function:

◆ GetRouterCapacity()

bool ns3::zigbee::ZigbeeBeaconPayload::GetRouterCapacity ( ) const

Get the router capacity capability.

Returns
Whether or not is capable of accepting join request from router-capable devices.

Definition at line 633 of file zigbee-nwk-payload-header.cc.

References m_routerCapacity.

Referenced by ns3::zigbee::ZigbeeNwk::MlmeBeaconNotifyIndication().

+ Here is the caller graph for this function:

◆ GetSerializedSize()

uint32_t ns3::zigbee::ZigbeeBeaconPayload::GetSerializedSize ( ) const
overridevirtual
Returns
the expected size of the header.

This method is used by Packet::AddHeader to store a header into the byte buffer of a packet. This method should return the number of bytes which are needed to store the full header data by Serialize.

Implements ns3::Header.

Definition at line 540 of file zigbee-nwk-payload-header.cc.

◆ GetStackProfile()

uint8_t ns3::zigbee::ZigbeeBeaconPayload::GetStackProfile ( ) const

Get the Stack Profile used.

Returns
The stack profile identifier used.

Definition at line 621 of file zigbee-nwk-payload-header.cc.

References m_stackProfile.

Referenced by ns3::zigbee::ZigbeeNwk::MlmeBeaconNotifyIndication().

+ Here is the caller graph for this function:

◆ GetTxOffset()

uint32_t ns3::zigbee::ZigbeeBeaconPayload::GetTxOffset ( ) const

Get the Tx Offset time in symbols.

Returns
uint32_t The Tx offset time in symbols

Definition at line 681 of file zigbee-nwk-payload-header.cc.

References m_txOffset.

◆ GetTypeId()

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

Get the type ID.

Returns
the object TypeId

Definition at line 524 of file zigbee-nwk-payload-header.cc.

References ns3::TypeId::SetParent().

Referenced by GetInstanceTypeId().

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

◆ Print()

void ns3::zigbee::ZigbeeBeaconPayload::Print ( std::ostream & os) const
overridevirtual
Parameters
osoutput stream This method is used by Packet::Print to print the content of a header as ascii data to a c++ output stream. Although the header is free to format its output as it wishes, it is recommended to follow a few rules to integrate with the packet pretty printer: start with flags, small field values located between a pair of parens. Values should be separated by whitespace. Follow the parens with the important fields, separated by whitespace. i.e.: (field1 val1 field2 val2 field3 val3) field4 val4 field5 val5

Implements ns3::Header.

Definition at line 592 of file zigbee-nwk-payload-header.cc.

References m_deviceDepth, m_endDevCapacity, m_extPanId, m_nwkUpdateId, m_protocolId, m_protocolVer, m_routerCapacity, m_stackProfile, and m_txOffset.

◆ Serialize()

void ns3::zigbee::ZigbeeBeaconPayload::Serialize ( Buffer::Iterator start) const
overridevirtual
Parameters
startan iterator which points to where the header should be written.

This method is used by Packet::AddHeader to store a header into the byte buffer of a packet. The data written is expected to match bit-for-bit the representation of this header in a real network.

Implements ns3::Header.

Definition at line 546 of file zigbee-nwk-payload-header.cc.

References m_deviceDepth, m_endDevCapacity, m_extPanId, m_nwkUpdateId, m_protocolId, m_protocolVer, m_routerCapacity, m_stackProfile, m_txOffset, ns3::Buffer::Iterator::WriteHtolsbU16(), ns3::Buffer::Iterator::WriteHtolsbU32(), ns3::Buffer::Iterator::WriteU64(), and ns3::Buffer::Iterator::WriteU8().

+ Here is the call graph for this function:

◆ SetDeviceDepth()

void ns3::zigbee::ZigbeeBeaconPayload::SetDeviceDepth ( uint8_t deviceDepth)

Set the cevice depth object.

Parameters
deviceDepthThe current device depth.

Definition at line 639 of file zigbee-nwk-payload-header.cc.

References m_deviceDepth.

Referenced by ns3::zigbee::ZigbeeNwk::UpdateBeaconPayloadLength().

+ Here is the caller graph for this function:

◆ SetEndDevCapacity()

void ns3::zigbee::ZigbeeBeaconPayload::SetEndDevCapacity ( bool endDevCapacity)

Set the end device Capacity.

Parameters
endDevCapacityThe end device capacity

Definition at line 651 of file zigbee-nwk-payload-header.cc.

References m_endDevCapacity.

Referenced by ns3::zigbee::ZigbeeNwk::UpdateBeaconPayloadLength().

+ Here is the caller graph for this function:

◆ SetExtPanId()

void ns3::zigbee::ZigbeeBeaconPayload::SetExtPanId ( uint64_t extPanId)

Set the extended PAN id.

This should be the value of the zigbee coordinator EUI-64 address (IEEE address).

Parameters
extPanIdThe extended PAN id

Definition at line 663 of file zigbee-nwk-payload-header.cc.

References m_extPanId.

Referenced by ns3::zigbee::ZigbeeNwk::UpdateBeaconPayloadLength().

+ Here is the caller graph for this function:

◆ SetNwkUpdateId()

void ns3::zigbee::ZigbeeBeaconPayload::SetNwkUpdateId ( uint8_t nwkUpdateId)

Set the value of the nwkUpdateId to this beacon payload.

Parameters
nwkUpdateIdThe nwkUpdateId to set to the beacon payload.

Definition at line 687 of file zigbee-nwk-payload-header.cc.

References m_nwkUpdateId.

◆ SetRouterCapacity()

void ns3::zigbee::ZigbeeBeaconPayload::SetRouterCapacity ( bool routerCapacity)

Set the Router Capacity capability True = The device is able to accept join.request from router-capable devices.

Parameters
routerCapacityThe router capacity capability

Definition at line 627 of file zigbee-nwk-payload-header.cc.

References m_routerCapacity.

Referenced by ns3::zigbee::ZigbeeNwk::UpdateBeaconPayloadLength().

+ Here is the caller graph for this function:

◆ SetStackProfile()

void ns3::zigbee::ZigbeeBeaconPayload::SetStackProfile ( uint8_t stackProfile)

Set the network profile identifier.

Parameters
stackProfilethe stack Profile in use

Definition at line 609 of file zigbee-nwk-payload-header.cc.

References m_stackProfile.

Referenced by ns3::zigbee::ZigbeeNwk::UpdateBeaconPayloadLength().

+ Here is the caller graph for this function:

◆ SetTxOffset()

void ns3::zigbee::ZigbeeBeaconPayload::SetTxOffset ( uint32_t txOffset)

Set the Tx Offset time in symbols.

Parameters
txOffsetThe Tx offset time in symbols

Definition at line 675 of file zigbee-nwk-payload-header.cc.

References m_txOffset.

Referenced by ns3::zigbee::ZigbeeNwk::UpdateBeaconPayloadLength().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_deviceDepth

uint8_t ns3::zigbee::ZigbeeBeaconPayload::m_deviceDepth
private

The network depth of this device.

0x00 indicates this device is the ZC.

Definition at line 457 of file zigbee-nwk-payload-header.h.

Referenced by ZigbeeBeaconPayload(), Deserialize(), GetDeviceDepth(), Print(), Serialize(), and SetDeviceDepth().

◆ m_endDevCapacity

bool ns3::zigbee::ZigbeeBeaconPayload::m_endDevCapacity {false}
private

True if the device is capable of accepting join request from end devices seeking to join the network.

Definition at line 459 of file zigbee-nwk-payload-header.h.

Referenced by ZigbeeBeaconPayload(), Deserialize(), GetEndDevCapacity(), Print(), Serialize(), and SetEndDevCapacity().

◆ m_extPanId

uint64_t ns3::zigbee::ZigbeeBeaconPayload::m_extPanId
private

The globally unique id for the PAN.

By default this is the EUI-64 bit (IEEE address) of the Zigbee coordinator that formed the network.

Definition at line 461 of file zigbee-nwk-payload-header.h.

Referenced by ZigbeeBeaconPayload(), Deserialize(), GetExtPanId(), Print(), Serialize(), and SetExtPanId().

◆ m_nwkUpdateId

uint8_t ns3::zigbee::ZigbeeBeaconPayload::m_nwkUpdateId
private

The value of nwkUpdateId from the NIB.

Definition at line 465 of file zigbee-nwk-payload-header.h.

Referenced by ZigbeeBeaconPayload(), Deserialize(), GetNwkUpdateId(), Print(), Serialize(), and SetNwkUpdateId().

◆ m_protocolId

uint8_t ns3::zigbee::ZigbeeBeaconPayload::m_protocolId {0}
private

Identifies the network layer in use, in this specification this value is always 0.

Definition at line 449 of file zigbee-nwk-payload-header.h.

Referenced by ZigbeeBeaconPayload(), Deserialize(), GetProtocolId(), Print(), and Serialize().

◆ m_protocolVer

uint8_t ns3::zigbee::ZigbeeBeaconPayload::m_protocolVer
private

The version of the zigbee protocol.

Definition at line 452 of file zigbee-nwk-payload-header.h.

Referenced by ZigbeeBeaconPayload(), Deserialize(), Print(), and Serialize().

◆ m_routerCapacity

bool ns3::zigbee::ZigbeeBeaconPayload::m_routerCapacity {false}
private

True if this device is capable of accepting join requests from router capable devices.

This value should match the value of RoutersAllowed for the MAC interface this beacon is being sent from.

Definition at line 453 of file zigbee-nwk-payload-header.h.

Referenced by ZigbeeBeaconPayload(), Deserialize(), GetRouterCapacity(), Print(), Serialize(), and SetRouterCapacity().

◆ m_stackProfile

uint8_t ns3::zigbee::ZigbeeBeaconPayload::m_stackProfile
private

The zigbee stack profile identifier.

Definition at line 451 of file zigbee-nwk-payload-header.h.

Referenced by ZigbeeBeaconPayload(), Deserialize(), GetStackProfile(), Print(), Serialize(), and SetStackProfile().

◆ m_txOffset

uint32_t ns3::zigbee::ZigbeeBeaconPayload::m_txOffset
private

This indicates the difference in time, measured in symbols, between the beacon transmission time of its parent.

Definition at line 463 of file zigbee-nwk-payload-header.h.

Referenced by ZigbeeBeaconPayload(), Deserialize(), GetTxOffset(), Print(), Serialize(), and SetTxOffset().


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