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

Class that implements the Zigbee Specification Network Layer. More...

#include "zigbee-nwk.h"

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

Classes

struct  PendingTxPkt
 Structure representing an element in the pending transaction queue. More...
 
struct  TxPkt
 Structure representing an element in the Tx Buffer. More...
 

Public Types

typedef void(* RreqRetriesExhaustedTracedCallback) (uint8_t rreqId, Mac16Address dst, uint8_t rreqRetriesNum)
 TracedCallback signature for RreqRetriesExhaustedTrace events.
 

Public Member Functions

 ZigbeeNwk ()
 Default constructor.
 
 ~ZigbeeNwk () override
 
int64_t AssignStreams (int64_t stream)
 Assign a fixed random variable stream number to the random variables used by this model.
 
Mac16Address FindRoute (Mac16Address dst, bool &neighbor)
 Search for a specific destination in this device neighbor and routing tables.
 
Mac64Address GetIeeeAddress () const
 Obtain this device 64 bit IEEE address (A.K.A.
 
Ptr< lrwpan::LrWpanMacBaseGetMac () const
 Get the underlying MAC used by the current Zigbee NWK.
 
Mac16Address GetNetworkAddress () const
 Obtain this device 16 bit network address (A.K.A.
 
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 data to another device.
 
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 NWK (receiving)
 
void MlmeAssociateConfirm (lrwpan::MlmeAssociateConfirmParams params)
 IEEE 802.15.4-2011 section MlME-ASSOCIATE.confirm Report the results of an associate request attempt.
 
void MlmeAssociateIndication (lrwpan::MlmeAssociateIndicationParams params)
 IEEE 802.15.4-2011, Section 6.2.2.2.
 
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 reception of a beacon with payload.
 
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 communication status.
 
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 PIB attribute.
 
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.3 (parent procedure) MLME-ORPHAN.indication Generated by the coordinator and issued to its next higher layer on receipt of an orphan notification command, as defined in 5.3.6.
 
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 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 PIB attribute.
 
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.
 
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 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 layer of a Zigbee coordinator or router to request to directly join another device to its network.
 
void NlmeJoinRequest (NlmeJoinRequestParams params)
 Zigbee Specification r22.1.0, section 3.2.2.13 NLME-JOIN.request This primitive allows the next higher layer to request to join or rejoin a network, or to change the operating channel for the device while within an operating network.
 
void NlmeNetworkDiscoveryRequest (NlmeNetworkDiscoveryRequestParams params)
 Zigbee Specification r22.1.0, section 3.2.2.3 NLME-NETWORK-DISCOVERY.request Allows the next higher layer to request that the NWK layer discover networks currently operating within the personal operating space (POS).
 
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 formation of a network in a capable device.
 
void NlmeRouteDiscoveryRequest (NlmeRouteDiscoveryRequestParams params)
 Zigbee Specification r22.1.0, section 3.2.2.33.3 and 3.6.3.5 NLME-ROUTE-DISCOVERY.request Allows the next higher layer to initiate route discovery.
 
void NlmeStartRouterRequest (NlmeStartRouterRequestParams params)
 Zigbee Specification r22.1.0, section 3.2.2.9 NLME-START-ROUTER.request This primitive allows the next higher layer of a Zigbee router to initiate the activities expected of a Zigbee router including the routing of data framaes, route discovery, and the accepting of request to join the network from other devices.
 
void PrintNeighborTable (Ptr< OutputStreamWrapper > stream) const
 Print the entries in the neighbor table.
 
void PrintRouteDiscoveryTable (Ptr< OutputStreamWrapper > stream)
 Print the entries in the route discovery table.
 
void PrintRoutingTable (Ptr< OutputStreamWrapper > stream) const
 Print the entries in the routing table.
 
void PrintRREQRetryTable (Ptr< OutputStreamWrapper > stream) const
 Print the entries in the RREQ retry table.
 
void SetMac (Ptr< lrwpan::LrWpanMacBase > mac)
 Set the underlying MAC to use in this Zigbee NWK.
 
void SetNldeDataConfirmCallback (NldeDataConfirmCallback c)
 Set the callback as part of the interconnections between the NWK and the APS sublayer (or any other higher layer).
 
void SetNldeDataIndicationCallback (NldeDataIndicationCallback c)
 Set the callback for the end of a RX, as part of the interconnections between the NWK and the APS sublayer.
 
void SetNlmeDirectJoinConfirmCallback (NlmeDirectJoinConfirmCallback c)
 Set the callback as part of the interconnections between the NWK and the APS sublayer (or any other higher layer).
 
void SetNlmeJoinConfirmCallback (NlmeJoinConfirmCallback c)
 Set the callback as part of the interconnections between the NWK and the APS sublayer (or any other higher layer).
 
void SetNlmeJoinIndicationCallback (NlmeJoinIndicationCallback c)
 Set the callback as part of the interconnections between the NWK and the APS sublayer (or any other higher layer).
 
void SetNlmeNetworkDiscoveryConfirmCallback (NlmeNetworkDiscoveryConfirmCallback c)
 Set the callback as part of the interconnections between the NWK and the APS sublayer (or any other higher layer).
 
void SetNlmeNetworkFormationConfirmCallback (NlmeNetworkFormationConfirmCallback c)
 Set the callback as part of the interconnections between the NWK and the APS sublayer (or any other higher layer).
 
void SetNlmeRouteDiscoveryConfirmCallback (NlmeRouteDiscoveryConfirmCallback c)
 Set the callback as part of the interconnections between the NWK and the APS sublayer (or any other higher layer).
 
void SetNlmeStartRouterConfirmCallback (NlmeStartRouterConfirmCallback c)
 Set the callback as part of the interconnections between the NWK and the APS sublayer (or any other higher layer).
 
- Public Member Functions inherited from ns3::Object
 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< ObjectGetObject () 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< ObjectGetObject (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.
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 
- 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::Object
static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID.
 

Protected Member Functions

void DoDispose () override
 Destructor implementation.
 
void DoInitialize () override
 Initialize() implementation.
 
void NotifyConstructionCompleted () override
 Notifier called once the ObjectBase is fully constructed.
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
 
virtual void NotifyNewAggregate ()
 Notify all Objects aggregated to this one of a new Object being aggregated.
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes.
 

Private Member Functions

Mac16Address AllocateNetworkAddress ()
 Used by a Zigbee coordinator or router to allocate a 16 bit address (A.K.A short address or network address) to its associated device upon request.
 
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, retransmission of DATA broadcasts, push of confirm notifications to the next layer)
 
bool DequeuePendingTx (Mac16Address dst, Ptr< PendingTxPkt > entry)
 Dequeue a packet previously enqueued in the pending transmission queue.
 
void DisposePendingTx ()
 Dispose of all PendingTxPkt accumulated in the pending transmission queue.
 
void DisposeTxPktBuffer ()
 Dispose of all the entries in the TxPkt Buffer.
 
void EnqueuePendingTx (Ptr< Packet > p, uint8_t nsduHandle)
 Enqueue a packet in the pending transmission queue until a route is discovered for its destination.
 
RouteDiscoveryStatus FindNextHop (Mac16Address macSrcAddr, uint8_t pathCost, ZigbeeNwkHeader nwkHeader, ZigbeePayloadRouteRequestCommand payload, Mac16Address &nextHop)
 Find the next hop in route to a destination.
 
uint8_t GetLinkCost (uint8_t lqi) const
 Obtain the link cost based on the value of the nwkReportConstantCost.
 
uint8_t GetLQINonLinearValue (uint8_t lqi) const
 Get a non linear representation of a Link Quality Indicator (LQI).
 
NwkStatus GetNwkStatus (lrwpan::MacStatus macStatus) const
 Cast a Mac layer status to a NWK layer status.
 
bool IsBroadcastAddress (Mac16Address address)
 Returns true if the address is a broadcast address according to Zigbee specification r22.1.0, Section 3.6.5, Table 3-69.
 
RouteDiscoveryStatus ProcessManyToOneRoute (Mac16Address macSrcAddr, uint8_t pathCost, ZigbeeNwkHeader nwkHeader, ZigbeePayloadRouteRequestCommand payload)
 Process Many-To-One routes.
 
void ReceiveRREP (Mac16Address macSrcAddr, uint8_t linkCost, ZigbeeNwkHeader nwkHeader, ZigbeePayloadRouteReplyCommand payload)
 Handles the reception of a route reply command.
 
void ReceiveRREQ (Mac16Address macSrcAddr, uint8_t linkCost, ZigbeeNwkHeader nwkHeader, ZigbeePayloadRouteRequestCommand payload)
 Handles the reception of a route request command.
 
bool RetrieveTxPkt (uint8_t macHandle, Ptr< TxPkt > &txPkt)
 Retrieves a previously DATA frame buffered in the TxPkt buffer.
 
void SendDataBcst (Ptr< Packet > packet, uint8_t nwkHandle)
 Send a data broadcast packet, and add a record to the broadcast transaction table (BTT).
 
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 transmission until a route is found.
 
void SendRREP (Mac16Address nextHop, Mac16Address originator, Mac16Address responder, uint8_t rreqId, uint8_t pathcost)
 Construct and send a route reply command.
 
void SendRREQ (ZigbeeNwkHeader nwkHeader, ZigbeePayloadRouteRequestCommand payload, uint8_t rreqRetries)
 Send a route request command.
 
void UpdateBeaconPayload ()
 Updates the content of the beacon payload with the most recent information in the NWK.
 
void UpdateBeaconPayloadLength ()
 Create and store a MAC beacon payload, then updates its registered size in the MAC.
 

Private Attributes

lrwpan::MlmeAssociateRequestParams m_associateParams
 Temporarily store MLME-ASSOCIATE.request parameters during a NLME-JOIN.request.
 
Ptr< Packetm_beaconPayload
 Points to the beacon payload used during the network formation process.
 
BroadcastTransactionTable m_btt
 The broadcast transaction table.
 
uint8_t m_countRREQRetries
 Count the number of retries this device has transmitted an RREQ.
 
uint8_t m_currentChannel
 Used to store the value of the PHY current channel.
 
uint32_t m_filteredChannelMask
 Contains the list of channels with acceptable energy levels in a bitmap form.
 
NlmeJoinIndicationParams m_joinIndParams
 Temporarily store the NLME-JOIN.indication parameters while the join operations (asocciation) conclude in the coordinator or router.
 
NlmeJoinRequestParams m_joinParams
 The parameters used during a NLME-JOIN.request.
 
Ptr< lrwpan::LrWpanMacBasem_mac
 Pointer to the underlying MAC connected to this Zigbee NWK.
 
SequenceNumber8 m_macHandle
 The handle assigned when doing a transmission request to the MAC layer.
 
uint32_t m_maxPendingTxQueueSize
 The maximum size of the pending transaction queue.
 
NlmeNetworkFormationRequestParams m_netFormParams
 The parameters used during a NLME-NETWORK-FORMATION.request.
 
Ptr< NetFormPendingParamsGenm_netFormParamsGen
 The values temporarily stored as a result of the initial steps of a NLME-NETWORK-FORMATION.request (i.e.
 
std::vector< NetworkDescriptorm_networkDescriptorList
 Temporarily store beacons information from POS routers and PAN coordinators during a network-discovery process.
 
NldeDataConfirmCallback m_nldeDataConfirmCallback
 This callback is used to respond to data PDU (NSDU) transfer request issued by APS sublayer to the NWK (or a layer higher to NWK).
 
NldeDataIndicationCallback m_nldeDataIndicationCallback
 This callback is used to notify incoming packets to the APS sublayer.
 
NlmeDirectJoinConfirmCallback m_nlmeDirectJoinConfirmCallback
 This callback is used by the next layer of a zigbee coordinator or router to be notified of the result of its request to directly join another device to its network See Zigbee specification r22.1.0, section 3.2.2.17.
 
NlmeJoinConfirmCallback m_nlmeJoinConfirmCallback
 This callback is used by the next layer of a zigbee router or device to be notified of the result of its request to join another device network.
 
NlmeJoinIndicationCallback m_nlmeJoinIndicationCallback
 This callback is used by the next layer of a zigbee coordinator or router to be notified when a new device has successfully joined its network by association or rejoined procedures.
 
NlmeNetworkDiscoveryConfirmCallback m_nlmeNetworkDiscoveryConfirmCallback
 This callback is used to to notify the results of a network formation to the APS sublayer making the request.
 
NlmeNetworkFormationConfirmCallback m_nlmeNetworkFormationConfirmCallback
 This callback is used to to notify the results of a network formation to the APS sublayer making the request.
 
NlmeRouteDiscoveryConfirmCallback m_nlmeRouteDiscoveryConfirmCallback
 This callback is used to to notify the results of a network formation to the APS sublayer making the request.
 
NlmeStartRouterConfirmCallback m_nlmeStartRouterConfirmCallback
 This callback is used by the next layer of a zigbee router or device to be notified of the result of its request to initiate activities as a zigbee router See Zigbee specification r22.1.0, section 3.2.2.10.
 
AddrAllocMethod m_nwkAddrAlloc
 A value that determines the method used to assign addresses.
 
uint8_t m_nwkCapabilityInformation
 This NIB attribute contains the device capability information established at network joining time.
 
bool m_nwkcCoordinatorCapable
 Indicates whether the device is capable of becoming the ZigBee coordinator Zigbee Specification r22.1.0, Table 3-57.
 
uint8_t m_nwkcInitialRREQRetries
 The number of times the first broadcast transmission of a route request command frame is retried.
 
double m_nwkcMaxRREQJitter
 Maximum Route request broadcast jitter time (msec).
 
double m_nwkcMinRREQJitter
 Minimum Route request broadcast jitter time (msec).
 
uint8_t m_nwkConcentratorDiscoveryTime
 The time in seconds between concentrator route discoveries.
 
uint8_t m_nwkConcentratorRadius
 This NIB attribute indicates the hop count radius for concentrator route discoveries (Used by Many-To-One routing).
 
uint8_t m_nwkcProtocolVersion
 Indicates the version of the ZigBee NWK protocol in the device.
 
Time m_nwkcRouteDiscoveryTime
 Indicates the duration until a route discovery expires.
 
uint8_t m_nwkcRREQRetries
 The number of times the broadcast transmission of a route request command frame is retried on relay by an intermediate Zigbee router or coordinator.
 
Time m_nwkcRREQRetryInterval
 Duration between retries of a broadcast route request command frame.
 
uint16_t m_nwkEndDeviceTimeoutDefault
 Indicates the index of the requested timeout field that contains the timeout in minutes for any end device that does not negotiate a different timeout value.
 
uint64_t m_nwkExtendedPanId
 The extended PAN identifier for the PAN of which the device is a member.
 
Mac64Address m_nwkIeeeAddress
 The EUI 64 bit IEEE address of the local device.
 
bool m_nwkIsConcentrator
 This NIB attribute is a flag determining if this device is a concentrator (Use in Many-To-One routing).
 
uint8_t m_nwkMaxBroadcastRetries
 The maximum number of retries allowed after a broadcast transmission failure See Zigbe Specification r22.1.0, Table 3-58 (NIB attributes)
 
uint16_t m_nwkMaxChildren
 The number of children a device is allowed to have on its current network.
 
uint8_t m_nwkMaxDepth
 The depth a device can have.
 
uint16_t m_nwkMaxRouters
 The number of routers any one device is allowed to have as children.
 
NeighborTable m_nwkNeighborTable
 The network layer neighbor table See Zigbee specification r22.1.0, 3.6.1.5.
 
Mac16Address m_nwkNetworkAddress
 The 16-bit address that the device uses to communicate with the PAN.
 
Time m_nwkNetworkBroadcastDeliveryTime
 Time duration that a broadcast message needs to encompass the entire network.
 
uint16_t m_nwkPanId
 This NIB attribute should, at all times, have the same value as macPANId .
 
uint8_t m_nwkParentInformation
 The behavior depends upon whether the device is a FFD or RFD.
 
Time m_nwkPassiveAckTimeout
 The maximum time duration in milliseconds allowed for the parent all the child devices to retransmit a broadcast message.
 
bool m_nwkReportConstantCost
 If false, the NWK layer shall calculate the link cost from all neighbor nodes using the LQI values reported by the MAC layer, otherwise it shall report a constant value (7).
 
RouteDiscoveryTable m_nwkRouteDiscoveryTable
 The network route discovery table See Zigbee specification r22.1.0, 3.6.3.2.
 
RoutingTable m_nwkRoutingTable
 The network layer routing table See Zigbee specification r22.1.0, 3.6.3.2.
 
SequenceNumber8 m_nwkSequenceNumber
 The sequence number used to identify outgoing frames See Zigbee specification r22.1.0, Table 3-58 (NIB attributes)
 
StackProfile m_nwkStackProfile
 Describes the current stack profile used in this NWK layer.
 
bool m_nwkSymLink
 Describes the current route symmetry: True: Routes are considered to be symmetric links.
 
bool m_nwkUseTreeRouting
 This NIB attribute indicates whether the NWK layer should assume the ability to use hierarchical routing.
 
PanIdTable m_panIdTable
 Use to keep track of neighboring 16 bit PAN id.
 
std::deque< Ptr< PendingTxPkt > > m_pendingTxQueue
 The pending transaction queue of data packets awaiting to be transmitted until a route to the destination becomes available.
 
PendingPrimitiveNwk m_pendPrimitiveNwk
 Indicates the current primitive in use in the NWK layer.
 
Time m_routeExpiryTime
 The expiration time of routing table entry.
 
SequenceNumber8 m_routeRequestId
 The counter used to identify route request commands.
 
Ptr< UniformRandomVariablem_rreqJitter
 Provides uniform random values for the route request jitter.
 
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.
 
RreqRetryTable m_rreqRetryTable
 Keep track of all the route request retries.
 
uint8_t m_scanEnergyThreshold
 The maximum acceptable energy level used in an energy scan taking place during a NLME-NETWORK-FORMATION.request.
 
NlmeStartRouterRequestParams m_startRouterParams
 Temporarily store the NLME-START-ROUTER.request parameters during the router initialization process.
 
std::deque< Ptr< TxPkt > > m_txBuffer
 The transmission buffer.
 
uint8_t m_txBufferMaxSize
 The maximum size of the transmission buffer.
 
Ptr< UniformRandomVariablem_uniformRandomVariable
 Provides uniform random values.
 

Additional Inherited Members

Detailed Description

Class that implements the Zigbee Specification Network Layer.

Introspection did not find any typical Config paths.


Attributes

  • MaxPendingTxQueueSize: The maximum size of the table storing pending packets awaiting to be transmitted after discovering a route to the destination.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 10
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • NwkcCoordinatorCapable: [Constant] Indicates whether the device is capable of becoming aZigbee coordinator.
    • Set with class: ns3::BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • NwkcInitialRREQRetries: [Constant] The number of times the first broadcast transmissionof a RREQ cmd frame is retried.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 0:255
    • Initial value: 3
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • NwkcMaxRREQJitter: [Constant] The duration between retries of a broadcast RREQ (msec)
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 128
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • NwkcMinRREQJitter: [Constant] The minimum jitter for broadcast retransmission of a RREQ (msec)
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 2
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • NwkcProtocolVersion: [Constant] The version of the Zigbee NWK protocol inthe device (placeholder)
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 0:255
    • Initial value: 2
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • NwkcRREQRetries: [Constant] The number of times the broadcast transmission of aRREQ cmd frame is retried on relay by intermediate router orcoordinator.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 0:255
    • Initial value: 2
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • NwkcRREQRetryInterval: [Constant] The duration between retries of a broadcast RREQ cmd frame.
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9.22337e+18ns:+9.22337e+18ns
    • Initial value: +2.54e+08ns
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • NwkcRouteDiscoveryTime: [Constant] The duration until a route discovery expires
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9.22337e+18ns:+9.22337e+18ns
    • Initial value: +1e+10ns
    • Flags: constructwriteread
    • Support level: SUPPORTED

TraceSources

Group: Zigbee

Size of this type is 1168 bytes (on a 64-bit architecture).

Definition at line 689 of file zigbee-nwk.h.

Member Typedef Documentation

◆ RreqRetriesExhaustedTracedCallback

typedef void(* ns3::zigbee::ZigbeeNwk::RreqRetriesExhaustedTracedCallback) (uint8_t rreqId, Mac16Address dst, uint8_t rreqRetriesNum)

TracedCallback signature for RreqRetriesExhaustedTrace events.

Parameters
rreqIdThe RREQ id used in the retries
dstThe destination address of the RREQ retries
rreqRetriesNumThe number of rreq retries attempted

Definition at line 1059 of file zigbee-nwk.h.

Constructor & Destructor Documentation

◆ ZigbeeNwk()

ns3::zigbee::ZigbeeNwk::ZigbeeNwk ( )

Default constructor.

Definition at line 105 of file zigbee-nwk.cc.

References NS_LOG_FUNCTION.

◆ ~ZigbeeNwk()

ns3::zigbee::ZigbeeNwk::~ZigbeeNwk ( )
override

Definition at line 163 of file zigbee-nwk.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ AllocateNetworkAddress()

Mac16Address ns3::zigbee::ZigbeeNwk::AllocateNetworkAddress ( )
private

Used by a Zigbee coordinator or router to allocate a 16 bit address (A.K.A short address or network address) to its associated device upon request.

Returns
The allocated 16 bit address by this router or Zigbee coordinator.

Definition at line 2805 of file zigbee-nwk.cc.

References ns3::zigbee::DISTRIBUTED_ALLOC, m_nwkAddrAlloc, m_uniformRandomVariable, NS_FATAL_ERROR, NS_LOG_FUNCTION, and ns3::zigbee::STOCHASTIC_ALLOC.

Referenced by MlmeAssociateIndication(), and NlmeDirectJoinRequest().

+ Here is the caller graph for this function:

◆ AssignStreams()

int64_t ns3::zigbee::ZigbeeNwk::AssignStreams ( int64_t stream)

Assign a fixed random variable stream number to the random variables used by this model.

Return the number of streams (possibly zero) that have been assigned.

Parameters
streamfirst stream index to use
Returns
the number of stream indices assigned by this model

Definition at line 3032 of file zigbee-nwk.cc.

References m_uniformRandomVariable, and NS_LOG_FUNCTION.

◆ BufferTxPkt()

void ns3::zigbee::ZigbeeNwk::BufferTxPkt ( Ptr< Packet > p,
uint8_t macHandle,
uint8_t nwkHandle )
private

Buffer a copy of a DATA frame for post transmission handling (Transmission failure counts, retransmission of DATA broadcasts, push of confirm notifications to the next layer)

Parameters
pThe DATA packet to be buffered in the TxPkt buffer.
macHandleThe mac layer handle (msdu handle) associated to this frame.
nwkHandleThe nwk layer handle (nsdu handle) associated to this frame.

Definition at line 2753 of file zigbee-nwk.cc.

References ns3::Create(), m_txBuffer, m_txBufferMaxSize, and NS_LOG_DEBUG.

Referenced by NldeDataRequest(), ReceiveRREP(), SendDataBcst(), and SendDataUcst().

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

◆ DequeuePendingTx()

bool ns3::zigbee::ZigbeeNwk::DequeuePendingTx ( Mac16Address dst,
Ptr< PendingTxPkt > entry )
private

Dequeue a packet previously enqueued in the pending transmission queue.

This is called after a route has successfully be found and the DATA packet is ready to be transmitted.

Parameters
dstThe destination of the packet
entryThe pending packet element
Returns
True if successfully dequeued

Definition at line 2721 of file zigbee-nwk.cc.

References m_pendingTxQueue.

Referenced by ReceiveRREP().

+ Here is the caller graph for this function:

◆ DisposePendingTx()

void ns3::zigbee::ZigbeeNwk::DisposePendingTx ( )
private

Dispose of all PendingTxPkt accumulated in the pending transmission queue.

Definition at line 2743 of file zigbee-nwk.cc.

References m_pendingTxQueue.

Referenced by DoDispose().

+ Here is the caller graph for this function:

◆ DisposeTxPktBuffer()

void ns3::zigbee::ZigbeeNwk::DisposeTxPktBuffer ( )
private

Dispose of all the entries in the TxPkt Buffer.

Definition at line 2789 of file zigbee-nwk.cc.

References m_txBuffer.

Referenced by DoDispose().

+ Here is the caller graph for this function:

◆ DoDispose()

void ns3::zigbee::ZigbeeNwk::DoDispose ( )
overrideprotectedvirtual

Destructor implementation.

This method is called by Dispose() or by the Object's destructor, whichever comes first.

Subclasses are expected to implement their real destruction code in an overridden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.

It is safe to call GetObject() from within this method.

Reimplemented from ns3::Object.

Definition at line 176 of file zigbee-nwk.cc.

References ns3::zigbee::BroadcastTransactionTable::Dispose(), ns3::zigbee::NeighborTable::Dispose(), ns3::zigbee::PanIdTable::Dispose(), ns3::zigbee::RouteDiscoveryTable::Dispose(), ns3::zigbee::RoutingTable::Dispose(), ns3::zigbee::RreqRetryTable::Dispose(), DisposePendingTx(), DisposeTxPktBuffer(), ns3::Object::DoDispose(), m_btt, m_mac, m_nldeDataConfirmCallback, m_nldeDataIndicationCallback, m_nlmeDirectJoinConfirmCallback, m_nlmeJoinConfirmCallback, m_nlmeJoinIndicationCallback, m_nlmeNetworkDiscoveryConfirmCallback, m_nlmeNetworkFormationConfirmCallback, m_nlmeRouteDiscoveryConfirmCallback, m_nlmeStartRouterConfirmCallback, m_nwkNeighborTable, m_nwkRouteDiscoveryTable, m_nwkRoutingTable, m_panIdTable, m_rreqRetryTable, ns3::MakeNullCallback(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ DoInitialize()

void ns3::zigbee::ZigbeeNwk::DoInitialize ( )
overrideprotectedvirtual

Initialize() implementation.

This method is called only once by Initialize(). If the user calls Initialize() multiple times, DoInitialize() is called only the first time.

Subclasses are expected to override this method and chain up to their parent's implementation once they are done. It is safe to call GetObject() and AggregateObject() from within this method.

Reimplemented from ns3::Object.

Definition at line 169 of file zigbee-nwk.cc.

References ns3::Object::DoInitialize(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ EnqueuePendingTx()

void ns3::zigbee::ZigbeeNwk::EnqueuePendingTx ( Ptr< Packet > p,
uint8_t nsduHandle )
private

Enqueue a packet in the pending transmission queue until a route is discovered for its destination.

Parameters
pThe packet to enqueue.
nsduHandleThe handle associated to this packet

Definition at line 2698 of file zigbee-nwk.cc.

References ns3::Create(), ns3::zigbee::ZigbeeNwkHeader::GetDstAddr(), m_maxPendingTxQueueSize, and m_pendingTxQueue.

Referenced by SendDataUcst().

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

◆ FindNextHop()

RouteDiscoveryStatus ns3::zigbee::ZigbeeNwk::FindNextHop ( Mac16Address macSrcAddr,
uint8_t pathCost,
ZigbeeNwkHeader nwkHeader,
ZigbeePayloadRouteRequestCommand payload,
Mac16Address & nextHop )
private

Find the next hop in route to a destination.

See RouteDiscoveryStatus enumeration for full information on the returned status.

Parameters
macSrcAddrThe MAC address received from the previous hop.
pathCostThe path cost accumulated in the route discovery so far.
nwkHeaderThe network header created at the initiator or the received RREQ.
payloadThe payload header of the initiator or the received RREQ.
nextHopIf the destination is found in the routing or neighbor tables it contains the address of the next hop towards the destination.
Returns
The RouteDiscoveryStatus of the route search attempt

Definition at line 709 of file zigbee-nwk.cc.

References ns3::zigbee::RouteDiscoveryTable::AddEntry(), ns3::zigbee::RoutingTable::AddEntry(), ns3::Create(), ns3::zigbee::RoutingTable::DeleteExpiredEntry(), ns3::zigbee::DISCOVER_UNDERWAY, ns3::zigbee::ENABLE_ROUTE_DISCOVERY, ns3::zigbee::ZigbeeNwkHeader::GetDiscoverRoute(), ns3::zigbee::ZigbeePayloadRouteRequestCommand::GetDstAddr(), ns3::zigbee::RoutingTable::GetMaxTableSize(), ns3::zigbee::ZigbeePayloadRouteRequestCommand::GetRouteReqId(), ns3::zigbee::RoutingTable::GetSize(), ns3::zigbee::ZigbeeNwkHeader::GetSrcAddr(), ns3::Callback< R, UArgs >::IsNull(), ns3::zigbee::NeighborTable::LookUpEntry(), ns3::zigbee::RouteDiscoveryTable::LookUpEntry(), ns3::zigbee::RoutingTable::LookUpEntry(), ns3::zigbee::NlmeRouteDiscoveryConfirmParams::m_networkStatusCode, m_nlmeRouteDiscoveryConfirmCallback, m_nwkcRouteDiscoveryTime, m_nwkNeighborTable, m_nwkRouteDiscoveryTable, m_nwkRoutingTable, m_routeExpiryTime, ns3::zigbee::NlmeRouteDiscoveryConfirmParams::m_status, ns3::zigbee::NO_DISCOVER_ROUTE, ns3::zigbee::NO_ROUTE_AVAILABLE, ns3::zigbee::NO_ROUTING_CAPACITY, ns3::Simulator::Now(), NS_LOG_FUNCTION, ns3::zigbee::ROUTE_ACTIVE, ns3::zigbee::ROUTE_DISCOVERY_UNDERWAY, ns3::zigbee::ROUTE_ERROR, ns3::zigbee::ROUTE_FOUND, ns3::zigbee::ROUTE_NOT_FOUND, ns3::zigbee::ROUTE_UPDATED, ns3::zigbee::ROUTE_VALIDATION_UNDERWAY, and ns3::zigbee::TABLE_FULL.

Referenced by NlmeRouteDiscoveryRequest(), ReceiveRREQ(), and SendDataUcst().

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

◆ FindRoute()

Mac16Address ns3::zigbee::ZigbeeNwk::FindRoute ( Mac16Address dst,
bool & neighbor )

Search for a specific destination in this device neighbor and routing tables.

This function is only a quick reference used for debugging purposes.

Parameters
dstThe destination to search in our tables
neighborA flag indicating whether or not the returned next hop was found in our neighbor table.
Returns
The nexthop address to the destination.

Definition at line 297 of file zigbee-nwk.cc.

References ns3::zigbee::NeighborTable::LookUpEntry(), ns3::zigbee::RoutingTable::LookUpEntry(), m_nwkNeighborTable, m_nwkRoutingTable, and ns3::zigbee::ROUTE_ACTIVE.

+ Here is the call graph for this function:

◆ GetIeeeAddress()

Mac64Address ns3::zigbee::ZigbeeNwk::GetIeeeAddress ( ) const

Obtain this device 64 bit IEEE address (A.K.A.

extended address).

This function should only be used for debugging purposes and it should not be use by higher layers. Higher layers should use NLME-GET.request instead to obtain this attribute.

Returns
Returns this device's 16 bit network address.

Definition at line 327 of file zigbee-nwk.cc.

References m_nwkIeeeAddress.

◆ GetLinkCost()

uint8_t ns3::zigbee::ZigbeeNwk::GetLinkCost ( uint8_t lqi) const
private

Obtain the link cost based on the value of the nwkReportConstantCost.

If nwkReportConstantCost is True, the link will use a constant value of 7, if false, it will use the LQI to obtain the link cost. When the LQI option is used, the link cost is based on a non linear mapping of LQI values. See Zigbee specification r22.1.0, 3.6.3.1 See NXP Zigbee 3.0 Stack User Guide (JN-UG-3113, revision 1.5), page 108.

Parameters
lqiThe lqi value (1-255) used to calculate the link cost.
Returns
The link cost (1-7).

Definition at line 2881 of file zigbee-nwk.cc.

References GetLQINonLinearValue(), m_nwkReportConstantCost, and NS_LOG_FUNCTION.

Referenced by McpsDataIndication().

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

◆ GetLQINonLinearValue()

uint8_t ns3::zigbee::ZigbeeNwk::GetLQINonLinearValue ( uint8_t lqi) const
private

Get a non linear representation of a Link Quality Indicator (LQI).

This is used to obtain LQI representations used in the link cost/Path cost of a route discovery and the Outgoing cost in the neighbors table.

Parameters
lqiThe LQI value (1-255) mapped
Returns
The LQI value mapped to a non linear representation (1-7)

Definition at line 2844 of file zigbee-nwk.cc.

Referenced by GetLinkCost(), McpsDataIndication(), and MlmeBeaconNotifyIndication().

+ Here is the caller graph for this function:

◆ GetMac()

Ptr< LrWpanMacBase > ns3::zigbee::ZigbeeNwk::GetMac ( ) const

Get the underlying MAC used by the current Zigbee NWK.

Returns
The pointer to the underlying MAC object currently connected to the Zigbee NWK.

Definition at line 215 of file zigbee-nwk.cc.

References m_mac.

◆ GetNetworkAddress()

Mac16Address ns3::zigbee::ZigbeeNwk::GetNetworkAddress ( ) const

Obtain this device 16 bit network address (A.K.A.

short address).

This function should only be used for debugging purposes and it should not be use by higher layers. Higher layers should use NLME-GET.request instead to obtain this attribute.

Returns
Returns this device's 16 bit network address.

Definition at line 321 of file zigbee-nwk.cc.

References m_nwkNetworkAddress.

◆ GetNwkStatus()

NwkStatus ns3::zigbee::ZigbeeNwk::GetNwkStatus ( lrwpan::MacStatus macStatus) const
private

Cast a Mac layer status to a NWK layer status.

Parameters
macStatusThe Mac layer status to be casted.
Returns
The ZigbeeNwkStatus resulting from the cast.

Definition at line 2799 of file zigbee-nwk.cc.

Referenced by MlmeAssociateConfirm(), MlmeScanConfirm(), and MlmeStartConfirm().

+ Here is the caller graph for this function:

◆ GetTypeId()

◆ IsBroadcastAddress()

bool ns3::zigbee::ZigbeeNwk::IsBroadcastAddress ( Mac16Address address)
private

Returns true if the address is a broadcast address according to Zigbee specification r22.1.0, Section 3.6.5, Table 3-69.

Parameters
addressThe address to compare to a broadcast address
Returns
True if the address in a broadcast address

Definition at line 703 of file zigbee-nwk.cc.

Referenced by McpsDataConfirm(), McpsDataIndication(), NldeDataRequest(), and NlmeRouteDiscoveryRequest().

+ Here is the caller graph for this function:

◆ McpsDataConfirm()

void ns3::zigbee::ZigbeeNwk::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 data to another device.

Parameters
paramsThe MCPS-DATA.confirm parameters.

Definition at line 1035 of file zigbee-nwk.cc.

References ns3::zigbee::DATA, ns3::zigbee::ZigbeeNwkHeader::GetDstAddr(), ns3::zigbee::ZigbeeNwkHeader::GetFrameType(), ns3::zigbee::ZigbeeNwkHeader::GetSrcAddr(), IsBroadcastAddress(), ns3::Callback< R, UArgs >::IsNull(), m_nldeDataConfirmCallback, ns3::zigbee::NldeDataConfirmParams::m_nsduHandle, m_nwkNetworkAddress, and RetrieveTxPkt().

Referenced by ns3::zigbee::ZigbeeStack::DoInitialize().

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

◆ McpsDataIndication()

void ns3::zigbee::ZigbeeNwk::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 NWK (receiving)

Parameters
paramsThe MCPS-DATA.indication parameters.
msduThe set of octets forming the MSDU.

Definition at line 333 of file zigbee-nwk.cc.

References ns3::zigbee::BroadcastTransactionTable::AddEntry(), ns3::Create(), ns3::zigbee::DATA, ns3::zigbee::ENDDEVICE, ns3::zigbee::ZigbeePayloadType::GetCmdType(), ns3::zigbee::CapabilityInformation::GetDeviceType(), ns3::zigbee::ZigbeeNwkHeader::GetDstAddr(), ns3::zigbee::ZigbeeNwkHeader::GetFrameType(), GetLinkCost(), GetLQINonLinearValue(), ns3::zigbee::ZigbeeNwkHeader::GetRadius(), ns3::zigbee::ZigbeeNwkHeader::GetSeqNum(), ns3::zigbee::ZigbeeNwkHeader::GetSrcAddr(), ns3::zigbee::INTER_PAN, IsBroadcastAddress(), ns3::zigbee::ZigbeeNwkHeader::IsMulticast(), ns3::Callback< R, UArgs >::IsNull(), ns3::zigbee::CapabilityInformation::IsReceiverOnWhenIdle(), ns3::zigbee::BroadcastTransactionTable::LookUpEntry(), ns3::zigbee::NeighborTable::LookUpEntry(), m_btt, ns3::zigbee::NldeDataIndicationParams::m_dstAddr, ns3::zigbee::NldeDataIndicationParams::m_dstAddrMode, ns3::zigbee::NldeDataIndicationParams::m_linkQuality, m_nldeDataIndicationCallback, ns3::zigbee::NldeDataIndicationParams::m_nsduLength, m_nwkCapabilityInformation, m_nwkNeighborTable, m_nwkNetworkAddress, m_nwkNetworkBroadcastDeliveryTime, ns3::zigbee::NldeDataIndicationParams::m_rxTime, ns3::zigbee::NldeDataIndicationParams::m_securityUse, ns3::zigbee::NldeDataIndicationParams::m_srcAddr, ns3::Simulator::Now(), NS_FATAL_ERROR, NS_LOG_ERROR, NS_LOG_FUNCTION, ns3::zigbee::NWK_COMMAND, ReceiveRREP(), ReceiveRREQ(), ns3::zigbee::ROUTE_REP_CMD, ns3::zigbee::ROUTE_REQ_CMD, ns3::zigbee::ROUTER, SendDataBcst(), SendDataUcst(), ns3::zigbee::CapabilityInformation::SetCapability(), ns3::zigbee::ZigbeeNwkHeader::SetRadius(), and ns3::zigbee::UCST_BCST.

Referenced by ns3::zigbee::ZigbeeStack::DoInitialize().

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

◆ MlmeAssociateConfirm()

void ns3::zigbee::ZigbeeNwk::MlmeAssociateConfirm ( lrwpan::MlmeAssociateConfirmParams params)

IEEE 802.15.4-2011 section MlME-ASSOCIATE.confirm Report the results of an associate request attempt.

Parameters
paramsThe MLME-ASSOCIATE.confirm parameters.

Definition at line 1315 of file zigbee-nwk.cc.

References ns3::lrwpan::EXT_ADDR, GetNwkStatus(), ns3::Callback< R, UArgs >::IsNull(), ns3::zigbee::NeighborTable::LookUpEntry(), m_associateParams, ns3::lrwpan::MlmeAssociateRequestParams::m_coordAddrMode, ns3::lrwpan::MlmeAssociateRequestParams::m_coordExtAddr, ns3::lrwpan::MlmeAssociateRequestParams::m_coordPanId, ns3::lrwpan::MlmeAssociateRequestParams::m_coordShortAddr, ns3::zigbee::NlmeJoinConfirmParams::m_enhancedBeacon, ns3::zigbee::NlmeJoinConfirmParams::m_extendedPanId, ns3::zigbee::NlmeJoinRequestParams::m_extendedPanId, m_joinParams, ns3::zigbee::NlmeJoinConfirmParams::m_macInterfaceIndex, ns3::zigbee::NlmeJoinConfirmParams::m_networkAddress, m_nlmeJoinConfirmCallback, m_nwkExtendedPanId, m_nwkNeighborTable, m_nwkNetworkAddress, m_nwkPanId, m_pendPrimitiveNwk, ns3::zigbee::NlmeJoinConfirmParams::m_status, ns3::zigbee::NBR_PARENT, ns3::zigbee::NEIGHBOR_TABLE_FULL, ns3::zigbee::NLDE_NLME_NONE, ns3::zigbee::NLME_JOIN, NS_LOG_DEBUG, NS_LOG_ERROR, NS_LOG_FUNCTION, and ns3::zigbee::SUCCESS.

Referenced by ns3::zigbee::ZigbeeStack::DoInitialize().

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

◆ MlmeAssociateIndication()

void ns3::zigbee::ZigbeeNwk::MlmeAssociateIndication ( lrwpan::MlmeAssociateIndicationParams params)

IEEE 802.15.4-2011, Section 6.2.2.2.

MLME-ASSOCIATE.indication Allows the MAC MLME to indicate the reception of an associate request on a PAN coordinator or router. In the Zigbee specification this implements the parent procedure when a device join a network through association (See Zigbee specification r22.1.0, Section 3.6.1.4.1)

Parameters
paramsThe MLME-ASSOCIATE.indication parameters

Definition at line 1872 of file zigbee-nwk.cc.

References ns3::zigbee::NeighborTable::AddEntry(), AllocateNetworkAddress(), ns3::zigbee::ASSOCIATION, ns3::Create(), ns3::zigbee::NeighborTable::Delete(), ns3::zigbee::CapabilityInformation::GetCapability(), ns3::zigbee::CapabilityInformation::GetDeviceType(), ns3::zigbee::CapabilityInformation::IsAllocateAddrOn(), ns3::zigbee::CapabilityInformation::IsReceiverOnWhenIdle(), ns3::zigbee::NeighborTable::LookUpEntry(), ns3::lrwpan::MlmeAssociateResponseParams::m_assocShortAddr, ns3::zigbee::NlmeJoinIndicationParams::m_capabilityInfo, ns3::lrwpan::MlmeAssociateResponseParams::m_extDevAddr, ns3::zigbee::NlmeJoinIndicationParams::m_extendedAddress, m_joinIndParams, m_mac, ns3::zigbee::NlmeJoinIndicationParams::m_networkAddress, m_nwkEndDeviceTimeoutDefault, m_nwkExtendedPanId, m_nwkNeighborTable, ns3::zigbee::NlmeJoinIndicationParams::m_rejoinNetwork, ns3::lrwpan::MlmeAssociateResponseParams::m_status, ns3::Minutes(), MlmeAssociateIndication(), ns3::lrwpan::LrWpanMacBase::MlmeAssociateResponse(), ns3::zigbee::NBR_CHILD, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::zigbee::RequestedTimeoutField, ns3::Simulator::ScheduleNow(), and ns3::Seconds().

Referenced by ns3::zigbee::ZigbeeStack::DoInitialize(), and MlmeAssociateIndication().

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

◆ MlmeBeaconNotifyIndication()

void ns3::zigbee::ZigbeeNwk::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 reception of a beacon with payload.

Parameters
paramsThe MLME-BEACON-NOTIFY.indication parameters

Definition at line 1759 of file zigbee-nwk.cc.

References ns3::zigbee::NeighborTable::AddEntry(), ns3::zigbee::PanIdTable::AddEntry(), ns3::Create(), ns3::zigbee::SuperframeInformation::GetBeaconOrder(), ns3::zigbee::ZigbeeBeaconPayload::GetEndDevCapacity(), ns3::zigbee::ZigbeeBeaconPayload::GetExtPanId(), ns3::zigbee::SuperframeInformation::GetFrameOrder(), GetLQINonLinearValue(), ns3::zigbee::ZigbeeBeaconPayload::GetProtocolId(), ns3::zigbee::ZigbeeBeaconPayload::GetRouterCapacity(), ns3::zigbee::ZigbeeBeaconPayload::GetStackProfile(), ns3::zigbee::SuperframeInformation::IsAssocPermit(), ns3::zigbee::NeighborTable::LookUpEntry(), ns3::zigbee::NetworkDescriptor::m_beaconOrder, ns3::zigbee::NetworkDescriptor::m_endDeviceCapacity, ns3::zigbee::NetworkDescriptor::m_extPanId, ns3::zigbee::NetworkDescriptor::m_logCh, m_networkDescriptorList, m_nwkEndDeviceTimeoutDefault, m_nwkNeighborTable, ns3::zigbee::NetworkDescriptor::m_panId, m_panIdTable, m_pendPrimitiveNwk, ns3::zigbee::NetworkDescriptor::m_permitJoining, ns3::zigbee::NetworkDescriptor::m_routerCapacity, ns3::zigbee::NetworkDescriptor::m_stackProfile, ns3::zigbee::NetworkDescriptor::m_superframeOrder, ns3::zigbee::NetworkDescriptor::m_updateId, ns3::zigbee::NetworkDescriptor::m_zigbeeVersion, ns3::Minutes(), ns3::zigbee::NBR_NONE, ns3::zigbee::NLME_NET_DISCV, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::zigbee::RequestedTimeoutField, ns3::Seconds(), ns3::lrwpan::SHORT_ADDR, ns3::zigbee::ZIGBEE_COORDINATOR, and ns3::zigbee::ZIGBEE_ROUTER.

Referenced by ns3::zigbee::ZigbeeStack::DoInitialize().

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

◆ MlmeCommStatusIndication()

void ns3::zigbee::ZigbeeNwk::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 communication status.

Parameters
paramsThe MLME-COMM-STATUS.indication parameters

Definition at line 1727 of file zigbee-nwk.cc.

References ns3::zigbee::ASSOCIATION, ns3::zigbee::DIRECT_OR_REJOIN, ns3::Callback< R, UArgs >::IsNull(), ns3::zigbee::NlmeJoinIndicationParams::m_extendedAddress, m_joinIndParams, m_nlmeJoinIndicationCallback, m_pendPrimitiveNwk, ns3::zigbee::NlmeJoinIndicationParams::m_rejoinNetwork, ns3::zigbee::NLME_JOIN_INDICATION, NS_LOG_FUNCTION, and UpdateBeaconPayloadLength().

Referenced by ns3::zigbee::ZigbeeStack::DoInitialize().

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

◆ MlmeGetConfirm()

void ns3::zigbee::ZigbeeNwk::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 PIB attribute.

Parameters
statusThe status as a result of a MLME-GET.request operation
idThe identififier of the attribute requested
attributeThe value of of the attribute requested

Definition at line 1575 of file zigbee-nwk.cc.

References ns3::Mac64Address::ConvertToInt(), ns3::zigbee::CapabilityInformation::GetCapability(), ns3::Callback< R, UArgs >::IsNull(), ns3::zigbee::NlmeStartRouterRequestParams::m_batteryLifeExt, ns3::lrwpan::MlmeStartRequestParams::m_battLifeExt, ns3::lrwpan::MlmeStartRequestParams::m_bcnOrd, ns3::zigbee::NlmeStartRouterRequestParams::m_beaconOrder, ns3::zigbee::NlmeJoinConfirmParams::m_channelList, ns3::lrwpan::MlmeStartRequestParams::m_coorRealgn, m_currentChannel, ns3::zigbee::NlmeJoinConfirmParams::m_enhancedBeacon, ns3::zigbee::NlmeJoinConfirmParams::m_extendedPanId, m_joinParams, ns3::lrwpan::MlmeStartRequestParams::m_logCh, ns3::lrwpan::MlmeStartRequestParams::m_logChPage, m_mac, m_netFormParams, m_netFormParamsGen, ns3::zigbee::NlmeJoinConfirmParams::m_networkAddress, m_nlmeJoinConfirmCallback, m_nlmeNetworkFormationConfirmCallback, m_nwkCapabilityInformation, m_nwkExtendedPanId, m_nwkIeeeAddress, m_nwkNetworkAddress, m_nwkPanId, ns3::lrwpan::MlmeStartRequestParams::m_panCoor, ns3::lrwpan::MlmeStartRequestParams::m_PanId, m_pendPrimitiveNwk, ns3::zigbee::NlmeJoinRequestParams::m_scanChannelList, ns3::lrwpan::MlmeStartRequestParams::m_sfrmOrd, m_startRouterParams, ns3::zigbee::NlmeJoinConfirmParams::m_status, ns3::zigbee::NlmeNetworkFormationConfirmParams::m_status, ns3::zigbee::NlmeStartRouterRequestParams::m_superframeOrder, ns3::lrwpan::LrWpanMacBase::MlmeGetRequest(), ns3::lrwpan::LrWpanMacBase::MlmeStartRequest(), ns3::zigbee::NLDE_NLME_NONE, ns3::zigbee::NLME_JOIN, ns3::zigbee::NLME_NETWORK_FORMATION, ns3::zigbee::NLME_START_ROUTER, NS_LOG_FUNCTION, ns3::zigbee::ROUTER, ns3::Simulator::ScheduleNow(), ns3::zigbee::CapabilityInformation::SetDeviceType(), ns3::zigbee::STARTUP_FAILURE, ns3::zigbee::SUCCESS, and UpdateBeaconPayloadLength().

Referenced by ns3::zigbee::ZigbeeStack::DoInitialize().

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

◆ MlmeOrphanIndication()

void ns3::zigbee::ZigbeeNwk::MlmeOrphanIndication ( lrwpan::MlmeOrphanIndicationParams params)

IEEE 802.15.4-2011 sections 6.2.7.1, Zigbee Specification r22.1.0 Section 3.6.1.4.3 (parent procedure) MLME-ORPHAN.indication Generated by the coordinator and issued to its next higher layer on receipt of an orphan notification command, as defined in 5.3.6.

Parameters
paramsThe MLME-ORPHAN.indication parameters

Definition at line 1686 of file zigbee-nwk.cc.

References ns3::zigbee::DIRECT_OR_REJOIN, ns3::zigbee::ENDDEVICE, ns3::zigbee::CapabilityInformation::GetCapability(), ns3::zigbee::NeighborTable::LookUpEntry(), ns3::lrwpan::MlmeOrphanResponseParams::m_assocMember, ns3::zigbee::NlmeJoinIndicationParams::m_capabilityInfo, ns3::zigbee::NlmeJoinIndicationParams::m_extendedAddress, m_joinIndParams, m_mac, ns3::zigbee::NlmeJoinIndicationParams::m_networkAddress, m_nwkNeighborTable, ns3::lrwpan::MlmeOrphanResponseParams::m_orphanAddr, ns3::zigbee::NlmeJoinIndicationParams::m_rejoinNetwork, ns3::lrwpan::MlmeOrphanResponseParams::m_shortAddr, ns3::lrwpan::LrWpanMacBase::MlmeOrphanResponse(), NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::zigbee::ROUTER, ns3::Simulator::ScheduleNow(), ns3::zigbee::CapabilityInformation::SetDeviceType(), ns3::zigbee::CapabilityInformation::SetReceiverOnWhenIdle(), ns3::zigbee::ZIGBEE_ENDDEVICE, and ns3::zigbee::ZIGBEE_ROUTER.

Referenced by ns3::zigbee::ZigbeeStack::DoInitialize().

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

◆ MlmeScanConfirm()

void ns3::zigbee::ZigbeeNwk::MlmeScanConfirm ( lrwpan::MlmeScanConfirmParams params)

IEEE 802.15.4-2011 section 6.2.10.2 MLME-SCAN.confirm Reports the results of a scan request.

Parameters
paramsThe MLME-SCAN.confirm parameters.

Definition at line 1069 of file zigbee-nwk.cc.

References ns3::zigbee::ChannelList::channelsField, ns3::Create(), GetNwkStatus(), ns3::Callback< R, UArgs >::IsNull(), ns3::zigbee::NlmeJoinRequestParams::m_capabilityInfo, ns3::lrwpan::MlmeScanRequestParams::m_chPage, ns3::zigbee::NlmeNetworkFormationRequestParams::m_distributedNetwork, ns3::zigbee::NlmeNetworkFormationRequestParams::m_distributedNetworkAddress, ns3::zigbee::NlmeJoinRequestParams::m_extendedPanId, m_filteredChannelMask, m_joinParams, m_mac, ns3::zigbee::NlmeNetworkDiscoveryConfirmParams::m_netDescList, m_netFormParams, m_netFormParamsGen, ns3::zigbee::NlmeNetworkDiscoveryConfirmParams::m_networkCount, m_networkDescriptorList, m_nlmeJoinConfirmCallback, m_nlmeNetworkDiscoveryConfirmCallback, m_nlmeNetworkFormationConfirmCallback, m_nwkCapabilityInformation, m_nwkExtendedPanId, m_nwkNetworkAddress, m_pendPrimitiveNwk, ns3::zigbee::NlmeNetworkFormationRequestParams::m_scanChannelList, ns3::lrwpan::MlmeScanRequestParams::m_scanChannels, ns3::lrwpan::MlmeScanRequestParams::m_scanDuration, ns3::zigbee::NlmeNetworkFormationRequestParams::m_scanDuration, m_scanEnergyThreshold, ns3::lrwpan::MlmeScanRequestParams::m_scanType, ns3::zigbee::NlmeJoinConfirmParams::m_status, ns3::zigbee::NlmeNetworkDiscoveryConfirmParams::m_status, ns3::zigbee::NlmeNetworkFormationConfirmParams::m_status, m_uniformRandomVariable, ns3::lrwpan::LrWpanMacBase::MlmeGetRequest(), ns3::lrwpan::MLMESCAN_ACTIVE, ns3::lrwpan::MLMESCAN_ED, ns3::lrwpan::MLMESCAN_ORPHAN, ns3::lrwpan::LrWpanMacBase::MlmeScanRequest(), ns3::lrwpan::LrWpanMacBase::MlmeSetRequest(), ns3::zigbee::NLDE_NLME_NONE, ns3::zigbee::NLME_JOIN, ns3::zigbee::NLME_NET_DISCV, ns3::zigbee::NLME_NETWORK_FORMATION, ns3::zigbee::NO_NETWORKS, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Simulator::ScheduleNow(), ns3::zigbee::STARTUP_FAILURE, and ns3::zigbee::SUCCESS.

Referenced by ns3::zigbee::ZigbeeStack::DoInitialize().

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

◆ MlmeSetConfirm()

void ns3::zigbee::ZigbeeNwk::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 PIB attribute.

Parameters
paramsThe MLME-SET.confirm params

Definition at line 1479 of file zigbee-nwk.cc.

References ns3::Callback< R, UArgs >::IsNull(), ns3::zigbee::NlmeNetworkFormationRequestParams::m_batteryLifeExtension, ns3::lrwpan::MlmeStartRequestParams::m_battLifeExt, ns3::lrwpan::MlmeStartRequestParams::m_bcnOrd, ns3::zigbee::NlmeNetworkFormationRequestParams::m_beaconOrder, ns3::lrwpan::MlmeStartRequestParams::m_coorRealgn, m_joinIndParams, ns3::lrwpan::MlmeStartRequestParams::m_logCh, ns3::lrwpan::MlmeStartRequestParams::m_logChPage, m_mac, m_netFormParams, m_netFormParamsGen, m_nlmeJoinIndicationCallback, m_nlmeNetworkFormationConfirmCallback, m_nlmeStartRouterConfirmCallback, ns3::lrwpan::MlmeStartRequestParams::m_panCoor, ns3::lrwpan::MlmeStartRequestParams::m_PanId, m_pendPrimitiveNwk, ns3::lrwpan::MlmeStartRequestParams::m_sfrmOrd, m_startRouterParams, ns3::zigbee::NlmeNetworkFormationConfirmParams::m_status, ns3::zigbee::NlmeStartRouterConfirmParams::m_status, ns3::zigbee::NlmeNetworkFormationRequestParams::m_superFrameOrder, ns3::lrwpan::LrWpanMacBase::MlmeGetRequest(), ns3::lrwpan::LrWpanMacBase::MlmeStartRequest(), ns3::zigbee::NLDE_NLME_NONE, ns3::zigbee::NLME_JOIN_INDICATION, ns3::zigbee::NLME_NETWORK_FORMATION, ns3::zigbee::NLME_START_ROUTER, NS_LOG_ERROR, NS_LOG_FUNCTION, ns3::Simulator::ScheduleNow(), ns3::zigbee::STARTUP_FAILURE, ns3::zigbee::SUCCESS, and UpdateBeaconPayload().

Referenced by ns3::zigbee::ZigbeeStack::DoInitialize().

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

◆ MlmeStartConfirm()

void ns3::zigbee::ZigbeeNwk::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.

Parameters
paramsThe MLME-START.confirm parameters.

Definition at line 1423 of file zigbee-nwk.cc.

References GetNwkStatus(), ns3::Callback< R, UArgs >::IsNull(), m_netFormParams, m_netFormParamsGen, m_nlmeNetworkFormationConfirmCallback, m_nlmeStartRouterConfirmCallback, m_nwkExtendedPanId, m_nwkNetworkAddress, m_nwkPanId, m_pendPrimitiveNwk, m_startRouterParams, ns3::zigbee::NlmeNetworkFormationConfirmParams::m_status, ns3::zigbee::NlmeStartRouterConfirmParams::m_status, ns3::zigbee::NLDE_NLME_NONE, ns3::zigbee::NLME_NETWORK_FORMATION, ns3::zigbee::NLME_START_ROUTER, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::zigbee::SUCCESS, and UpdateBeaconPayloadLength().

Referenced by ns3::zigbee::ZigbeeStack::DoInitialize().

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

◆ NldeDataRequest()

void ns3::zigbee::ZigbeeNwk::NldeDataRequest ( NldeDataRequestParams params,
Ptr< Packet > packet )

Zigbee Specification r22.1.0, Section 3.2.1.1 NLDE-DATA.request Request to transfer a NSDU.

Parameters
paramsthe request parameters
packetthe NSDU to be transmitted

Definition at line 1967 of file zigbee-nwk.cc.

References BufferTxPkt(), ns3::zigbee::DATA, ns3::zigbee::ENDDEVICE, ns3::zigbee::CapabilityInformation::GetDeviceType(), ns3::zigbee::NeighborTable::GetParent(), ns3::SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE >::GetValue(), ns3::zigbee::INVALID_REQUEST, IsBroadcastAddress(), ns3::Callback< R, UArgs >::IsNull(), ns3::lrwpan::McpsDataRequestParams::m_dstAddr, ns3::lrwpan::McpsDataRequestParams::m_dstAddrMode, ns3::lrwpan::McpsDataRequestParams::m_dstPanId, m_mac, m_macHandle, ns3::lrwpan::McpsDataRequestParams::m_msduHandle, m_nldeDataConfirmCallback, ns3::zigbee::NldeDataConfirmParams::m_nsduHandle, m_nwkCapabilityInformation, m_nwkMaxDepth, m_nwkNeighborTable, m_nwkNetworkAddress, m_nwkPanId, m_nwkSequenceNumber, m_pendPrimitiveNwk, ns3::lrwpan::McpsDataRequestParams::m_srcAddrMode, ns3::zigbee::NldeDataConfirmParams::m_status, ns3::lrwpan::McpsDataRequestParams::m_txOptions, ns3::zigbee::NldeDataConfirmParams::m_txTime, ns3::lrwpan::LrWpanMacBase::McpsDataRequest(), ns3::zigbee::MCST, ns3::zigbee::NLDE_NLME_NONE, ns3::Simulator::Now(), NS_ABORT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::zigbee::ROUTER, ns3::Simulator::ScheduleNow(), SendDataBcst(), SendDataUcst(), ns3::zigbee::CapabilityInformation::SetCapability(), ns3::zigbee::ZigbeeNwkHeader::SetDiscoverRoute(), ns3::zigbee::ZigbeeNwkHeader::SetDstAddr(), ns3::zigbee::ZigbeeNwkHeader::SetEndDeviceInitiator(), ns3::zigbee::ZigbeeNwkHeader::SetFrameType(), ns3::zigbee::ZigbeeNwkHeader::SetMulticast(), ns3::zigbee::ZigbeeNwkHeader::SetProtocolVer(), ns3::zigbee::ZigbeeNwkHeader::SetRadius(), ns3::zigbee::ZigbeeNwkHeader::SetSeqNum(), ns3::zigbee::ZigbeeNwkHeader::SetSrcAddr(), and ns3::lrwpan::SHORT_ADDR.

+ Here is the call graph for this function:

◆ NlmeDirectJoinRequest()

◆ NlmeJoinRequest()

void ns3::zigbee::ZigbeeNwk::NlmeJoinRequest ( NlmeJoinRequestParams params)

Zigbee Specification r22.1.0, section 3.2.2.13 NLME-JOIN.request This primitive allows the next higher layer to request to join or rejoin a network, or to change the operating channel for the device while within an operating network.

Parameters
paramsthe join request params

Definition at line 2481 of file zigbee-nwk.cc.

References ns3::zigbee::ASSOCIATION, ns3::zigbee::DIRECT_OR_REJOIN, ns3::lrwpan::EXT_ADDR, ns3::zigbee::PanIdTable::GetEntry(), ns3::Callback< R, UArgs >::IsNull(), ns3::zigbee::NeighborTable::LookUpForBestParent(), m_associateParams, ns3::lrwpan::MlmeAssociateRequestParams::m_capabilityInfo, ns3::lrwpan::MlmeAssociateRequestParams::m_chNum, ns3::lrwpan::MlmeAssociateRequestParams::m_chPage, ns3::lrwpan::MlmeScanRequestParams::m_chPage, ns3::lrwpan::MlmeAssociateRequestParams::m_coordAddrMode, ns3::lrwpan::MlmeAssociateRequestParams::m_coordExtAddr, ns3::lrwpan::MlmeAssociateRequestParams::m_coordPanId, ns3::lrwpan::MlmeAssociateRequestParams::m_coordShortAddr, ns3::zigbee::NlmeJoinConfirmParams::m_enhancedBeacon, ns3::zigbee::NlmeJoinConfirmParams::m_extendedPanId, m_joinParams, m_mac, ns3::zigbee::NlmeJoinConfirmParams::m_macInterfaceIndex, ns3::zigbee::NlmeJoinConfirmParams::m_networkAddress, m_nlmeJoinConfirmCallback, m_nwkCapabilityInformation, m_nwkNeighborTable, m_nwkParentInformation, m_panIdTable, m_pendPrimitiveNwk, ns3::lrwpan::MlmeScanRequestParams::m_scanChannels, ns3::lrwpan::MlmeScanRequestParams::m_scanType, ns3::zigbee::NlmeJoinConfirmParams::m_status, ns3::lrwpan::LrWpanMacBase::MlmeAssociateRequest(), ns3::lrwpan::MLMESCAN_ORPHAN, ns3::lrwpan::LrWpanMacBase::MlmeScanRequest(), ns3::zigbee::NLDE_NLME_NONE, ns3::zigbee::NLME_JOIN, ns3::zigbee::NOT_PERMITED, NS_FATAL_ERROR, NS_LOG_DEBUG, NS_LOG_ERROR, NS_LOG_FUNCTION, ns3::Simulator::ScheduleNow(), and ns3::lrwpan::SHORT_ADDR.

Referenced by NwkNetworkDiscoveryConfirm(), NwkNetworkDiscoveryConfirm(), NwkNetworkDiscoveryConfirm(), and ZigbeeRreqRetryTestCase::NwkNetworkDiscoveryConfirm().

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

◆ NlmeNetworkDiscoveryRequest()

void ns3::zigbee::ZigbeeNwk::NlmeNetworkDiscoveryRequest ( NlmeNetworkDiscoveryRequestParams params)

Zigbee Specification r22.1.0, section 3.2.2.3 NLME-NETWORK-DISCOVERY.request Allows the next higher layer to request that the NWK layer discover networks currently operating within the personal operating space (POS).

Parameters
paramsthe network discovery request params

Definition at line 2344 of file zigbee-nwk.cc.

References ns3::lrwpan::MlmeScanRequestParams::m_chPage, m_mac, m_pendPrimitiveNwk, ns3::lrwpan::MlmeScanRequestParams::m_scanChannels, ns3::lrwpan::MlmeScanRequestParams::m_scanDuration, ns3::lrwpan::MlmeScanRequestParams::m_scanType, ns3::lrwpan::MLMESCAN_ACTIVE, ns3::lrwpan::LrWpanMacBase::MlmeScanRequest(), ns3::zigbee::NLME_NET_DISCV, NS_FATAL_ERROR, NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::Simulator::ScheduleNow().

Referenced by ZigbeeRreqRetryTestCase::DoRun().

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

◆ NlmeNetworkFormationRequest()

void ns3::zigbee::ZigbeeNwk::NlmeNetworkFormationRequest ( NlmeNetworkFormationRequestParams params)

Zigbee Specification r22.1.0, Section 3.2.2.5 and 3.6.1.1 NLME-NETWORK-FORMATION.request Request the formation of a network in a capable device.

Parameters
paramsthe network formation request params

Definition at line 2108 of file zigbee-nwk.cc.

References ns3::zigbee::ChannelList::channelPageCount, ns3::zigbee::ChannelList::channelsField, ns3::zigbee::INVALID_REQUEST, ns3::Callback< R, UArgs >::IsNull(), ns3::lrwpan::MlmeScanRequestParams::m_chPage, m_mac, m_netFormParams, m_netFormParamsGen, m_nlmeNetworkFormationConfirmCallback, m_nwkcCoordinatorCapable, m_pendPrimitiveNwk, ns3::zigbee::NlmeNetworkFormationRequestParams::m_scanChannelList, ns3::lrwpan::MlmeScanRequestParams::m_scanChannels, ns3::lrwpan::MlmeScanRequestParams::m_scanDuration, ns3::lrwpan::MlmeScanRequestParams::m_scanType, ns3::zigbee::NlmeNetworkFormationConfirmParams::m_status, ns3::lrwpan::MLMESCAN_ACTIVE, ns3::lrwpan::MLMESCAN_ED, ns3::lrwpan::LrWpanMacBase::MlmeScanRequest(), ns3::zigbee::NLDE_NLME_NONE, ns3::zigbee::NLME_NETWORK_FORMATION, NS_ASSERT_MSG, NS_FATAL_ERROR, NS_LOG_FUNCTION, and ns3::Simulator::ScheduleNow().

Referenced by ZigbeeRreqRetryTestCase::DoRun().

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

◆ NlmeRouteDiscoveryRequest()

void ns3::zigbee::ZigbeeNwk::NlmeRouteDiscoveryRequest ( NlmeRouteDiscoveryRequestParams params)

Zigbee Specification r22.1.0, section 3.2.2.33.3 and 3.6.3.5 NLME-ROUTE-DISCOVERY.request Allows the next higher layer to initiate route discovery.

Parameters
paramsthe route discovery request params

Definition at line 2205 of file zigbee-nwk.cc.

References ns3::zigbee::ENABLE_ROUTE_DISCOVERY, FindNextHop(), ns3::zigbee::CapabilityInformation::GetDeviceType(), ns3::SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE >::GetValue(), ns3::zigbee::INVALID_REQUEST, IsBroadcastAddress(), ns3::Callback< R, UArgs >::IsNull(), m_nlmeRouteDiscoveryConfirmCallback, m_nwkCapabilityInformation, m_nwkcInitialRREQRetries, m_nwkConcentratorRadius, m_nwkcProtocolVersion, m_nwkIsConcentrator, m_nwkMaxDepth, m_nwkNetworkAddress, m_nwkSequenceNumber, m_pendPrimitiveNwk, m_routeRequestId, m_rreqJitter, ns3::zigbee::NlmeRouteDiscoveryConfirmParams::m_status, ns3::zigbee::MANY_TO_ONE_ROUTE, ns3::zigbee::MCST, ns3::MilliSeconds(), ns3::zigbee::NLME_ROUTE_DISCOVERY, ns3::zigbee::NO_ADDRESS, ns3::zigbee::NO_ROUTE_RECORD, NS_ABORT_MSG, NS_FATAL_ERROR, NS_LOG_FUNCTION, ns3::zigbee::NWK_COMMAND, ProcessManyToOneRoute(), ns3::zigbee::ROUTE_ERROR, ns3::zigbee::ROUTE_FOUND, ns3::zigbee::ROUTE_NOT_FOUND, ns3::zigbee::ROUTE_RECORD, ns3::zigbee::ROUTE_UPDATED, ns3::zigbee::ROUTER, ns3::Simulator::Schedule(), SendRREQ(), ns3::zigbee::CapabilityInformation::SetCapability(), ns3::zigbee::ZigbeePayloadRouteRequestCommand::SetCmdOptManyToOneField(), ns3::zigbee::ZigbeeNwkHeader::SetDiscoverRoute(), ns3::zigbee::ZigbeeNwkHeader::SetDstAddr(), ns3::zigbee::ZigbeePayloadRouteRequestCommand::SetDstAddr(), ns3::zigbee::ZigbeeNwkHeader::SetFrameType(), ns3::zigbee::ZigbeePayloadRouteRequestCommand::SetPathCost(), ns3::zigbee::ZigbeeNwkHeader::SetProtocolVer(), ns3::zigbee::ZigbeeNwkHeader::SetRadius(), ns3::zigbee::ZigbeePayloadRouteRequestCommand::SetRouteReqId(), ns3::zigbee::ZigbeeNwkHeader::SetSeqNum(), ns3::zigbee::ZigbeeNwkHeader::SetSrcAddr(), ns3::zigbee::SUCCESS, and ns3::zigbee::UCST_BCST.

Referenced by ZigbeeRreqRetryTestCase::DoRun().

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

◆ NlmeStartRouterRequest()

void ns3::zigbee::ZigbeeNwk::NlmeStartRouterRequest ( NlmeStartRouterRequestParams params)

Zigbee Specification r22.1.0, section 3.2.2.9 NLME-START-ROUTER.request This primitive allows the next higher layer of a Zigbee router to initiate the activities expected of a Zigbee router including the routing of data framaes, route discovery, and the accepting of request to join the network from other devices.

Parameters
paramsthe join request params

Definition at line 2609 of file zigbee-nwk.cc.

References ns3::zigbee::CapabilityInformation::GetDeviceType(), ns3::zigbee::INVALID_REQUEST, ns3::Callback< R, UArgs >::IsNull(), m_mac, m_nlmeStartRouterConfirmCallback, m_nwkCapabilityInformation, m_pendPrimitiveNwk, m_startRouterParams, ns3::zigbee::NlmeStartRouterConfirmParams::m_status, ns3::lrwpan::LrWpanMacBase::MlmeGetRequest(), ns3::zigbee::NLDE_NLME_NONE, ns3::zigbee::NLME_START_ROUTER, NS_ASSERT_MSG, NS_LOG_ERROR, NS_LOG_FUNCTION, ns3::zigbee::ROUTER, ns3::Simulator::ScheduleNow(), and ns3::zigbee::CapabilityInformation::SetCapability().

Referenced by NwkJoinConfirm(), NwkJoinConfirm(), NwkJoinConfirm(), and ZigbeeRreqRetryTestCase::NwkJoinConfirm().

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

◆ NotifyConstructionCompleted()

void ns3::zigbee::ZigbeeNwk::NotifyConstructionCompleted ( )
overrideprotectedvirtual

Notifier called once the ObjectBase is fully constructed.

This method is invoked once all member attributes have been initialized. Subclasses can override this method to be notified of this event but if they do this, they must chain up to their parent's NotifyConstructionCompleted method.

Reimplemented from ns3::ObjectBase.

Definition at line 111 of file zigbee-nwk.cc.

References ns3::CreateObject(), m_beaconPayload, m_countRREQRetries, m_macHandle, m_netFormParams, m_netFormParamsGen, m_nwkAddrAlloc, m_nwkCapabilityInformation, m_nwkcMaxRREQJitter, m_nwkcMinRREQJitter, m_nwkConcentratorDiscoveryTime, m_nwkConcentratorRadius, m_nwkEndDeviceTimeoutDefault, m_nwkExtendedPanId, m_nwkIsConcentrator, m_nwkMaxBroadcastRetries, m_nwkMaxChildren, m_nwkMaxDepth, m_nwkMaxRouters, m_nwkNetworkAddress, m_nwkNetworkBroadcastDeliveryTime, m_nwkPanId, m_nwkReportConstantCost, m_nwkSequenceNumber, m_nwkStackProfile, m_nwkSymLink, m_nwkUseTreeRouting, m_pendPrimitiveNwk, m_routeExpiryTime, m_routeRequestId, m_rreqJitter, m_scanEnergyThreshold, m_txBufferMaxSize, m_uniformRandomVariable, ns3::zigbee::NLDE_NLME_NONE, NS_LOG_FUNCTION, ns3::Seconds(), ns3::zigbee::STOCHASTIC_ALLOC, and ns3::zigbee::ZIGBEE_PRO.

+ Here is the call graph for this function:

◆ PrintNeighborTable()

void ns3::zigbee::ZigbeeNwk::PrintNeighborTable ( Ptr< OutputStreamWrapper > stream) const

Print the entries in the neighbor table.

Parameters
streamThe stream object used to print.

Definition at line 259 of file zigbee-nwk.cc.

References ns3::Time::As(), m_nwkIeeeAddress, m_nwkNeighborTable, m_nwkNetworkAddress, ns3::Simulator::Now(), ns3::zigbee::NeighborTable::Print(), and ns3::Time::S.

+ Here is the call graph for this function:

◆ PrintRouteDiscoveryTable()

void ns3::zigbee::ZigbeeNwk::PrintRouteDiscoveryTable ( Ptr< OutputStreamWrapper > stream)

Print the entries in the route discovery table.

Parameters
streamThe stream object used to print.

Definition at line 240 of file zigbee-nwk.cc.

References ns3::Time::As(), m_nwkIeeeAddress, m_nwkNetworkAddress, m_nwkRouteDiscoveryTable, ns3::Simulator::Now(), ns3::zigbee::RouteDiscoveryTable::Print(), and ns3::Time::S.

+ Here is the call graph for this function:

◆ PrintRoutingTable()

void ns3::zigbee::ZigbeeNwk::PrintRoutingTable ( Ptr< OutputStreamWrapper > stream) const

Print the entries in the routing table.

Parameters
streamThe stream object used to print.

Definition at line 221 of file zigbee-nwk.cc.

References ns3::Time::As(), m_nwkIeeeAddress, m_nwkNetworkAddress, m_nwkRoutingTable, ns3::Simulator::Now(), ns3::zigbee::RoutingTable::Print(), and ns3::Time::S.

+ Here is the call graph for this function:

◆ PrintRREQRetryTable()

void ns3::zigbee::ZigbeeNwk::PrintRREQRetryTable ( Ptr< OutputStreamWrapper > stream) const

Print the entries in the RREQ retry table.

Parameters
streamThe stream object used to print.

Definition at line 278 of file zigbee-nwk.cc.

References ns3::Time::As(), m_nwkIeeeAddress, m_nwkNetworkAddress, m_rreqRetryTable, ns3::Simulator::Now(), ns3::zigbee::RreqRetryTable::Print(), and ns3::Time::S.

+ Here is the call graph for this function:

◆ ProcessManyToOneRoute()

RouteDiscoveryStatus ns3::zigbee::ZigbeeNwk::ProcessManyToOneRoute ( Mac16Address macSrcAddr,
uint8_t pathCost,
ZigbeeNwkHeader nwkHeader,
ZigbeePayloadRouteRequestCommand payload )
private

Process Many-To-One routes.

In essence, creating new routes or updating existing ones from information contained in the received RREQs.

Parameters
macSrcAddrThe MAC address received from the previous hop
pathCostThe path cost accumulated in the route discovery so far.
nwkHeaderThe network header created at the initiator or the received RREQ.
payloadThe payload header created at the initiator or the received RREQ.
Returns
The resulting RouteDiscoveryStatus of the Many-To-One process request.

Definition at line 830 of file zigbee-nwk.cc.

References ns3::zigbee::RouteDiscoveryTable::AddEntry(), ns3::zigbee::RoutingTable::AddEntry(), ns3::Create(), ns3::zigbee::RoutingTable::DeleteExpiredEntry(), ns3::zigbee::ZigbeePayloadRouteRequestCommand::GetCmdOptManyToOneField(), ns3::zigbee::RoutingTable::GetMaxTableSize(), ns3::zigbee::ZigbeePayloadRouteRequestCommand::GetRouteReqId(), ns3::zigbee::RoutingTable::GetSize(), ns3::zigbee::ZigbeeNwkHeader::GetSrcAddr(), ns3::Callback< R, UArgs >::IsNull(), ns3::zigbee::RouteDiscoveryTable::LookUpEntry(), ns3::zigbee::RoutingTable::LookUpEntry(), ns3::zigbee::NlmeRouteDiscoveryConfirmParams::m_networkStatusCode, m_nlmeRouteDiscoveryConfirmCallback, m_nwkcRouteDiscoveryTime, m_nwkRouteDiscoveryTable, m_nwkRoutingTable, m_routeExpiryTime, ns3::zigbee::NlmeRouteDiscoveryConfirmParams::m_status, ns3::zigbee::MANY_TO_ONE_ROUTE, ns3::zigbee::NO_ROUTE_CHANGE, ns3::zigbee::NO_ROUTING_CAPACITY, ns3::Simulator::Now(), NS_LOG_ERROR, ns3::zigbee::ROUTE_ACTIVE, ns3::zigbee::ROUTE_ERROR, ns3::zigbee::ROUTE_RECORD, ns3::zigbee::ROUTE_UPDATED, ns3::zigbee::ROUTE_VALIDATION_UNDERWAY, and ns3::zigbee::TABLE_FULL.

Referenced by NlmeRouteDiscoveryRequest(), and ReceiveRREQ().

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

◆ ReceiveRREP()

void ns3::zigbee::ZigbeeNwk::ReceiveRREP ( Mac16Address macSrcAddr,
uint8_t linkCost,
ZigbeeNwkHeader nwkHeader,
ZigbeePayloadRouteReplyCommand payload )
private

Handles the reception of a route reply command.

See Zigbee specification r22.1.0, Section 3.6.3.5.3

Parameters
macSrcAddrThe MAC source address of this reply (a.k.a. previous hop)
nwkHeaderThe received network Header
payloadThe received route reply command payload
linkCostThe link cost associated to the received RREP

Definition at line 567 of file zigbee-nwk.cc.

References BufferTxPkt(), ns3::Create(), ns3::zigbee::RouteDiscoveryTable::Delete(), ns3::zigbee::RreqRetryTable::Delete(), DequeuePendingTx(), ns3::zigbee::ZigbeePayloadRouteReplyCommand::GetOrigAddr(), ns3::zigbee::ZigbeePayloadRouteReplyCommand::GetPathCost(), ns3::zigbee::ZigbeePayloadRouteReplyCommand::GetRespAddr(), ns3::zigbee::ZigbeePayloadRouteReplyCommand::GetRouteReqId(), ns3::SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE >::GetValue(), ns3::Callback< R, UArgs >::IsNull(), ns3::zigbee::RouteDiscoveryTable::LookUpEntry(), ns3::zigbee::RoutingTable::LookUpEntry(), ns3::zigbee::RreqRetryTable::LookUpEntry(), ns3::lrwpan::McpsDataRequestParams::m_dstAddr, ns3::lrwpan::McpsDataRequestParams::m_dstAddrMode, ns3::lrwpan::McpsDataRequestParams::m_dstPanId, m_mac, m_macHandle, ns3::lrwpan::McpsDataRequestParams::m_msduHandle, m_nlmeRouteDiscoveryConfirmCallback, m_nwkNetworkAddress, m_nwkPanId, m_nwkRouteDiscoveryTable, m_nwkRoutingTable, m_pendingTxQueue, m_pendPrimitiveNwk, m_rreqRetryTable, ns3::lrwpan::McpsDataRequestParams::m_srcAddrMode, ns3::zigbee::NlmeRouteDiscoveryConfirmParams::m_status, ns3::lrwpan::McpsDataRequestParams::m_txOptions, ns3::lrwpan::LrWpanMacBase::McpsDataRequest(), ns3::zigbee::NLDE_NLME_NONE, ns3::zigbee::NLME_ROUTE_DISCOVERY, NS_LOG_DEBUG, NS_LOG_ERROR, NS_LOG_FUNCTION, ns3::zigbee::ROUTE_ACTIVE, ns3::zigbee::ROUTE_DISCOVERY_UNDERWAY, ns3::zigbee::ROUTE_VALIDATION_UNDERWAY, ns3::Simulator::ScheduleNow(), SendRREP(), ns3::lrwpan::SHORT_ADDR, and ns3::zigbee::SUCCESS.

Referenced by McpsDataIndication().

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

◆ ReceiveRREQ()

void ns3::zigbee::ZigbeeNwk::ReceiveRREQ ( Mac16Address macSrcAddr,
uint8_t linkCost,
ZigbeeNwkHeader nwkHeader,
ZigbeePayloadRouteRequestCommand payload )
private

Handles the reception of a route request command.

See Zigbee specification r22.1.0, Section 3.6.3.5.2

Parameters
macSrcAddrThe MAC header source address
nwkHeaderThe received network Header
payloadThe received route request command payload
linkCostThe link cost associated to the received RREQ

Definition at line 490 of file zigbee-nwk.cc.

References FindNextHop(), ns3::zigbee::ZigbeePayloadRouteRequestCommand::GetCmdOptManyToOneField(), ns3::zigbee::ZigbeePayloadRouteRequestCommand::GetDstAddr(), ns3::zigbee::ZigbeePayloadRouteRequestCommand::GetPathCost(), ns3::zigbee::ZigbeePayloadRouteRequestCommand::GetRouteReqId(), ns3::zigbee::ZigbeeNwkHeader::GetSrcAddr(), m_nwkcRREQRetries, m_nwkNetworkAddress, m_nwkSequenceNumber, m_routeRequestId, m_rreqJitter, ns3::zigbee::MANY_TO_ONE_ROUTE, ns3::MilliSeconds(), ns3::zigbee::NO_MANY_TO_ONE, NS_LOG_DEBUG, NS_LOG_FUNCTION, ProcessManyToOneRoute(), ns3::zigbee::ROUTE_FOUND, ns3::zigbee::ROUTE_NOT_FOUND, ns3::zigbee::ROUTE_UPDATED, ns3::Simulator::Schedule(), SendRREP(), SendRREQ(), and ns3::zigbee::ZigbeePayloadRouteRequestCommand::SetPathCost().

Referenced by McpsDataIndication().

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

◆ RetrieveTxPkt()

bool ns3::zigbee::ZigbeeNwk::RetrieveTxPkt ( uint8_t macHandle,
Ptr< TxPkt > & txPkt )
private

Retrieves a previously DATA frame buffered in the TxPkt buffer.

If the frame is successfully retrieved, the entry is removed from the TxPkt buffer.

Parameters
macHandleThe mac layer handle (msdu handle) associated to this frame.
txPktThe packet buffered in the TxPkt buffer.
Returns
True if the txPkt is successfully retrieved.

Definition at line 2771 of file zigbee-nwk.cc.

References m_txBuffer.

Referenced by McpsDataConfirm().

+ Here is the caller graph for this function:

◆ SendDataBcst()

void ns3::zigbee::ZigbeeNwk::SendDataBcst ( Ptr< Packet > packet,
uint8_t nwkHandle )
private

Send a data broadcast packet, and add a record to the broadcast transaction table (BTT).

Parameters
packetThe NPDU (nwkHeader + data payload) to transmit.
nwkHandleThe NWK handle associated to this packet (nsdu handle). A handle of 0 implies that the unicast transmission is a retransmission and do not requires a handle which is used to identify a packet in confirmations to requests (NLDE-DATA.confirm).

Definition at line 1017 of file zigbee-nwk.cc.

References BufferTxPkt(), ns3::SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE >::GetValue(), ns3::lrwpan::McpsDataRequestParams::m_dstAddr, ns3::lrwpan::McpsDataRequestParams::m_dstAddrMode, ns3::lrwpan::McpsDataRequestParams::m_dstPanId, m_mac, m_macHandle, ns3::lrwpan::McpsDataRequestParams::m_msduHandle, m_nwkPanId, ns3::lrwpan::McpsDataRequestParams::m_srcAddrMode, ns3::lrwpan::LrWpanMacBase::McpsDataRequest(), ns3::Simulator::ScheduleNow(), and ns3::lrwpan::SHORT_ADDR.

Referenced by McpsDataIndication(), and NldeDataRequest().

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

◆ SendDataUcst()

void ns3::zigbee::ZigbeeNwk::SendDataUcst ( Ptr< Packet > packet,
uint8_t nwkHandle )
private

Send a data unicast packet, and if necessary look for the next hop route and store the pending data transmission until a route is found.

Parameters
packetThe NPDU (nwkHeader + data payload) to transmit.
nwkHandleThe NWK handle associated to this packet (nsdu handle). A handle of 0 implies that the unicast transmission is a retransmission and do not requires a handle which is used to identify a packet in confirmations to requests (NLDE-DATA.confirm).

Definition at line 940 of file zigbee-nwk.cc.

References BufferTxPkt(), EnqueuePendingTx(), FindNextHop(), ns3::zigbee::ZigbeeNwkHeader::GetDiscoverRoute(), ns3::zigbee::ZigbeeNwkHeader::GetDstAddr(), ns3::zigbee::ZigbeeNwkHeader::GetRadius(), ns3::SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE >::GetValue(), ns3::lrwpan::McpsDataRequestParams::m_dstAddr, ns3::lrwpan::McpsDataRequestParams::m_dstAddrMode, ns3::lrwpan::McpsDataRequestParams::m_dstPanId, m_mac, m_macHandle, ns3::lrwpan::McpsDataRequestParams::m_msduHandle, m_nwkcInitialRREQRetries, m_nwkcProtocolVersion, m_nwkMaxDepth, m_nwkNetworkAddress, m_nwkPanId, m_nwkSequenceNumber, m_routeRequestId, m_rreqJitter, ns3::lrwpan::McpsDataRequestParams::m_srcAddrMode, ns3::lrwpan::McpsDataRequestParams::m_txOptions, ns3::lrwpan::LrWpanMacBase::McpsDataRequest(), ns3::MilliSeconds(), NS_LOG_FUNCTION, ns3::zigbee::NWK_COMMAND, ns3::zigbee::ROUTE_FOUND, ns3::zigbee::ROUTE_NOT_FOUND, ns3::Simulator::Schedule(), ns3::Simulator::ScheduleNow(), SendRREQ(), ns3::zigbee::ZigbeeNwkHeader::SetDiscoverRoute(), ns3::zigbee::ZigbeeNwkHeader::SetDstAddr(), ns3::zigbee::ZigbeePayloadRouteRequestCommand::SetDstAddr(), ns3::zigbee::ZigbeeNwkHeader::SetFrameType(), ns3::zigbee::ZigbeePayloadRouteRequestCommand::SetPathCost(), ns3::zigbee::ZigbeeNwkHeader::SetProtocolVer(), ns3::zigbee::ZigbeeNwkHeader::SetRadius(), ns3::zigbee::ZigbeePayloadRouteRequestCommand::SetRouteReqId(), ns3::zigbee::ZigbeeNwkHeader::SetSeqNum(), ns3::zigbee::ZigbeeNwkHeader::SetSrcAddr(), and ns3::lrwpan::SHORT_ADDR.

Referenced by McpsDataIndication(), and NldeDataRequest().

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

◆ SendRREP()

void ns3::zigbee::ZigbeeNwk::SendRREP ( Mac16Address nextHop,
Mac16Address originator,
Mac16Address responder,
uint8_t rreqId,
uint8_t pathcost )
private

Construct and send a route reply command.

See Zigbee specification r22.1.0, Section 3.4.2

Parameters
nextHopThe address of the next hop in the path back to the RREQ originator.
originatorThe address of the originator device of the first RREQ.
responderThe address of the first device responding to the RREQ with a RREP.
rreqIdThe RREQ identifier of the originator RREQ.
pathcostThe sum value of link costs along the way.

Definition at line 2985 of file zigbee-nwk.cc.

References ns3::Create(), ns3::zigbee::ENABLE_ROUTE_DISCOVERY, ns3::SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE >::GetValue(), m_mac, m_macHandle, m_nwkcProtocolVersion, m_nwkMaxDepth, m_nwkNetworkAddress, m_nwkPanId, m_nwkSequenceNumber, ns3::lrwpan::LrWpanMacBase::McpsDataRequest(), NS_LOG_FUNCTION, ns3::zigbee::NWK_COMMAND, ns3::zigbee::ROUTE_REP_CMD, ns3::Simulator::ScheduleNow(), ns3::zigbee::ZigbeeNwkHeader::SetDiscoverRoute(), ns3::zigbee::ZigbeeNwkHeader::SetDstAddr(), ns3::zigbee::ZigbeeNwkHeader::SetFrameType(), ns3::zigbee::ZigbeePayloadRouteReplyCommand::SetOrigAddr(), ns3::zigbee::ZigbeePayloadRouteReplyCommand::SetPathCost(), ns3::zigbee::ZigbeeNwkHeader::SetProtocolVer(), ns3::zigbee::ZigbeeNwkHeader::SetRadius(), ns3::zigbee::ZigbeePayloadRouteReplyCommand::SetRespAddr(), ns3::zigbee::ZigbeePayloadRouteReplyCommand::SetRouteReqId(), ns3::zigbee::ZigbeeNwkHeader::SetSeqNum(), ns3::zigbee::ZigbeeNwkHeader::SetSrcAddr(), and ns3::lrwpan::SHORT_ADDR.

Referenced by ReceiveRREP(), and ReceiveRREQ().

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

◆ SendRREQ()

void ns3::zigbee::ZigbeeNwk::SendRREQ ( ZigbeeNwkHeader nwkHeader,
ZigbeePayloadRouteRequestCommand payload,
uint8_t rreqRetries )
private

Send a route request command.

See Zigbee specification r22.1.0, Section 3.4.1

Parameters
nwkHeaderThe network header of the RREQ packet to send
payloadThe payload header of the RREQ packet to send
rreqRetriesThe maximum number of retries the broadcast transmission of a route request command frame is retried. Only valid for non Many-To-One RREQs.

Definition at line 2898 of file zigbee-nwk.cc.

References ns3::zigbee::RreqRetryTable::AddEntry(), ns3::Create(), ns3::Mac16Address::GetBroadcast(), ns3::zigbee::ZigbeePayloadRouteRequestCommand::GetCmdOptManyToOneField(), ns3::zigbee::ZigbeePayloadRouteRequestCommand::GetDstAddr(), ns3::zigbee::ZigbeeNwkHeader::GetRadius(), ns3::zigbee::ZigbeePayloadRouteRequestCommand::GetRouteReqId(), ns3::SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE >::GetValue(), ns3::zigbee::RreqRetryTable::LookUpEntry(), m_mac, m_macHandle, m_nwkcRREQRetryInterval, m_nwkPanId, m_rreqJitter, m_rreqRetriesExhaustedTrace, m_rreqRetryTable, ns3::lrwpan::LrWpanMacBase::McpsDataRequest(), ns3::MilliSeconds(), ns3::zigbee::NO_MANY_TO_ONE, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::zigbee::ROUTE_REQ_CMD, ns3::Simulator::Schedule(), ns3::Simulator::ScheduleNow(), SendRREQ(), and ns3::lrwpan::SHORT_ADDR.

Referenced by NlmeRouteDiscoveryRequest(), ReceiveRREQ(), SendDataUcst(), and SendRREQ().

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

◆ SetMac()

void ns3::zigbee::ZigbeeNwk::SetMac ( Ptr< lrwpan::LrWpanMacBase > mac)

Set the underlying MAC to use in this Zigbee NWK.

Parameters
macThe pointer to the underlying LrWpan MAC to set to this Zigbee NWK

Definition at line 209 of file zigbee-nwk.cc.

References m_mac.

◆ SetNldeDataConfirmCallback()

void ns3::zigbee::ZigbeeNwk::SetNldeDataConfirmCallback ( NldeDataConfirmCallback c)

Set the callback as part of the interconnections between the NWK and the APS sublayer (or any other higher layer).

The callback implements the callback used in a NLDE-DATA.confirm

Parameters
cthe NldeDataConfirm callback

Definition at line 2650 of file zigbee-nwk.cc.

References m_nldeDataConfirmCallback.

◆ SetNldeDataIndicationCallback()

void ns3::zigbee::ZigbeeNwk::SetNldeDataIndicationCallback ( NldeDataIndicationCallback c)

Set the callback for the end of a RX, as part of the interconnections between the NWK and the APS sublayer.

The callback implements the callback used in a NLDE-DATA.indication.

Parameters
cthe NldeDataIndication callback

Definition at line 2644 of file zigbee-nwk.cc.

References m_nldeDataIndicationCallback.

◆ SetNlmeDirectJoinConfirmCallback()

void ns3::zigbee::ZigbeeNwk::SetNlmeDirectJoinConfirmCallback ( NlmeDirectJoinConfirmCallback c)

Set the callback as part of the interconnections between the NWK and the APS sublayer (or any other higher layer).

The callback implements the callback used in a NLME-DIRECT-JOIN.confirm

Parameters
cthe NlmeDirectJoinConfirm callback

Definition at line 2674 of file zigbee-nwk.cc.

References m_nlmeDirectJoinConfirmCallback.

◆ SetNlmeJoinConfirmCallback()

void ns3::zigbee::ZigbeeNwk::SetNlmeJoinConfirmCallback ( NlmeJoinConfirmCallback c)

Set the callback as part of the interconnections between the NWK and the APS sublayer (or any other higher layer).

The callback implements the callback used in a NLME-JOIN.confirm

Parameters
cthe NlmeJoinConfirm callback

Definition at line 2680 of file zigbee-nwk.cc.

References m_nlmeJoinConfirmCallback.

◆ SetNlmeJoinIndicationCallback()

void ns3::zigbee::ZigbeeNwk::SetNlmeJoinIndicationCallback ( NlmeJoinIndicationCallback c)

Set the callback as part of the interconnections between the NWK and the APS sublayer (or any other higher layer).

The callback implements the callback used in a NLME-JOIN.indication

Parameters
cthe NlmeJoinIndication callback

Definition at line 2686 of file zigbee-nwk.cc.

References m_nlmeJoinIndicationCallback.

◆ SetNlmeNetworkDiscoveryConfirmCallback()

void ns3::zigbee::ZigbeeNwk::SetNlmeNetworkDiscoveryConfirmCallback ( NlmeNetworkDiscoveryConfirmCallback c)

Set the callback as part of the interconnections between the NWK and the APS sublayer (or any other higher layer).

The callback implements the callback used in a NLME-NETWORK-DISCOVERY.confirm

Parameters
cthe NlmeNetworkDiscoveryConfirm callback

Definition at line 2662 of file zigbee-nwk.cc.

References m_nlmeNetworkDiscoveryConfirmCallback.

◆ SetNlmeNetworkFormationConfirmCallback()

void ns3::zigbee::ZigbeeNwk::SetNlmeNetworkFormationConfirmCallback ( NlmeNetworkFormationConfirmCallback c)

Set the callback as part of the interconnections between the NWK and the APS sublayer (or any other higher layer).

The callback implements the callback used in a NLME-NETWORK-FORMATION.confirm

Parameters
cthe NlmeNetworkFormationConfirm callback

Definition at line 2656 of file zigbee-nwk.cc.

References m_nlmeNetworkFormationConfirmCallback.

◆ SetNlmeRouteDiscoveryConfirmCallback()

void ns3::zigbee::ZigbeeNwk::SetNlmeRouteDiscoveryConfirmCallback ( NlmeRouteDiscoveryConfirmCallback c)

Set the callback as part of the interconnections between the NWK and the APS sublayer (or any other higher layer).

The callback implements the callback used in a NLME-ROUTE-DISCOVERY.confirm

Parameters
cthe NlmeRouteDiscoveryConfirm callback

Definition at line 2668 of file zigbee-nwk.cc.

References m_nlmeRouteDiscoveryConfirmCallback.

◆ SetNlmeStartRouterConfirmCallback()

void ns3::zigbee::ZigbeeNwk::SetNlmeStartRouterConfirmCallback ( NlmeStartRouterConfirmCallback c)

Set the callback as part of the interconnections between the NWK and the APS sublayer (or any other higher layer).

The callback implements the callback used in a NLME-START-ROUTER.confirm

Parameters
cthe NlmeStartRouterConfirm callback

Definition at line 2692 of file zigbee-nwk.cc.

References m_nlmeStartRouterConfirmCallback.

◆ UpdateBeaconPayload()

void ns3::zigbee::ZigbeeNwk::UpdateBeaconPayload ( )
private

Updates the content of the beacon payload with the most recent information in the NWK.

Definition at line 3066 of file zigbee-nwk.cc.

References ns3::Packet::CopyData(), ns3::Create(), ns3::Packet::GetSize(), m_beaconPayload, m_mac, ns3::lrwpan::LrWpanMacBase::MlmeSetRequest(), NS_LOG_FUNCTION, and ns3::Simulator::ScheduleNow().

Referenced by MlmeSetConfirm().

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

◆ UpdateBeaconPayloadLength()

void ns3::zigbee::ZigbeeNwk::UpdateBeaconPayloadLength ( )
private

Create and store a MAC beacon payload, then updates its registered size in the MAC.

This is typically followed by updating the content of the beacon payload.

Definition at line 3040 of file zigbee-nwk.cc.

References ns3::Packet::AddHeader(), ns3::Create(), ns3::Packet::GetSize(), m_beaconPayload, m_mac, m_nwkcCoordinatorCapable, m_nwkExtendedPanId, m_nwkStackProfile, ns3::lrwpan::LrWpanMacBase::MlmeSetRequest(), NS_LOG_FUNCTION, ns3::Simulator::ScheduleNow(), ns3::zigbee::ZigbeeBeaconPayload::SetDeviceDepth(), ns3::zigbee::ZigbeeBeaconPayload::SetEndDevCapacity(), ns3::zigbee::ZigbeeBeaconPayload::SetExtPanId(), ns3::zigbee::ZigbeeBeaconPayload::SetRouterCapacity(), ns3::zigbee::ZigbeeBeaconPayload::SetStackProfile(), and ns3::zigbee::ZigbeeBeaconPayload::SetTxOffset().

Referenced by MlmeCommStatusIndication(), MlmeGetConfirm(), and MlmeStartConfirm().

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

Member Data Documentation

◆ m_associateParams

lrwpan::MlmeAssociateRequestParams ns3::zigbee::ZigbeeNwk::m_associateParams
private

Temporarily store MLME-ASSOCIATE.request parameters during a NLME-JOIN.request.

Definition at line 1231 of file zigbee-nwk.h.

Referenced by MlmeAssociateConfirm(), and NlmeJoinRequest().

◆ m_beaconPayload

Ptr<Packet> ns3::zigbee::ZigbeeNwk::m_beaconPayload
private

Points to the beacon payload used during the network formation process.

Definition at line 1538 of file zigbee-nwk.h.

Referenced by NotifyConstructionCompleted(), UpdateBeaconPayload(), and UpdateBeaconPayloadLength().

◆ m_btt

BroadcastTransactionTable ns3::zigbee::ZigbeeNwk::m_btt
private

The broadcast transaction table.

See Zigbee specification r22.1.0, 3.6.5

Definition at line 1284 of file zigbee-nwk.h.

Referenced by DoDispose(), and McpsDataIndication().

◆ m_countRREQRetries

uint8_t ns3::zigbee::ZigbeeNwk::m_countRREQRetries
private

Count the number of retries this device has transmitted an RREQ.

Definition at line 1590 of file zigbee-nwk.h.

Referenced by NotifyConstructionCompleted().

◆ m_currentChannel

uint8_t ns3::zigbee::ZigbeeNwk::m_currentChannel
private

Used to store the value of the PHY current channel.

Definition at line 1543 of file zigbee-nwk.h.

Referenced by MlmeGetConfirm().

◆ m_filteredChannelMask

uint32_t ns3::zigbee::ZigbeeNwk::m_filteredChannelMask
private

Contains the list of channels with acceptable energy levels in a bitmap form.

This is the result of an Energy Detection (ED) scan during a NLME-NETWORK-FORMATION.request

Definition at line 1244 of file zigbee-nwk.h.

Referenced by MlmeScanConfirm().

◆ m_joinIndParams

NlmeJoinIndicationParams ns3::zigbee::ZigbeeNwk::m_joinIndParams
private

Temporarily store the NLME-JOIN.indication parameters while the join operations (asocciation) conclude in the coordinator or router.

Definition at line 1219 of file zigbee-nwk.h.

Referenced by MlmeAssociateIndication(), MlmeCommStatusIndication(), MlmeOrphanIndication(), and MlmeSetConfirm().

◆ m_joinParams

NlmeJoinRequestParams ns3::zigbee::ZigbeeNwk::m_joinParams
private

The parameters used during a NLME-JOIN.request.

These parameters are stored here while the scanning operations and network joining procedures take place.

Definition at line 1213 of file zigbee-nwk.h.

Referenced by MlmeAssociateConfirm(), MlmeGetConfirm(), MlmeScanConfirm(), and NlmeJoinRequest().

◆ m_mac

◆ m_macHandle

SequenceNumber8 ns3::zigbee::ZigbeeNwk::m_macHandle
private

The handle assigned when doing a transmission request to the MAC layer.

Definition at line 1791 of file zigbee-nwk.h.

Referenced by NldeDataRequest(), NotifyConstructionCompleted(), ReceiveRREP(), SendDataBcst(), SendDataUcst(), SendRREP(), and SendRREQ().

◆ m_maxPendingTxQueueSize

uint32_t ns3::zigbee::ZigbeeNwk::m_maxPendingTxQueueSize
private

The maximum size of the pending transaction queue.

Definition at line 1092 of file zigbee-nwk.h.

Referenced by EnqueuePendingTx(), and GetTypeId().

◆ m_netFormParams

NlmeNetworkFormationRequestParams ns3::zigbee::ZigbeeNwk::m_netFormParams
private

The parameters used during a NLME-NETWORK-FORMATION.request.

These parameters are stored here while the scanning operations and network initialization procedures take place.

Definition at line 1199 of file zigbee-nwk.h.

Referenced by MlmeGetConfirm(), MlmeScanConfirm(), MlmeSetConfirm(), MlmeStartConfirm(), NlmeNetworkFormationRequest(), and NotifyConstructionCompleted().

◆ m_netFormParamsGen

Ptr<NetFormPendingParamsGen> ns3::zigbee::ZigbeeNwk::m_netFormParamsGen
private

The values temporarily stored as a result of the initial steps of a NLME-NETWORK-FORMATION.request (i.e.

after the first energy scan) Page, Channel, PanId.

Definition at line 1206 of file zigbee-nwk.h.

Referenced by MlmeGetConfirm(), MlmeScanConfirm(), MlmeSetConfirm(), MlmeStartConfirm(), NlmeNetworkFormationRequest(), and NotifyConstructionCompleted().

◆ m_networkDescriptorList

std::vector<NetworkDescriptor> ns3::zigbee::ZigbeeNwk::m_networkDescriptorList
private

Temporarily store beacons information from POS routers and PAN coordinators during a network-discovery process.

Definition at line 1533 of file zigbee-nwk.h.

Referenced by MlmeBeaconNotifyIndication(), and MlmeScanConfirm().

◆ m_nldeDataConfirmCallback

NldeDataConfirmCallback ns3::zigbee::ZigbeeNwk::m_nldeDataConfirmCallback
private

This callback is used to respond to data PDU (NSDU) transfer request issued by APS sublayer to the NWK (or a layer higher to NWK).

See Zigbee specification r22.1.0, section 3.2.1.2.

Definition at line 1139 of file zigbee-nwk.h.

Referenced by DoDispose(), McpsDataConfirm(), NldeDataRequest(), and SetNldeDataConfirmCallback().

◆ m_nldeDataIndicationCallback

NldeDataIndicationCallback ns3::zigbee::ZigbeeNwk::m_nldeDataIndicationCallback
private

This callback is used to notify incoming packets to the APS sublayer.

See Zigbee Specification r22.1.0, section 6.2.1.3.

Definition at line 1132 of file zigbee-nwk.h.

Referenced by DoDispose(), McpsDataIndication(), and SetNldeDataIndicationCallback().

◆ m_nlmeDirectJoinConfirmCallback

NlmeDirectJoinConfirmCallback ns3::zigbee::ZigbeeNwk::m_nlmeDirectJoinConfirmCallback
private

This callback is used by the next layer of a zigbee coordinator or router to be notified of the result of its request to directly join another device to its network See Zigbee specification r22.1.0, section 3.2.2.17.

Definition at line 1168 of file zigbee-nwk.h.

Referenced by DoDispose(), NlmeDirectJoinRequest(), and SetNlmeDirectJoinConfirmCallback().

◆ m_nlmeJoinConfirmCallback

NlmeJoinConfirmCallback ns3::zigbee::ZigbeeNwk::m_nlmeJoinConfirmCallback
private

This callback is used by the next layer of a zigbee router or device to be notified of the result of its request to join another device network.

See Zigbee specification r22.1.0, section 3.2.2.15

Definition at line 1176 of file zigbee-nwk.h.

Referenced by DoDispose(), MlmeAssociateConfirm(), MlmeGetConfirm(), MlmeScanConfirm(), NlmeJoinRequest(), and SetNlmeJoinConfirmCallback().

◆ m_nlmeJoinIndicationCallback

NlmeJoinIndicationCallback ns3::zigbee::ZigbeeNwk::m_nlmeJoinIndicationCallback
private

This callback is used by the next layer of a zigbee coordinator or router to be notified when a new device has successfully joined its network by association or rejoined procedures.

See Zigbee specification r22.1.0, section 3.2.2.14

Definition at line 1184 of file zigbee-nwk.h.

Referenced by DoDispose(), MlmeCommStatusIndication(), MlmeSetConfirm(), and SetNlmeJoinIndicationCallback().

◆ m_nlmeNetworkDiscoveryConfirmCallback

NlmeNetworkDiscoveryConfirmCallback ns3::zigbee::ZigbeeNwk::m_nlmeNetworkDiscoveryConfirmCallback
private

This callback is used to to notify the results of a network formation to the APS sublayer making the request.

See Zigbee specification r22.1.0, section 3.2.2.4

Definition at line 1153 of file zigbee-nwk.h.

Referenced by DoDispose(), MlmeScanConfirm(), and SetNlmeNetworkDiscoveryConfirmCallback().

◆ m_nlmeNetworkFormationConfirmCallback

NlmeNetworkFormationConfirmCallback ns3::zigbee::ZigbeeNwk::m_nlmeNetworkFormationConfirmCallback
private

This callback is used to to notify the results of a network formation to the APS sublayer making the request.

See Zigbee specification r22.1.0, section 3.2.2.5

Definition at line 1146 of file zigbee-nwk.h.

Referenced by DoDispose(), MlmeGetConfirm(), MlmeScanConfirm(), MlmeSetConfirm(), MlmeStartConfirm(), NlmeNetworkFormationRequest(), and SetNlmeNetworkFormationConfirmCallback().

◆ m_nlmeRouteDiscoveryConfirmCallback

NlmeRouteDiscoveryConfirmCallback ns3::zigbee::ZigbeeNwk::m_nlmeRouteDiscoveryConfirmCallback
private

This callback is used to to notify the results of a network formation to the APS sublayer making the request.

See Zigbee specification r22.1.0, section 3.2.2.34

Definition at line 1160 of file zigbee-nwk.h.

Referenced by DoDispose(), FindNextHop(), NlmeRouteDiscoveryRequest(), ProcessManyToOneRoute(), ReceiveRREP(), and SetNlmeRouteDiscoveryConfirmCallback().

◆ m_nlmeStartRouterConfirmCallback

NlmeStartRouterConfirmCallback ns3::zigbee::ZigbeeNwk::m_nlmeStartRouterConfirmCallback
private

This callback is used by the next layer of a zigbee router or device to be notified of the result of its request to initiate activities as a zigbee router See Zigbee specification r22.1.0, section 3.2.2.10.

Definition at line 1192 of file zigbee-nwk.h.

Referenced by DoDispose(), MlmeSetConfirm(), MlmeStartConfirm(), NlmeStartRouterRequest(), and SetNlmeStartRouterConfirmCallback().

◆ m_nwkAddrAlloc

AddrAllocMethod ns3::zigbee::ZigbeeNwk::m_nwkAddrAlloc
private

A value that determines the method used to assign addresses.

See Zigbee specification r22.1.0, Table 3-58

Definition at line 1624 of file zigbee-nwk.h.

Referenced by AllocateNetworkAddress(), and NotifyConstructionCompleted().

◆ m_nwkCapabilityInformation

uint8_t ns3::zigbee::ZigbeeNwk::m_nwkCapabilityInformation
private

This NIB attribute contains the device capability information established at network joining time.

See Zigbee specification r22.1.0, Table 3-58 (NIB attributes)

Definition at line 1706 of file zigbee-nwk.h.

Referenced by McpsDataIndication(), MlmeGetConfirm(), MlmeScanConfirm(), NldeDataRequest(), NlmeJoinRequest(), NlmeRouteDiscoveryRequest(), NlmeStartRouterRequest(), and NotifyConstructionCompleted().

◆ m_nwkcCoordinatorCapable

bool ns3::zigbee::ZigbeeNwk::m_nwkcCoordinatorCapable
private

Indicates whether the device is capable of becoming the ZigBee coordinator Zigbee Specification r22.1.0, Table 3-57.

Defined as a constant in the specification but here is defined as variable to be able to change the devices capabilities.

Definition at line 1554 of file zigbee-nwk.h.

Referenced by GetTypeId(), NlmeNetworkFormationRequest(), and UpdateBeaconPayloadLength().

◆ m_nwkcInitialRREQRetries

uint8_t ns3::zigbee::ZigbeeNwk::m_nwkcInitialRREQRetries
private

The number of times the first broadcast transmission of a route request command frame is retried.

Zigbee Specification r22.1.0, Table 3-57. Defined as a constant in the specification but here is defined as variable to allow the selection of values per device.

Definition at line 1576 of file zigbee-nwk.h.

Referenced by GetTypeId(), NlmeRouteDiscoveryRequest(), and SendDataUcst().

◆ m_nwkcMaxRREQJitter

double ns3::zigbee::ZigbeeNwk::m_nwkcMaxRREQJitter
private

Maximum Route request broadcast jitter time (msec).

Zigbee Specification r22.1.0, Table 3-57. Defined as a constant in the specification but here is defined as variable to allow the selection of values per device.

Definition at line 1614 of file zigbee-nwk.h.

Referenced by GetTypeId(), and NotifyConstructionCompleted().

◆ m_nwkcMinRREQJitter

double ns3::zigbee::ZigbeeNwk::m_nwkcMinRREQJitter
private

Minimum Route request broadcast jitter time (msec).

Zigbee Specification r22.1.0, Table 3-57. Defined as a constant in the specification but here is defined as variable to allow the selection of values per device.

Definition at line 1606 of file zigbee-nwk.h.

Referenced by GetTypeId(), and NotifyConstructionCompleted().

◆ m_nwkConcentratorDiscoveryTime

uint8_t ns3::zigbee::ZigbeeNwk::m_nwkConcentratorDiscoveryTime
private

The time in seconds between concentrator route discoveries.

If set to 0x0000, the discoveries are done at the start up and by the next higher layer only. See Zigbee specification r22.1.0, Table 3-58 (NIB attributes)

Definition at line 1728 of file zigbee-nwk.h.

Referenced by NotifyConstructionCompleted().

◆ m_nwkConcentratorRadius

uint8_t ns3::zigbee::ZigbeeNwk::m_nwkConcentratorRadius
private

This NIB attribute indicates the hop count radius for concentrator route discoveries (Used by Many-To-One routing).

See Zigbee specification r22.1.0, Table 3-58 (NIB attributes)

Definition at line 1720 of file zigbee-nwk.h.

Referenced by NlmeRouteDiscoveryRequest(), and NotifyConstructionCompleted().

◆ m_nwkcProtocolVersion

uint8_t ns3::zigbee::ZigbeeNwk::m_nwkcProtocolVersion
private

Indicates the version of the ZigBee NWK protocol in the device.

Zigbee Specification r22.1.0, Table 3-57. Defined as a constant in the specification but here is defined as variable to be able to change the devices capabilities.

Definition at line 1561 of file zigbee-nwk.h.

Referenced by GetTypeId(), NlmeRouteDiscoveryRequest(), SendDataUcst(), and SendRREP().

◆ m_nwkcRouteDiscoveryTime

Time ns3::zigbee::ZigbeeNwk::m_nwkcRouteDiscoveryTime
private

Indicates the duration until a route discovery expires.

Zigbee Specification r22.1.0, Table 3-57. Defined as a constant in the specification but here is defined as variable to be able to change the devices capabilities.

Definition at line 1568 of file zigbee-nwk.h.

Referenced by FindNextHop(), GetTypeId(), and ProcessManyToOneRoute().

◆ m_nwkcRREQRetries

uint8_t ns3::zigbee::ZigbeeNwk::m_nwkcRREQRetries
private

The number of times the broadcast transmission of a route request command frame is retried on relay by an intermediate Zigbee router or coordinator.

Zigbee Specification r22.1.0, Table 3-57. Defined as a constant in the specification but here is defined as variable to allow the selection of values per device.

Definition at line 1585 of file zigbee-nwk.h.

Referenced by GetTypeId(), and ReceiveRREQ().

◆ m_nwkcRREQRetryInterval

Time ns3::zigbee::ZigbeeNwk::m_nwkcRREQRetryInterval
private

Duration between retries of a broadcast route request command frame.

Zigbee Specification r22.1.0, Table 3-57. Defined as a constant in the specification but here is defined as variable to allow the selection of values per device.

Definition at line 1598 of file zigbee-nwk.h.

Referenced by GetTypeId(), and SendRREQ().

◆ m_nwkEndDeviceTimeoutDefault

uint16_t ns3::zigbee::ZigbeeNwk::m_nwkEndDeviceTimeoutDefault
private

Indicates the index of the requested timeout field that contains the timeout in minutes for any end device that does not negotiate a different timeout value.

See Zigbee specification r22.1.0, Table 3-58 (NIB attributes)

Definition at line 1663 of file zigbee-nwk.h.

Referenced by MlmeAssociateIndication(), MlmeBeaconNotifyIndication(), NlmeDirectJoinRequest(), and NotifyConstructionCompleted().

◆ m_nwkExtendedPanId

uint64_t ns3::zigbee::ZigbeeNwk::m_nwkExtendedPanId
private

The extended PAN identifier for the PAN of which the device is a member.

A value of 0 means that the extended PAN identifier is unknown. See Zigbee specification r22.1.0, Table 3-58 (NIB attributes)

Definition at line 1670 of file zigbee-nwk.h.

Referenced by MlmeAssociateConfirm(), MlmeAssociateIndication(), MlmeGetConfirm(), MlmeScanConfirm(), MlmeStartConfirm(), NotifyConstructionCompleted(), and UpdateBeaconPayloadLength().

◆ m_nwkIeeeAddress

Mac64Address ns3::zigbee::ZigbeeNwk::m_nwkIeeeAddress
private

The EUI 64 bit IEEE address of the local device.

See Zigbee specification r22.1.0, Table 3-58 (NIB attributes)

Definition at line 1683 of file zigbee-nwk.h.

Referenced by GetIeeeAddress(), MlmeGetConfirm(), PrintNeighborTable(), PrintRouteDiscoveryTable(), PrintRoutingTable(), and PrintRREQRetryTable().

◆ m_nwkIsConcentrator

bool ns3::zigbee::ZigbeeNwk::m_nwkIsConcentrator
private

This NIB attribute is a flag determining if this device is a concentrator (Use in Many-To-One routing).

See Zigbee specification r22.1.0, Table 3-58 (NIB attributes)

Definition at line 1713 of file zigbee-nwk.h.

Referenced by NlmeRouteDiscoveryRequest(), and NotifyConstructionCompleted().

◆ m_nwkMaxBroadcastRetries

uint8_t ns3::zigbee::ZigbeeNwk::m_nwkMaxBroadcastRetries
private

The maximum number of retries allowed after a broadcast transmission failure See Zigbe Specification r22.1.0, Table 3-58 (NIB attributes)

Definition at line 1760 of file zigbee-nwk.h.

Referenced by NotifyConstructionCompleted().

◆ m_nwkMaxChildren

uint16_t ns3::zigbee::ZigbeeNwk::m_nwkMaxChildren
private

The number of children a device is allowed to have on its current network.

Default value defined in the stack profile. See Zigbee PRO/2007 Layer protocol implementation conformance statement (PICS) and stack profiles (Section 10.4.2.1)

Definition at line 1640 of file zigbee-nwk.h.

Referenced by NotifyConstructionCompleted().

◆ m_nwkMaxDepth

uint8_t ns3::zigbee::ZigbeeNwk::m_nwkMaxDepth
private

The depth a device can have.

Default value defined in the stack profile. See Zigbee specification r22.1.0 Layer protocol implementation conformance statement (PICS) and stack profiles (Section 10.4.2.1)

Definition at line 1632 of file zigbee-nwk.h.

Referenced by NldeDataRequest(), NlmeRouteDiscoveryRequest(), NotifyConstructionCompleted(), SendDataUcst(), and SendRREP().

◆ m_nwkMaxRouters

uint16_t ns3::zigbee::ZigbeeNwk::m_nwkMaxRouters
private

The number of routers any one device is allowed to have as children.

This is determined by the zigbee coordinator for all devices in the network. This value is not used if stochastic address allocation is used. Default value defined in the stack profile. See Zigbee PRO/2007 Layer protocol implementation conformance statement (PICS) and stack profiles (Section 10.4.2.1)

Definition at line 1650 of file zigbee-nwk.h.

Referenced by NotifyConstructionCompleted().

◆ m_nwkNeighborTable

NeighborTable ns3::zigbee::ZigbeeNwk::m_nwkNeighborTable
private

◆ m_nwkNetworkAddress

Mac16Address ns3::zigbee::ZigbeeNwk::m_nwkNetworkAddress
private

The 16-bit address that the device uses to communicate with the PAN.

This attribute reflects the value of the MAC PIB attribute macShortAddress See Zigbee specification r22.1.0, Table 3-58 (NIB attributes)

Definition at line 1677 of file zigbee-nwk.h.

Referenced by GetNetworkAddress(), McpsDataConfirm(), McpsDataIndication(), MlmeAssociateConfirm(), MlmeGetConfirm(), MlmeScanConfirm(), MlmeStartConfirm(), NldeDataRequest(), NlmeRouteDiscoveryRequest(), NotifyConstructionCompleted(), PrintNeighborTable(), PrintRouteDiscoveryTable(), PrintRoutingTable(), PrintRREQRetryTable(), ReceiveRREP(), ReceiveRREQ(), SendDataUcst(), and SendRREP().

◆ m_nwkNetworkBroadcastDeliveryTime

Time ns3::zigbee::ZigbeeNwk::m_nwkNetworkBroadcastDeliveryTime
private

Time duration that a broadcast message needs to encompass the entire network.

Its default value is calculated based on other NIB attributes. See Zigbe Specification r22.1.0, Table 3-58 (NIB attributes)

Definition at line 1774 of file zigbee-nwk.h.

Referenced by McpsDataIndication(), and NotifyConstructionCompleted().

◆ m_nwkPanId

uint16_t ns3::zigbee::ZigbeeNwk::m_nwkPanId
private

This NIB attribute should, at all times, have the same value as macPANId .

See Zigbee specification r22.1.0, Table 3-58 (NIB attributes)

Definition at line 1689 of file zigbee-nwk.h.

Referenced by MlmeAssociateConfirm(), MlmeGetConfirm(), MlmeStartConfirm(), NldeDataRequest(), NotifyConstructionCompleted(), ReceiveRREP(), SendDataBcst(), SendDataUcst(), SendRREP(), and SendRREQ().

◆ m_nwkParentInformation

uint8_t ns3::zigbee::ZigbeeNwk::m_nwkParentInformation
private

The behavior depends upon whether the device is a FFD or RFD.

For RFD, this records the information received in an End device timeout response command indicating the parent information (Table 3-55). For FFD, this records the device's local capabilities. See Zigbee specification r22.1.0, Table 3-58 (NIB attributes)

Definition at line 1699 of file zigbee-nwk.h.

Referenced by NlmeJoinRequest().

◆ m_nwkPassiveAckTimeout

Time ns3::zigbee::ZigbeeNwk::m_nwkPassiveAckTimeout
private

The maximum time duration in milliseconds allowed for the parent all the child devices to retransmit a broadcast message.

See Zigbe Specification r22.1.0, Table 3-58 (NIB attributes)

Definition at line 1767 of file zigbee-nwk.h.

◆ m_nwkReportConstantCost

bool ns3::zigbee::ZigbeeNwk::m_nwkReportConstantCost
private

If false, the NWK layer shall calculate the link cost from all neighbor nodes using the LQI values reported by the MAC layer, otherwise it shall report a constant value (7).

See Zigbe Specification r22.1.0, Table 3-58 (NIB attributes)

Definition at line 1744 of file zigbee-nwk.h.

Referenced by GetLinkCost(), and NotifyConstructionCompleted().

◆ m_nwkRouteDiscoveryTable

RouteDiscoveryTable ns3::zigbee::ZigbeeNwk::m_nwkRouteDiscoveryTable
private

The network route discovery table See Zigbee specification r22.1.0, 3.6.3.2.

Definition at line 1273 of file zigbee-nwk.h.

Referenced by DoDispose(), FindNextHop(), PrintRouteDiscoveryTable(), ProcessManyToOneRoute(), and ReceiveRREP().

◆ m_nwkRoutingTable

RoutingTable ns3::zigbee::ZigbeeNwk::m_nwkRoutingTable
private

The network layer routing table See Zigbee specification r22.1.0, 3.6.3.2.

Definition at line 1267 of file zigbee-nwk.h.

Referenced by DoDispose(), FindNextHop(), FindRoute(), PrintRoutingTable(), ProcessManyToOneRoute(), and ReceiveRREP().

◆ m_nwkSequenceNumber

SequenceNumber8 ns3::zigbee::ZigbeeNwk::m_nwkSequenceNumber
private

The sequence number used to identify outgoing frames See Zigbee specification r22.1.0, Table 3-58 (NIB attributes)

Definition at line 1780 of file zigbee-nwk.h.

Referenced by NldeDataRequest(), NlmeRouteDiscoveryRequest(), NotifyConstructionCompleted(), ReceiveRREQ(), SendDataUcst(), and SendRREP().

◆ m_nwkStackProfile

StackProfile ns3::zigbee::ZigbeeNwk::m_nwkStackProfile
private

Describes the current stack profile used in this NWK layer.

Definition at line 1655 of file zigbee-nwk.h.

Referenced by NotifyConstructionCompleted(), and UpdateBeaconPayloadLength().

◆ m_nwkSymLink

bool ns3::zigbee::ZigbeeNwk::m_nwkSymLink
private

Describes the current route symmetry: True: Routes are considered to be symmetric links.

Backward and forward routes are created during one-route discovery and they are identical. False: Routes are not consider to be comprised of symmetric links. Only the forward route is stored during route discovery. See Zigbe Specification r22.1.0, Table 3-58 (NIB attributes)

Definition at line 1754 of file zigbee-nwk.h.

Referenced by NotifyConstructionCompleted().

◆ m_nwkUseTreeRouting

bool ns3::zigbee::ZigbeeNwk::m_nwkUseTreeRouting
private

This NIB attribute indicates whether the NWK layer should assume the ability to use hierarchical routing.

True = Hierarchical routing False = Never use hierarchical routing See Zigbee specification r22.1.0, Table 3-58 (NIB attributes)

Definition at line 1736 of file zigbee-nwk.h.

Referenced by NotifyConstructionCompleted().

◆ m_panIdTable

PanIdTable ns3::zigbee::ZigbeeNwk::m_panIdTable
private

Use to keep track of neighboring 16 bit PAN id.

This information is used during the Join process (Association).

Definition at line 1261 of file zigbee-nwk.h.

Referenced by DoDispose(), MlmeBeaconNotifyIndication(), and NlmeJoinRequest().

◆ m_pendingTxQueue

std::deque<Ptr<PendingTxPkt> > ns3::zigbee::ZigbeeNwk::m_pendingTxQueue
private

The pending transaction queue of data packets awaiting to be transmitted until a route to the destination becomes available.

Definition at line 1087 of file zigbee-nwk.h.

Referenced by DequeuePendingTx(), DisposePendingTx(), EnqueuePendingTx(), and ReceiveRREP().

◆ m_pendPrimitiveNwk

◆ m_routeExpiryTime

Time ns3::zigbee::ZigbeeNwk::m_routeExpiryTime
private

The expiration time of routing table entry.

This value is not standardized and it is implementation dependent.

Definition at line 1797 of file zigbee-nwk.h.

Referenced by FindNextHop(), NotifyConstructionCompleted(), and ProcessManyToOneRoute().

◆ m_routeRequestId

SequenceNumber8 ns3::zigbee::ZigbeeNwk::m_routeRequestId
private

The counter used to identify route request commands.

Definition at line 1785 of file zigbee-nwk.h.

Referenced by NlmeRouteDiscoveryRequest(), NotifyConstructionCompleted(), ReceiveRREQ(), and SendDataUcst().

◆ m_rreqJitter

Ptr<UniformRandomVariable> ns3::zigbee::ZigbeeNwk::m_rreqJitter
private

Provides uniform random values for the route request jitter.

Definition at line 1527 of file zigbee-nwk.h.

Referenced by NlmeRouteDiscoveryRequest(), NotifyConstructionCompleted(), ReceiveRREQ(), SendDataUcst(), and SendRREQ().

◆ m_rreqRetriesExhaustedTrace

TracedCallback<uint8_t, Mac16Address, uint8_t> ns3::zigbee::ZigbeeNwk::m_rreqRetriesExhaustedTrace
private

A trace source that fires when a node has reached the maximum number of RREQ retries allowed.

The trace provides the RREQ Id, the destination address of the RREQ and the number of the maximum allowed retries from this node.

Definition at line 1126 of file zigbee-nwk.h.

Referenced by GetTypeId(), and SendRREQ().

◆ m_rreqRetryTable

RreqRetryTable ns3::zigbee::ZigbeeNwk::m_rreqRetryTable
private

Keep track of all the route request retries.

Definition at line 1278 of file zigbee-nwk.h.

Referenced by DoDispose(), PrintRREQRetryTable(), ReceiveRREP(), and SendRREQ().

◆ m_scanEnergyThreshold

uint8_t ns3::zigbee::ZigbeeNwk::m_scanEnergyThreshold
private

The maximum acceptable energy level used in an energy scan taking place during a NLME-NETWORK-FORMATION.request.

Definition at line 1237 of file zigbee-nwk.h.

Referenced by MlmeScanConfirm(), and NotifyConstructionCompleted().

◆ m_startRouterParams

NlmeStartRouterRequestParams ns3::zigbee::ZigbeeNwk::m_startRouterParams
private

Temporarily store the NLME-START-ROUTER.request parameters during the router initialization process.

Definition at line 1225 of file zigbee-nwk.h.

Referenced by MlmeGetConfirm(), MlmeSetConfirm(), MlmeStartConfirm(), and NlmeStartRouterRequest().

◆ m_txBuffer

std::deque<Ptr<TxPkt> > ns3::zigbee::ZigbeeNwk::m_txBuffer
private

The transmission buffer.

Copies of DATA packets are stored here for post transmission handling.

Definition at line 1108 of file zigbee-nwk.h.

Referenced by BufferTxPkt(), DisposeTxPktBuffer(), and RetrieveTxPkt().

◆ m_txBufferMaxSize

uint8_t ns3::zigbee::ZigbeeNwk::m_txBufferMaxSize
private

The maximum size of the transmission buffer.

Definition at line 1113 of file zigbee-nwk.h.

Referenced by BufferTxPkt(), and NotifyConstructionCompleted().

◆ m_uniformRandomVariable

Ptr<UniformRandomVariable> ns3::zigbee::ZigbeeNwk::m_uniformRandomVariable
private

Provides uniform random values.

Definition at line 1522 of file zigbee-nwk.h.

Referenced by AllocateNetworkAddress(), AssignStreams(), MlmeScanConfirm(), and NotifyConstructionCompleted().


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