20#include "ns3/event-id.h"
21#include "ns3/lr-wpan-mac-base.h"
22#include "ns3/mac16-address.h"
23#include "ns3/mac64-address.h"
24#include "ns3/object.h"
25#include "ns3/random-variable-stream.h"
26#include "ns3/sequence-number.h"
27#include "ns3/traced-callback.h"
28#include "ns3/traced-value.h"
218std::ostream&
operator<<(std::ostream& os,
const NwkStatus& state);
227std::ostream&
operator<<(std::ostream& os,
const std::vector<uint8_t>& vec);
235std::ostream&
operator<<(std::ostream& os,
const uint8_t& num);
1061 uint8_t rreqRetriesNum);
1402 uint8_t rreqRetries);
This class can contain 16 bit addresses.
A base class which provides memory management and object aggregation.
Smart pointer class similar to boost::intrusive_ptr.
A template-based reference counting class.
Simulation virtual time values and global simulation resolution.
Forward calls to a chain of Callback.
a unique identifier for an interface.
The Broadcast Transaction Table (BTT) The BTT is used to keep track of data broadcast transactions.
The network layer Network Table See Zigbee specification r22.1.0, 3.6.1.5.
A table that keeps record of neighbors devices NWK extended PAN ids (64 bits) and their related 16 bi...
The network layer Route Discovery Table See Zigbee specification r22.1.0, 3.6.3.2.
The network layer Routing Table.
A table storing information about upcoming route request retries.
Class that implements the Zigbee Specification Network Layer.
void SendDataUcst(Ptr< Packet > packet, uint8_t nwkHandle)
Send a data unicast packet, and if necessary look for the next hop route and store the pending data t...
NeighborTable m_nwkNeighborTable
The network layer neighbor table See Zigbee specification r22.1.0, 3.6.1.5.
RouteDiscoveryStatus ProcessManyToOneRoute(Mac16Address macSrcAddr, uint8_t pathCost, ZigbeeNwkHeader nwkHeader, ZigbeePayloadRouteRequestCommand payload)
Process Many-To-One routes.
ZigbeeNwk()
Default constructor.
Mac64Address GetIeeeAddress() const
Obtain this device 64 bit IEEE address (A.K.A.
NlmeStartRouterRequestParams m_startRouterParams
Temporarily store the NLME-START-ROUTER.request parameters during the router initialization process.
uint8_t m_nwkConcentratorDiscoveryTime
The time in seconds between concentrator route discoveries.
void DisposePendingTx()
Dispose of all PendingTxPkt accumulated in the pending transmission queue.
uint8_t m_nwkCapabilityInformation
This NIB attribute contains the device capability information established at network joining time.
void MlmeOrphanIndication(lrwpan::MlmeOrphanIndicationParams params)
IEEE 802.15.4-2011 sections 6.2.7.1, Zigbee Specification r22.1.0 Section 3.6.1.4....
void UpdateBeaconPayload()
Updates the content of the beacon payload with the most recent information in the NWK.
TracedCallback< uint8_t, Mac16Address, uint8_t > m_rreqRetriesExhaustedTrace
A trace source that fires when a node has reached the maximum number of RREQ retries allowed.
Mac16Address AllocateNetworkAddress()
Used by a Zigbee coordinator or router to allocate a 16 bit address (A.K.A short address or network a...
void NlmeDirectJoinRequest(NlmeDirectJoinRequestParams params)
Zigbee Specification r22.1.0, section 3.2.2.16 and 3.6.1.4.3 NLME-DIRECT-JOIN.request Allows the next...
RoutingTable m_nwkRoutingTable
The network layer routing table See Zigbee specification r22.1.0, 3.6.3.2.
double m_nwkcMinRREQJitter
Minimum Route request broadcast jitter time (msec).
SequenceNumber8 m_nwkSequenceNumber
The sequence number used to identify outgoing frames See Zigbee specification r22....
NlmeNetworkFormationRequestParams m_netFormParams
The parameters used during a NLME-NETWORK-FORMATION.request.
void McpsDataConfirm(lrwpan::McpsDataConfirmParams params)
IEEE 802.15.4-2011 section 6.3.2 MCPS-DATA.confirm Reports the results of a request to a transfer dat...
Ptr< UniformRandomVariable > m_uniformRandomVariable
Provides uniform random values.
NlmeJoinIndicationParams m_joinIndParams
Temporarily store the NLME-JOIN.indication parameters while the join operations (asocciation) conclud...
void PrintRoutingTable(Ptr< OutputStreamWrapper > stream) const
Print the entries in the routing table.
Mac16Address FindRoute(Mac16Address dst, bool &neighbor)
Search for a specific destination in this device neighbor and routing tables.
void SetNlmeJoinConfirmCallback(NlmeJoinConfirmCallback c)
Set the callback as part of the interconnections between the NWK and the APS sublayer (or any other h...
void NlmeStartRouterRequest(NlmeStartRouterRequestParams params)
Zigbee Specification r22.1.0, section 3.2.2.9 NLME-START-ROUTER.request This primitive allows the nex...
void SetNlmeRouteDiscoveryConfirmCallback(NlmeRouteDiscoveryConfirmCallback c)
Set the callback as part of the interconnections between the NWK and the APS sublayer (or any other h...
uint8_t m_currentChannel
Used to store the value of the PHY current channel.
Time m_routeExpiryTime
The expiration time of routing table entry.
static TypeId GetTypeId()
Get the type ID.
void NldeDataRequest(NldeDataRequestParams params, Ptr< Packet > packet)
Zigbee Specification r22.1.0, Section 3.2.1.1 NLDE-DATA.request Request to transfer a NSDU.
void SendRREP(Mac16Address nextHop, Mac16Address originator, Mac16Address responder, uint8_t rreqId, uint8_t pathcost)
Construct and send a route reply command.
void PrintNeighborTable(Ptr< OutputStreamWrapper > stream) const
Print the entries in the neighbor table.
void MlmeSetConfirm(lrwpan::MlmeSetConfirmParams params)
IEEE 802.15.4-2011 section 6.2.11.2 MLME-SET.confirm Reports the result of an attempt to change a MAC...
void UpdateBeaconPayloadLength()
Create and store a MAC beacon payload, then updates its registered size in the MAC.
StackProfile m_nwkStackProfile
Describes the current stack profile used in this NWK layer.
NlmeDirectJoinConfirmCallback m_nlmeDirectJoinConfirmCallback
This callback is used by the next layer of a zigbee coordinator or router to be notified of the resul...
bool m_nwkReportConstantCost
If false, the NWK layer shall calculate the link cost from all neighbor nodes using the LQI values re...
Time m_nwkcRREQRetryInterval
Duration between retries of a broadcast route request command frame.
void DoInitialize() override
Initialize() implementation.
NlmeNetworkFormationConfirmCallback m_nlmeNetworkFormationConfirmCallback
This callback is used to to notify the results of a network formation to the APS sublayer making the ...
void MlmeCommStatusIndication(lrwpan::MlmeCommStatusIndicationParams params)
IEEE 802.15.4-2011 section 6.2.4.2 MLME-COMM-STATUS.indication Allows the MAC MLME to indicate a comm...
PanIdTable m_panIdTable
Use to keep track of neighboring 16 bit PAN id.
Mac16Address m_nwkNetworkAddress
The 16-bit address that the device uses to communicate with the PAN.
RouteDiscoveryStatus FindNextHop(Mac16Address macSrcAddr, uint8_t pathCost, ZigbeeNwkHeader nwkHeader, ZigbeePayloadRouteRequestCommand payload, Mac16Address &nextHop)
Find the next hop in route to a destination.
void SetMac(Ptr< lrwpan::LrWpanMacBase > mac)
Set the underlying MAC to use in this Zigbee NWK.
uint8_t m_nwkParentInformation
The behavior depends upon whether the device is a FFD or RFD.
SequenceNumber8 m_macHandle
The handle assigned when doing a transmission request to the MAC layer.
NlmeJoinRequestParams m_joinParams
The parameters used during a NLME-JOIN.request.
void MlmeBeaconNotifyIndication(lrwpan::MlmeBeaconNotifyIndicationParams params)
IEEE 802.15.4-2011, Section 6.2.4.1 MLME-BEACON-NOTIFY.indication Allows the MAC MLME to indicate the...
void SetNlmeJoinIndicationCallback(NlmeJoinIndicationCallback c)
Set the callback as part of the interconnections between the NWK and the APS sublayer (or any other h...
uint8_t m_nwkcInitialRREQRetries
The number of times the first broadcast transmission of a route request command frame is retried.
void SetNlmeNetworkDiscoveryConfirmCallback(NlmeNetworkDiscoveryConfirmCallback c)
Set the callback as part of the interconnections between the NWK and the APS sublayer (or any other h...
void MlmeAssociateConfirm(lrwpan::MlmeAssociateConfirmParams params)
IEEE 802.15.4-2011 section MlME-ASSOCIATE.confirm Report the results of an associate request attempt.
void EnqueuePendingTx(Ptr< Packet > p, uint8_t nsduHandle)
Enqueue a packet in the pending transmission queue until a route is discovered for its destination.
void NlmeNetworkDiscoveryRequest(NlmeNetworkDiscoveryRequestParams params)
Zigbee Specification r22.1.0, section 3.2.2.3 NLME-NETWORK-DISCOVERY.request Allows the next higher l...
Ptr< NetFormPendingParamsGen > m_netFormParamsGen
The values temporarily stored as a result of the initial steps of a NLME-NETWORK-FORMATION....
NlmeStartRouterConfirmCallback m_nlmeStartRouterConfirmCallback
This callback is used by the next layer of a zigbee router or device to be notified of the result of ...
NlmeJoinConfirmCallback m_nlmeJoinConfirmCallback
This callback is used by the next layer of a zigbee router or device to be notified of the result of ...
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
void NlmeJoinRequest(NlmeJoinRequestParams params)
Zigbee Specification r22.1.0, section 3.2.2.13 NLME-JOIN.request This primitive allows the next highe...
uint8_t m_nwkConcentratorRadius
This NIB attribute indicates the hop count radius for concentrator route discoveries (Used by Many-To...
double m_nwkcMaxRREQJitter
Maximum Route request broadcast jitter time (msec).
Mac64Address m_nwkIeeeAddress
The EUI 64 bit IEEE address of the local device.
void SetNlmeStartRouterConfirmCallback(NlmeStartRouterConfirmCallback c)
Set the callback as part of the interconnections between the NWK and the APS sublayer (or any other h...
Time m_nwkPassiveAckTimeout
The maximum time duration in milliseconds allowed for the parent all the child devices to retransmit ...
void ReceiveRREP(Mac16Address macSrcAddr, uint8_t linkCost, ZigbeeNwkHeader nwkHeader, ZigbeePayloadRouteReplyCommand payload)
Handles the reception of a route reply command.
uint16_t m_nwkPanId
This NIB attribute should, at all times, have the same value as macPANId .
void SetNldeDataConfirmCallback(NldeDataConfirmCallback c)
Set the callback as part of the interconnections between the NWK and the APS sublayer (or any other h...
Ptr< Packet > m_beaconPayload
Points to the beacon payload used during the network formation process.
uint8_t m_countRREQRetries
Count the number of retries this device has transmitted an RREQ.
PendingPrimitiveNwk m_pendPrimitiveNwk
Indicates the current primitive in use in the NWK layer.
bool IsBroadcastAddress(Mac16Address address)
Returns true if the address is a broadcast address according to Zigbee specification r22....
BroadcastTransactionTable m_btt
The broadcast transaction table.
void NotifyConstructionCompleted() override
Notifier called once the ObjectBase is fully constructed.
uint8_t m_nwkMaxBroadcastRetries
The maximum number of retries allowed after a broadcast transmission failure See Zigbe Specification ...
uint32_t m_maxPendingTxQueueSize
The maximum size of the pending transaction queue.
uint8_t m_nwkMaxDepth
The depth a device can have.
AddrAllocMethod m_nwkAddrAlloc
A value that determines the method used to assign addresses.
std::vector< NetworkDescriptor > m_networkDescriptorList
Temporarily store beacons information from POS routers and PAN coordinators during a network-discover...
NldeDataConfirmCallback m_nldeDataConfirmCallback
This callback is used to respond to data PDU (NSDU) transfer request issued by APS sublayer to the NW...
Ptr< lrwpan::LrWpanMacBase > m_mac
Pointer to the underlying MAC connected to this Zigbee NWK.
void MlmeStartConfirm(lrwpan::MlmeStartConfirmParams params)
IEEE 802.15.4-2011 section 7.1.14.2 MLME-START.confirm Reports the results of a network start request...
uint8_t GetLinkCost(uint8_t lqi) const
Obtain the link cost based on the value of the nwkReportConstantCost.
void MlmeAssociateIndication(lrwpan::MlmeAssociateIndicationParams params)
IEEE 802.15.4-2011, Section 6.2.2.2.
void ReceiveRREQ(Mac16Address macSrcAddr, uint8_t linkCost, ZigbeeNwkHeader nwkHeader, ZigbeePayloadRouteRequestCommand payload)
Handles the reception of a route request command.
void PrintRREQRetryTable(Ptr< OutputStreamWrapper > stream) const
Print the entries in the RREQ retry table.
void PrintRouteDiscoveryTable(Ptr< OutputStreamWrapper > stream)
Print the entries in the route discovery table.
Ptr< UniformRandomVariable > m_rreqJitter
Provides uniform random values for the route request jitter.
NwkStatus GetNwkStatus(lrwpan::MacStatus macStatus) const
Cast a Mac layer status to a NWK layer status.
uint16_t m_nwkMaxChildren
The number of children a device is allowed to have on its current network.
uint8_t m_scanEnergyThreshold
The maximum acceptable energy level used in an energy scan taking place during a NLME-NETWORK-FORMATI...
void MlmeScanConfirm(lrwpan::MlmeScanConfirmParams params)
IEEE 802.15.4-2011 section 6.2.10.2 MLME-SCAN.confirm Reports the results of a scan request.
void NlmeNetworkFormationRequest(NlmeNetworkFormationRequestParams params)
Zigbee Specification r22.1.0, Section 3.2.2.5 and 3.6.1.1 NLME-NETWORK-FORMATION.request Request the ...
SequenceNumber8 m_routeRequestId
The counter used to identify route request commands.
NlmeNetworkDiscoveryConfirmCallback m_nlmeNetworkDiscoveryConfirmCallback
This callback is used to to notify the results of a network formation to the APS sublayer making the ...
uint16_t m_nwkEndDeviceTimeoutDefault
Indicates the index of the requested timeout field that contains the timeout in minutes for any end d...
void DisposeTxPktBuffer()
Dispose of all the entries in the TxPkt Buffer.
bool m_nwkIsConcentrator
This NIB attribute is a flag determining if this device is a concentrator (Use in Many-To-One routing...
Time m_nwkcRouteDiscoveryTime
Indicates the duration until a route discovery expires.
uint8_t m_txBufferMaxSize
The maximum size of the transmission buffer.
lrwpan::MlmeAssociateRequestParams m_associateParams
Temporarily store MLME-ASSOCIATE.request parameters during a NLME-JOIN.request.
void(* RreqRetriesExhaustedTracedCallback)(uint8_t rreqId, Mac16Address dst, uint8_t rreqRetriesNum)
TracedCallback signature for RreqRetriesExhaustedTrace events.
void SendRREQ(ZigbeeNwkHeader nwkHeader, ZigbeePayloadRouteRequestCommand payload, uint8_t rreqRetries)
Send a route request command.
RreqRetryTable m_rreqRetryTable
Keep track of all the route request retries.
bool m_nwkUseTreeRouting
This NIB attribute indicates whether the NWK layer should assume the ability to use hierarchical rout...
void SetNlmeNetworkFormationConfirmCallback(NlmeNetworkFormationConfirmCallback c)
Set the callback as part of the interconnections between the NWK and the APS sublayer (or any other h...
Time m_nwkNetworkBroadcastDeliveryTime
Time duration that a broadcast message needs to encompass the entire network.
NlmeRouteDiscoveryConfirmCallback m_nlmeRouteDiscoveryConfirmCallback
This callback is used to to notify the results of a network formation to the APS sublayer making the ...
void SetNlmeDirectJoinConfirmCallback(NlmeDirectJoinConfirmCallback c)
Set the callback as part of the interconnections between the NWK and the APS sublayer (or any other h...
bool m_nwkSymLink
Describes the current route symmetry: True: Routes are considered to be symmetric links.
uint32_t m_filteredChannelMask
Contains the list of channels with acceptable energy levels in a bitmap form.
std::deque< Ptr< PendingTxPkt > > m_pendingTxQueue
The pending transaction queue of data packets awaiting to be transmitted until a route to the destina...
uint16_t m_nwkMaxRouters
The number of routers any one device is allowed to have as children.
bool m_nwkcCoordinatorCapable
Indicates whether the device is capable of becoming the ZigBee coordinator Zigbee Specification r22....
void McpsDataIndication(lrwpan::McpsDataIndicationParams params, Ptr< Packet > msdu)
IEEE 802.15.4-2011 section 6.3.3 MCPS-DATA.indication Indicates the reception of an MSDU from MAC to ...
void BufferTxPkt(Ptr< Packet > p, uint8_t macHandle, uint8_t nwkHandle)
Buffer a copy of a DATA frame for post transmission handling (Transmission failure counts,...
bool RetrieveTxPkt(uint8_t macHandle, Ptr< TxPkt > &txPkt)
Retrieves a previously DATA frame buffered in the TxPkt buffer.
void NlmeRouteDiscoveryRequest(NlmeRouteDiscoveryRequestParams params)
Zigbee Specification r22.1.0, section 3.2.2.33.3 and 3.6.3.5 NLME-ROUTE-DISCOVERY....
std::deque< Ptr< TxPkt > > m_txBuffer
The transmission buffer.
Ptr< lrwpan::LrWpanMacBase > GetMac() const
Get the underlying MAC used by the current Zigbee NWK.
uint8_t GetLQINonLinearValue(uint8_t lqi) const
Get a non linear representation of a Link Quality Indicator (LQI).
void SetNldeDataIndicationCallback(NldeDataIndicationCallback c)
Set the callback for the end of a RX, as part of the interconnections between the NWK and the APS sub...
void DoDispose() override
Destructor implementation.
uint8_t m_nwkcRREQRetries
The number of times the broadcast transmission of a route request command frame is retried on relay b...
bool DequeuePendingTx(Mac16Address dst, Ptr< PendingTxPkt > entry)
Dequeue a packet previously enqueued in the pending transmission queue.
uint8_t m_nwkcProtocolVersion
Indicates the version of the ZigBee NWK protocol in the device.
void SendDataBcst(Ptr< Packet > packet, uint8_t nwkHandle)
Send a data broadcast packet, and add a record to the broadcast transaction table (BTT).
Mac16Address GetNetworkAddress() const
Obtain this device 16 bit network address (A.K.A.
void MlmeGetConfirm(lrwpan::MacStatus status, lrwpan::MacPibAttributeIdentifier id, Ptr< lrwpan::MacPibAttributes > attribute)
IEEE 802.15.4-2011 section 6.2.5.1 MLME-GET.confirm Reports the result of an attempt to obtain a MAC ...
NldeDataIndicationCallback m_nldeDataIndicationCallback
This callback is used to notify incoming packets to the APS sublayer.
RouteDiscoveryTable m_nwkRouteDiscoveryTable
The network route discovery table See Zigbee specification r22.1.0, 3.6.3.2.
uint64_t m_nwkExtendedPanId
The extended PAN identifier for the PAN of which the device is a member.
NlmeJoinIndicationCallback m_nlmeJoinIndicationCallback
This callback is used by the next layer of a zigbee coordinator or router to be notified when a new d...
Represent a variable portion of the zigbee payload header that includes the route reply command.
Represent a variable portion of the zigbee payload header that includes the route request command.
MacPibAttributeIdentifier
IEEE 802.15.4-2006 PHY and MAC PIB Attribute Identifiers Table 23 and Table 86.
MacStatus
The status of a confirm or an indication primitive as a result of a previous request.
Time Seconds(double value)
Construct a Time in the indicated unit.
Callback< void, NlmeRouteDiscoveryConfirmParams > NlmeRouteDiscoveryConfirmCallback
This callback is used to notify the next higher layer with a confirmation in response to a previously...
Callback< void, NlmeNetworkFormationConfirmParams > NlmeNetworkFormationConfirmCallback
This callback is used to notify the next higher layer with a confirmation in response to a previously...
NetworkStatusCode
Status codes for network status command frame and route discovery failures.
Callback< void, NlmeStartRouterConfirmParams > NlmeStartRouterConfirmCallback
This callback is used to notify the next higher layer with a confirmation in response to a previously...
Callback< void, NlmeJoinIndicationParams > NlmeJoinIndicationCallback
This callback is used to notify the next higher layer with an indication that a new device has succes...
AddressMode
Table 3.2 (Address Mode) NLDE-DATA-Request parameters.
Callback< void, NldeDataIndicationParams, Ptr< Packet > > NldeDataIndicationCallback
This callback is called after a NSDU has successfully received and NWK push it to deliver it to the n...
Callback< void, NlmeNetworkDiscoveryConfirmParams > NlmeNetworkDiscoveryConfirmCallback
This callback is used to notify the next higher layer with a confirmation in response to a previously...
Callback< void, NldeDataConfirmParams > NldeDataConfirmCallback
This callback is used to notify the next higher layer with a confirmation in response to a previously...
Callback< void, NlmeDirectJoinConfirmParams > NlmeDirectJoinConfirmCallback
This callback is used to notify the next higher layer with a confirmation in response to a previously...
PendingPrimitiveNwk
Indicates a pending NWK primitive.
Callback< void, NlmeJoinConfirmParams > NlmeJoinConfirmCallback
This callback is used to notify the next higher layer with a confirmation in response to a previously...
NwkStatus
Network layer status values Combines Zigbee Specification r22.1.0 Table 3-73 and and IEEE 802....
@ MANY_TO_ONE_ROUTE_FAILURE
Many to one route failure.
@ NO_ROUTING_CAPACITY
No routing capacity.
@ VERIFY_ADDRESS
Verify address.
@ PAN_IDENTIFIER_UPDATE
PAN identifier update.
@ VALIDATE_ROUTE
Validate route.
@ TREE_LINK_FAILURE
Tree link failure.
@ INDIRECT_TRANSACTION_EXPIRY
Indirect transaction expiry.
@ BAD_KEY_SEQUENCE_NUMBER
Bad key sequence number.
@ TARGET_DEVICE_UNAVAILABLE
Target device unavailable.
@ NO_ROUTE_AVAILABLE
No route available.
@ LOW_BATTERY
Low battery.
@ TARGET_ADDRESS_UNALLOCATED
Target address unallocated.
@ SOURCE_ROUTE_FAILURE
Source route failure.
@ NO_INDIRECT_CAPACITY
No indirect capacity.
@ ADDRESS_CONFLICT
Address conflict.
@ UNKNOWN_COMMAND
Unknown command.
@ NON_TREE_LINK_FAILURE
Non tree link failure.
@ PARENT_LINK_FAILURE
Parent link failure.
@ NETWORK_ADDRESS_UPDATE
Network address update.
@ BAD_FRAME_COUNTER
Bad frame counter.
@ MCST
Multicast Address mode.
@ NO_ADDRESS
No destination address.
@ UCST_BCST
Unicast or Broadcast address mode.
@ NLME_NET_DISCV
Pending NLME-NETWORK-DISCOVERY.request primitive.
@ NLME_DIRECT_JOIN
Pending NLME-DIRECT-JOIN.request primitive.
@ NLME_NETWORK_FORMATION
Pending NLME-NETWORK-FORMATION.request primitive.
@ NLME_JOIN
Pending NLME-JOIN.request primitive.
@ NLDE_NLME_NONE
No pending primitive.
@ NLME_START_ROUTER
Pending NLME-START-ROUTER.request primitive.
@ NLME_JOIN_INDICATION
Pending NLME-JOIN.indication primitive.
@ NLME_ROUTE_DISCOVERY
Pending NLME-ROUTE-DISCOVERY.request primitive.
@ NLDE_DATA
Pending NLDE-DATA.request primitive.
@ BEACON_LOSS
The beacon was lost following a synchronization request.
@ UNSUPPORTED_LEGACY
Deprecated security used in IEEE 802.15.4-2003.
@ ALREADY_PRESENT
Already present (Zigbee specification r22.1.0)
@ READ_ONLY
SET/GET request issued for a read only attribute.
@ MAX_FRM_COUNTER
Max Frame counter (IEEE 802.15.4, Zigbee specification r22.1.0)
@ UNSUPPORTED_SECURITY
The security applied is not supported.
@ DISABLE_TRX_FAILURE
The attempt to disable the transceier has failed.
@ FULL_CAPACITY
PAN at capacity.
@ NO_DATA
No response data were available following a request.
@ IMPROPER_KEY_TYPE
The key is not allowed to be used with that frame type.
@ INVALID_PARAMETER_MAC
Invalid parameter in response to a request passed to the MAC.
@ TRANSACTION_OVERFLOW
There is no capacity to store the transaction.
@ SUPERFRAME_OVERLAP
Coordinator sperframe and this device superframe tx overlap.
@ NOT_PERMITED
Not permitted (Zigbee specification r22.1.0)
@ INVALID_REQUEST
Invalid request (Zigbee specification r22.1.0)
@ OUT_OF_CAP
(Deprecated) See IEEE 802.15.4-2003
@ NO_NETWORKS
No network (Zigbee specification r22.1.0)
@ SECURITY_ERROR
Cryptographic process of the frame failed(FAILED_SECURITY_CHECK).
@ UNSUPPORTED_ATTRIBUTE
Unsupported attribute (Zigbee specification r22.1.0)
@ TRANSACTION_EXPIRED
The transaction expired and its information discarded.
@ REALIGMENT
A coordinator realigment command has been received.
@ SUCCESS
The operation was completed successfully.
@ LIMIT_REACHED
Limit reached during network scan (IEEE 802.15.4-2011)
@ NO_SHORT_ADDRESS
Failure due to unallocated 16-bit short address.
@ INVALID_INTERFACE
Invalid interface (Zigbee specification r22.1.0)
@ INVALID_INDEX
A MAC PIB write failed because specified index is out of range.
@ UNAVAILABLE_KEY
Unavailable key, unknown or blacklisted.
@ INVALID_PARAMETER
Invalid Parameter (Zigbee specification r22.1.0)
@ INVALID_ADDRESS
Invalid source or destination address.
@ FRAME_NOT_BUFFERED
Frame not buffered (Zigbee specification r22.1.0)
@ IMPROPER_SECURITY_LEVEL
Insufficient security level expected by the recipient.
@ INVALID_HANDLE
When purging from TX queue handle was not found.
@ CHANNEL_ACCESS_FAILURE
A Tx could not take place due to activity in the CH.
@ TX_ACTIVE
The transceiver was already enabled.
@ BAD_CCM_OUTPUT
Bad ccm output (IEEE 802.15.4, Zigbee specification r22.1.0)
@ UNKNOWN_DEVICE
Unknown device (Zigbee specification r22.1.0)
@ ACCESS_DENIED
PAN access denied.
@ NEIGHBOR_TABLE_FULL
Neighbor table full (Zigbee specification r22.1.0)
@ FRAME_TOO_LONG
Frame more than aMaxPHYPacketSize or too large for CAP or GTS.
@ BT_TABLE_FULL
Bt table full (Zigbee specification r22.1.0)
@ DENIED
The GTS request has been denied by the PAN coordinator.
@ ROUTE_DISCOVERY_FAILED
Route discovery failed (Zigbee specification r22.1.0)
@ SYNC_FAILURE
Sync Failure (Zigbee specification r22.1.0)
@ TRACKING_OFF
This device is currently not tracking beacons.
@ COUNTER_ERROR
The frame counter of the received frame is invalid.
@ NO_ACK
No acknowledgment was received after macMaxFrameRetries.
@ STARTUP_FAILURE
Startup failure (Zigbee specification r22.1.0)
@ ON_TIME_TOO_LONG
RX enable request fail due to syms.
@ NO_BEACON
A scan operation failed to find any network beacons.
@ SCAN_IN_PROGRESS
The dev was scanning during this call (IEEE 802.5.4)
@ PAST_TIME
Rx enable request fail due to lack of time in superframe.
@ PAN_ID_CONFLICT
PAN id conflict detected and informed to the coordinator.
@ ROUTE_ERROR
Route error (Zigbee specification r22.1.0)
@ NO_KEY
No Key (Zigbee specification r22.1.0)
@ INVALID_GTS
Missing GTS transmit or undefined direction.
AddrAllocMethod
Use to describe the method used to assign addresses in the NWK layer.
@ STOCHASTIC_ALLOC
Stochastic address allocation (Zigbee Specification r22.1.0 Section 3.6.1.7)
@ DISTRIBUTED_ALLOC
Distributed address allocation (Zigbee Specification r22.1.0 Section 3.6.1.6)
JoiningMethod
Use to describe the parameter that controls the method of joining the network.
@ CHANGE_CHANNEL
The device is to change the operational network channel to that identified in the ScanChannel paramet...
@ REJOINING
The device is joining the network using the rejoining procedure.
@ ASSOCIATION
The device is requesting to join a network through association.
@ DIRECT_OR_REJOIN
The device is joining directly or rejoining using the orphaning procedure.
StackProfile
Use to describe the identifier of the zigbee stack profile.
@ ZIGBEE
Zigbee stack profile 0x01 (a.k.a.
@ ZIGBEE_PRO
Zigbee stack profile 0x02 (Zigbee Pro, also known as r22.1.0, 3.0)
std::ostream & operator<<(std::ostream &os, const NwkStatus &state)
Overloaded operator to print the value of a NwkStatus.
RouteDiscoveryStatus
The status returned while attempting to find the next hop in route towards a specific destination or ...
@ NO_DISCOVER_ROUTE
We are currently not allowed to perform a route discovery for this route (RouteDiscover flag in netwo...
@ ROUTE_NOT_FOUND
The next hop was not found.
@ MANY_TO_ONE_ROUTE
A new Many-To-One route was created.
@ ROUTE_FOUND
The next hop toward the destination was found in our routing table or neighbor table (Mesh route).
@ NO_ROUTE_CHANGE
No route entry was created or updated during a Many-To-One process.
@ DISCOVER_UNDERWAY
The route was found in the tables but currently has no next hop.
@ ROUTE_UPDATED
A route was found and updated with a better route (Mesh route or Many-To-One route)
@ TABLE_FULL
Either the routing or neighbor table are full.
static constexpr uint32_t ALL_CHANNELS
Bitmap representing all channels (11~26) LSB b0-b26, b27-b31 MSB Page 0 in Zigbee (250kbps O-QPSK)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
MCPS-DATA.confirm params.
MCPS-DATA.indication params.
MLME-ASSOCIATE.confirm params.
MLME-ASSOCIATE.indication params.
MLME-ASSOCIATE.request params.
MLME-BEACON-NOTIFY.indication params.
MLME-COMM-STATUS.indication params.
MLME-ORPHAN.indication params.
MLME-SCAN.confirm params.
MLME-START.confirm params.
uint8_t channelPageCount
The number of the channel page structures contained in the channel list structure.
std::vector< uint32_t > channelsField
The set of channels for a given page.
Network Descriptor, Zigbee Specification r22.1.0, 3.2.2.4, Table 3-12.
uint16_t m_panId
The 16-bit PAN identifier of the network.
uint8_t m_updateId
The value of the UpdateID from the NIB.
uint8_t m_superframeOrder
The superframe order value of the underlying MAC (Determinates the value of the active period)
bool m_routerCapacity
TRUE = The device is able to accept join requests from router-capable devices.
bool m_endDeviceCapacity
TRUE= The device is able to accept join request from end devices.
StackProfile m_stackProfile
The Zigbee stack profile identifier in use in the discovered network.
uint8_t m_logCh
The current channel number occupied by the network.
uint8_t m_beaconOrder
The beacon order value of the underlying MAC.
uint8_t m_zigbeeVersion
The version of the zigbee protocol in use in the discovered network.
uint64_t m_extPanId
The 64-bit PAN identifier of the network.
bool m_permitJoining
TRUE = Indicates that at least one zigbee router on the network currently permits joining.
NLDE-DATA.confirm params.
uint8_t m_nsduHandle
The handle associated with the NSDU being confirmed.
NwkStatus m_status
The status of the corresponding request.
Time m_txTime
The time indication for the transmitted packet based on the local clock.
NLDE-DATA.indication params.
AddressMode m_dstAddrMode
Destination address mode.
Time m_rxTime
A time indication for the received packet based on the local clock.
uint32_t m_nsduLength
The number of octets comprising the NSDU being indicated.
uint8_t m_linkQuality
LQI value delivered by the MAC on receipt of this frame.
bool m_securityUse
An indication of whether the received data is using security.
Mac16Address m_srcAddr
The individual device address from which the NSDU originated.
Mac16Address m_dstAddr
The destination address to which the NSDU was sent.
NLDE-DATA.request params.
uint8_t m_nonMemberRadius
Distance in hops that a multicast frame will be relayed by nodes not a member of the group.
uint32_t m_nsduLength
The number of octets comprising the NSDU to be transferred.
SequenceNumber8 m_aliasSeqNumber
The sequence number used by this NSDU (ignored if useAlias = false).
Mac16Address m_dstAddr
The destination address.
bool m_securityEnable
Enable NWK layer security for the current frame.
bool m_useAlias
Indicates if next higher layer use an alias for the current frame.
Mac16Address m_aliasSrcAddr
The source address to be used by this NSDU (ignored ifuseAlias = false).
uint8_t m_nsduHandle
The NSDU handle.
uint8_t m_radius
Distance in hops that the frame is allowed to travel through the network.
AddressMode m_dstAddrMode
Destination address mode.
uint8_t m_discoverRoute
0x01 Enable Route Discovery | 0x00: Suppress Route discovery
NLME-DIRECT-JOIN.confirm params.
NwkStatus m_status
The status the corresponding request.
Mac64Address m_deviceAddr
The IEEE EUI-64 address in the request to which this is a confirmation.
NLME-DIRECT-JOIN.request params.
Mac64Address m_deviceAddr
The EUI-64 bit address of the device directly joined.
uint8_t m_capabilityInfo
The operating capabilities of the device being directly joined.
NLME-JOIN.confirm params.
Mac16Address m_networkAddress
The 16 bit network address that was allocated to this device.
NwkStatus m_status
The status of the corresponding request.
uint8_t m_macInterfaceIndex
The value of the MAC index from nwkMacInterfaceTable.
uint64_t m_extendedPanId
The extended 64 bit PAN ID for the network of which the device is now a member.
ChannelList m_channelList
The structure indicating the current channel of the network that has been joined.
bool m_enhancedBeacon
True if using enhanced beacons (placeholder, not supported)
NLME-JOIN.indication params.
Mac64Address m_extendedAddress
The EUI-64 bit address of an entity that has been added to the network.
uint8_t m_capabilityInfo
Specifies the operational capabilities of the joining device.
JoiningMethod m_rejoinNetwork
This parameter indicates the method used to join the network.
Mac16Address m_networkAddress
The 16 bit network address of an entity that has been added to the network.
bool m_secureRejoin
True if the rejoin was performed in a secure manner.
NLME-JOIN.request params.
JoiningMethod m_rejoinNetwork
This parameter controls the method of joining the network.
ChannelList m_scanChannelList
The list of all channel pages and the associated channels that shall be scanned.
uint8_t m_scanDuration
A value used to calculate the length of time to spend scanning each channel.
uint8_t m_capabilityInfo
The operating capabilities of the device being directly joined (Bit map).
uint64_t m_extendedPanId
The 64 bit PAN identifier of the the network to join.
bool m_securityEnable
If the value of RejoinNetwork is REJOINING and this value is true, the device will rejoin securely.
NLME-NETWORK-DISCOVERY.confirm params.
uint8_t m_networkCount
Gives the number of networks discovered by the search.
std::vector< NetworkDescriptor > m_netDescList
A list of descriptors, one for each of the networks discovered.
NwkStatus m_status
The status of the corresponding request.
NLME-NETWORK-DISCOVERY.request params.
uint8_t m_scanDuration
A value used to calculate the length of time to spend.
ChannelList m_scanChannelList
The list of all channel pages and the associated channels that shall be scanned.
NLME-ROUTE-DISCOVERY.confirm params.
NwkStatus m_status
The status as a result of this request.
NetworkStatusCode m_networkStatusCode
In case where.
NLME-ROUTE-DISCOVERY.request params.
bool m_noRouteCache
This flag determines whether the NWK should establish a route record table.
AddressMode m_dstAddrMode
Specifies the kind of destination address.
uint16_t m_radius
Optional parameter that describes the number of hops that the route request will travel through the n...
Mac16Address m_dstAddr
The destination of the route discovery.
NLME-START-ROUTER.confirm params.
NwkStatus m_status
The status of the corresponding request.
NLME-START-ROUTER.request params.
uint8_t m_beaconOrder
The beacon order of the network.
bool m_batteryLifeExt
True if the router supports battery life extension mode.
uint8_t m_superframeOrder
The superframe order of the network.
Structure representing an element in the pending transaction queue.
Time expireTime
The expiration time of the packet.
Mac16Address dstAddr
The destination network Address.
uint8_t nsduHandle
The NSDU handle.
Ptr< Packet > txPkt
The pending packet.
Structure representing an element in the Tx Buffer.
Ptr< Packet > txPkt
The buffered packet.
uint8_t nwkHandle
The nwk handle (nsdu handle).
uint8_t macHandle
The mac handle (msdu handle).