10#ifndef ZIGBEE_PAYLOAD_HEADERS_H
11#define ZIGBEE_PAYLOAD_HEADERS_H
13#include "ns3/header.h"
14#include "ns3/mac16-address.h"
15#include "ns3/mac64-address.h"
76 void Print(std::ostream& os)
const override;
111 void Print(std::ostream& os)
const override;
227 void Print(std::ostream& os)
const override;
335 void Print(std::ostream& os)
const override;
iterator in a Buffer instance
This class can contain 16 bit addresses.
a unique identifier for an interface.
Represents the payload portion of a beacon frame.
bool GetRouterCapacity() const
Get the router capacity capability.
uint8_t GetNwkUpdateId() const
Get the value of the nwkUpdateId set to this beacon payload.
uint8_t m_protocolId
Identifies the network layer in use, in this specification this value is always 0.
void SetDeviceDepth(uint8_t deviceDepth)
Set the cevice depth object.
uint8_t GetProtocolId() const
Get the Protocol Id used.
uint32_t Deserialize(Buffer::Iterator start) override
uint32_t GetSerializedSize() const override
uint8_t m_stackProfile
The zigbee stack profile identifier.
bool m_routerCapacity
True if this device is capable of accepting join requests from router capable devices.
uint8_t GetStackProfile() const
Get the Stack Profile used.
uint8_t m_nwkUpdateId
The value of nwkUpdateId from the NIB.
uint64_t m_extPanId
The globally unique id for the PAN.
static TypeId GetTypeId()
Get the type ID.
void SetRouterCapacity(bool routerCapacity)
Set the Router Capacity capability True = The device is able to accept join.request from router-capab...
void SetNwkUpdateId(uint8_t nwkUpdateId)
Set the value of the nwkUpdateId to this beacon payload.
uint64_t GetExtPanId() const
Get the extended PAN identifier.
uint8_t GetDeviceDepth() const
Get the device depth.
void SetStackProfile(uint8_t stackProfile)
Set the network profile identifier.
void Serialize(Buffer::Iterator start) const override
void SetEndDevCapacity(bool endDevCapacity)
Set the end device Capacity.
void Print(std::ostream &os) const override
bool GetEndDevCapacity() const
Get the end dev capacity.
uint32_t m_txOffset
This indicates the difference in time, measured in symbols, between the beacon transmission time of i...
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
void SetTxOffset(uint32_t txOffset)
Set the Tx Offset time in symbols.
void SetExtPanId(uint64_t extPanId)
Set the extended PAN id.
uint8_t m_deviceDepth
The network depth of this device.
bool m_endDevCapacity
True if the device is capable of accepting join request from end devices seeking to join the network.
uint8_t m_protocolVer
The version of the zigbee protocol.
uint32_t GetTxOffset() const
Get the Tx Offset time in symbols.
Represent a variable portion of the zigbee payload header that includes the route reply command.
uint32_t Deserialize(Buffer::Iterator start) override
bool m_cmdOptRespIeeeAddr
Responder IEEE address flag (Bit 5)
void SetRouteReqId(uint8_t rid)
Set the Route request identifier.
void Print(std::ostream &os) const override
void SetRespIeeeAddr(Mac64Address resp)
Set the Responder IEEE address.
void SetOrigIeeeAddr(Mac64Address orig)
Set the Originator IEEE address.
void SetCmdOption(uint8_t option)
Set the command option.
Mac64Address m_origIeeeAddr
Originator IEEE address (0-8 Octets)
Mac16Address GetRespAddr() const
Get the Responder address.
uint8_t GetPathCost() const
Get the path cost.
static TypeId GetTypeId()
Get the type ID.
Mac16Address GetOrigAddr() const
Get the Originator address.
void SetRespAddr(Mac16Address addr)
Set Responder address.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
void Serialize(Buffer::Iterator start) const override
bool m_cmdOptOrigIeeeAddr
Originator IEEE address flag (Bit 4)
uint8_t GetCmdOption() const
Get the command option.
Mac16Address m_origAddr
Originator address (2 Octets)
Mac64Address GetRespIeeeAddr() const
Get the Responder IEEE address.
uint8_t m_routeReqId
Route request identifier (1 Octet)
uint32_t GetSerializedSize() const override
uint8_t GetRouteReqId() const
Get the Route request identifier.
Mac64Address GetOrigIeeeAddr() const
Get the Originator IEEE address.
void SetOrigAddr(Mac16Address addr)
Set Originator address.
void SetPathCost(uint8_t cost)
Set the path cost.
Mac16Address m_respAddr
Responder address (2 Octets)
bool m_cmdOptMcst
Multicast flag (Bit 6)
Mac64Address m_respIeeeAddr
Responder IEEE address (0-8 Octets)
ZigbeePayloadRouteReplyCommand()
uint8_t m_pathCost
Path cost (1 Octet)
Represent a variable portion of the zigbee payload header that includes the route request command.
uint8_t GetPathCost() const
Set the path cost.
static TypeId GetTypeId()
Get the type ID.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
uint32_t GetSerializedSize() const override
uint8_t GetRouteReqId() const
Get the Route request identifier.
void Serialize(Buffer::Iterator start) const override
Mac64Address GetDstIeeeAddr() const
Get the destination IEEE address.
void Print(std::ostream &os) const override
void SetCmdOptManyToOneField(enum ManyToOne manyToOne)
Set the command option field Many To One.
ManyToOne m_cmdOptManyToOne
Many to One Subfield (Bits 3-4)
ZigbeePayloadRouteRequestCommand()
bool m_cmdOptDstIeeeAddr
Destination IEEE Address Flag (Bit 5)
uint32_t Deserialize(Buffer::Iterator start) override
Mac16Address m_dstAddr
Destination address (2 Octets)
void SetPathCost(uint8_t cost)
Set the path cost.
uint8_t GetCmdOptManyToOneField() const
Get the command option field Many To One.
void SetRouteReqId(uint8_t id)
Set the Route request identifier.
void SetDstAddr(Mac16Address addr)
Set Destination address.
Mac16Address GetDstAddr() const
Get the Destination address.
bool IsDstIeeeAddressPresent() const
Describe whether or not the destination IEEE Address field is present in the Route Request.
void SetCmdOptionField(uint8_t cmdOptionField)
Set the complete command option field of the route request command.
bool m_cmdOptMcst
Multicast Flag (Bit 6)
Mac64Address m_dstIeeeAddr
Destination IEEE address (0-8 Octets)
uint8_t m_pathCost
Path Cost (1 Octet)
void SetDstIeeeAddr(Mac64Address dst)
Set the destination IEEE address.
uint8_t GetCmdOptionField() const
Get the 8bits representing the complete command option field of the route request command.
uint8_t m_routeReqId
Route request identifier (1 Octet)
Represent the static portion of the zigbee payload header that describes the payload command type.
static TypeId GetTypeId()
Get the type ID.
void SetCmdType(enum NwkCommandType nwkCmd)
Set the command frame type.
void Serialize(Buffer::Iterator start) const override
NwkCommandType m_nwkCmdType
The network command Type.
uint32_t Deserialize(Buffer::Iterator start) override
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
void Print(std::ostream &os) const override
NwkCommandType GetCmdType() const
Get the command frame type.
uint32_t GetSerializedSize() const override
ManyToOne
Zigbee Specification 3.4.1.3.1 , Table 3-50 Values of the many to one command option field.
NwkCommandType
Zigbee Specification, Payload command types.
@ TIMEOUT_REQ_CMD
Time out request command.
@ TIMEOUT_RESP_CMD
Time out response command.
@ ROUTE_REP_CMD
Route response command.
@ LINK_POWER_DELTA_CMD
Link power delta command.
@ REJOIN_REQ_CMD
Rejoin request command.
@ LINK_STATUS_CMD
Link status command.
@ NWK_UPDATE_CMD
Network update command.
@ NWK_STATUS_CMD
Network status command.
@ REJOIN_RESP_CMD
Rejoin response command.
@ ROUTE_REQ_CMD
Route request command.
@ LEAVE_CMD
Leave network command.
@ ROUTE_RECORD_CMD
Route record command.
@ NWK_REPORT_CMD
Network report command.
Every class exported by the ns3 library is enclosed in the ns3 namespace.