Represents the payload portion of a beacon frame. More...
#include "zigbee-nwk-payload-header.h"
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. | |
![]() | |
~Header () override | |
virtual uint32_t | Deserialize (Buffer::Iterator start, Buffer::Iterator end) |
Deserialize the object from a buffer iterator. | |
![]() | |
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 () |
Get the type ID. | |
![]() | |
static TypeId | GetTypeId () |
Get the type ID. | |
![]() | |
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 | |
![]() | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. | |
virtual void | NotifyConstructionCompleted () |
Notifier called once the ObjectBase is fully constructed. | |
![]() | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
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.
ns3::zigbee::ZigbeeBeaconPayload::ZigbeeBeaconPayload | ( | ) |
Definition at line 510 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.
|
overridevirtual |
start | an iterator which points to where the header should read from. |
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().
uint8_t ns3::zigbee::ZigbeeBeaconPayload::GetDeviceDepth | ( | ) | const |
Get the device depth.
Definition at line 645 of file zigbee-nwk-payload-header.cc.
References m_deviceDepth.
bool ns3::zigbee::ZigbeeBeaconPayload::GetEndDevCapacity | ( | ) | const |
Get the end dev capacity.
Definition at line 657 of file zigbee-nwk-payload-header.cc.
References m_endDevCapacity.
Referenced by ns3::zigbee::ZigbeeNwk::MlmeBeaconNotifyIndication().
uint64_t ns3::zigbee::ZigbeeBeaconPayload::GetExtPanId | ( | ) | const |
Get the extended PAN identifier.
Definition at line 669 of file zigbee-nwk-payload-header.cc.
References m_extPanId.
Referenced by ns3::zigbee::ZigbeeNwk::MlmeBeaconNotifyIndication().
|
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.
Implements ns3::ObjectBase.
Definition at line 534 of file zigbee-nwk-payload-header.cc.
References GetTypeId().
uint8_t ns3::zigbee::ZigbeeBeaconPayload::GetNwkUpdateId | ( | ) | const |
Get the value of the nwkUpdateId set to this beacon payload.
Definition at line 693 of file zigbee-nwk-payload-header.cc.
References m_nwkUpdateId.
uint8_t ns3::zigbee::ZigbeeBeaconPayload::GetProtocolId | ( | ) | const |
Get the Protocol Id used.
In this standard this value is always 0.
Definition at line 615 of file zigbee-nwk-payload-header.cc.
References m_protocolId.
Referenced by ns3::zigbee::ZigbeeNwk::MlmeBeaconNotifyIndication().
bool ns3::zigbee::ZigbeeBeaconPayload::GetRouterCapacity | ( | ) | const |
Get the router capacity capability.
Definition at line 633 of file zigbee-nwk-payload-header.cc.
References m_routerCapacity.
Referenced by ns3::zigbee::ZigbeeNwk::MlmeBeaconNotifyIndication().
|
overridevirtual |
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.
uint8_t ns3::zigbee::ZigbeeBeaconPayload::GetStackProfile | ( | ) | const |
Get the Stack Profile used.
Definition at line 621 of file zigbee-nwk-payload-header.cc.
References m_stackProfile.
Referenced by ns3::zigbee::ZigbeeNwk::MlmeBeaconNotifyIndication().
uint32_t ns3::zigbee::ZigbeeBeaconPayload::GetTxOffset | ( | ) | const |
Get the Tx Offset time in symbols.
Definition at line 681 of file zigbee-nwk-payload-header.cc.
References m_txOffset.
|
static |
Get the type ID.
Definition at line 524 of file zigbee-nwk-payload-header.cc.
References ns3::TypeId::SetParent().
Referenced by GetInstanceTypeId().
|
overridevirtual |
os | output 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.
|
overridevirtual |
start | an 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().
void ns3::zigbee::ZigbeeBeaconPayload::SetDeviceDepth | ( | uint8_t | deviceDepth | ) |
Set the cevice depth object.
deviceDepth | The current device depth. |
Definition at line 639 of file zigbee-nwk-payload-header.cc.
References m_deviceDepth.
Referenced by ns3::zigbee::ZigbeeNwk::UpdateBeaconPayloadLength().
void ns3::zigbee::ZigbeeBeaconPayload::SetEndDevCapacity | ( | bool | endDevCapacity | ) |
Set the end device Capacity.
endDevCapacity | The end device capacity |
Definition at line 651 of file zigbee-nwk-payload-header.cc.
References m_endDevCapacity.
Referenced by ns3::zigbee::ZigbeeNwk::UpdateBeaconPayloadLength().
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).
extPanId | The extended PAN id |
Definition at line 663 of file zigbee-nwk-payload-header.cc.
References m_extPanId.
Referenced by ns3::zigbee::ZigbeeNwk::UpdateBeaconPayloadLength().
void ns3::zigbee::ZigbeeBeaconPayload::SetNwkUpdateId | ( | uint8_t | nwkUpdateId | ) |
Set the value of the nwkUpdateId to this beacon payload.
nwkUpdateId | The nwkUpdateId to set to the beacon payload. |
Definition at line 687 of file zigbee-nwk-payload-header.cc.
References m_nwkUpdateId.
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.
routerCapacity | The router capacity capability |
Definition at line 627 of file zigbee-nwk-payload-header.cc.
References m_routerCapacity.
Referenced by ns3::zigbee::ZigbeeNwk::UpdateBeaconPayloadLength().
void ns3::zigbee::ZigbeeBeaconPayload::SetStackProfile | ( | uint8_t | stackProfile | ) |
Set the network profile identifier.
stackProfile | the stack Profile in use |
Definition at line 609 of file zigbee-nwk-payload-header.cc.
References m_stackProfile.
Referenced by ns3::zigbee::ZigbeeNwk::UpdateBeaconPayloadLength().
void ns3::zigbee::ZigbeeBeaconPayload::SetTxOffset | ( | uint32_t | txOffset | ) |
Set the Tx Offset time in symbols.
txOffset | The 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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().