A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
zigbee-nwk.h File Reference
#include "zigbee-nwk-fields.h"
#include "zigbee-nwk-header.h"
#include "zigbee-nwk-payload-header.h"
#include "zigbee-nwk-tables.h"
#include "ns3/event-id.h"
#include "ns3/lr-wpan-mac-base.h"
#include "ns3/mac16-address.h"
#include "ns3/mac64-address.h"
#include "ns3/object.h"
#include "ns3/random-variable-stream.h"
#include "ns3/sequence-number.h"
#include "ns3/traced-callback.h"
#include "ns3/traced-value.h"
#include <cstdint>
#include <iomanip>
#include <iterator>
+ Include dependency graph for zigbee-nwk.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ns3::zigbee::ChannelList
 Channel List Structure. More...
 
struct  ns3::zigbee::NetFormPendingParamsGen
 A group of pending parameters arranged into a structure during the execution of a NLME-NETWORK-FORMATION.request primitive. More...
 
struct  ns3::zigbee::NetworkDescriptor
 Network Descriptor, Zigbee Specification r22.1.0, 3.2.2.4, Table 3-12. More...
 
struct  ns3::zigbee::NldeDataConfirmParams
 NLDE-DATA.confirm params. More...
 
struct  ns3::zigbee::NldeDataIndicationParams
 NLDE-DATA.indication params. More...
 
struct  ns3::zigbee::NldeDataRequestParams
 NLDE-DATA.request params. More...
 
struct  ns3::zigbee::NlmeDirectJoinConfirmParams
 NLME-DIRECT-JOIN.confirm params. More...
 
struct  ns3::zigbee::NlmeDirectJoinRequestParams
 NLME-DIRECT-JOIN.request params. More...
 
struct  ns3::zigbee::NlmeJoinConfirmParams
 NLME-JOIN.confirm params. More...
 
struct  ns3::zigbee::NlmeJoinIndicationParams
 NLME-JOIN.indication params. More...
 
struct  ns3::zigbee::NlmeJoinRequestParams
 NLME-JOIN.request params. More...
 
struct  ns3::zigbee::NlmeNetworkDiscoveryConfirmParams
 NLME-NETWORK-DISCOVERY.confirm params. More...
 
struct  ns3::zigbee::NlmeNetworkDiscoveryRequestParams
 NLME-NETWORK-DISCOVERY.request params. More...
 
struct  ns3::zigbee::NlmeNetworkFormationConfirmParams
 NLME-NETWORK-FORMATION.confirm params. More...
 
struct  ns3::zigbee::NlmeNetworkFormationRequestParams
 NLME-NETWORK-FORMATION.request params. More...
 
struct  ns3::zigbee::NlmeRouteDiscoveryConfirmParams
 NLME-ROUTE-DISCOVERY.confirm params. More...
 
struct  ns3::zigbee::NlmeRouteDiscoveryRequestParams
 NLME-ROUTE-DISCOVERY.request params. More...
 
struct  ns3::zigbee::NlmeStartRouterConfirmParams
 NLME-START-ROUTER.confirm params. More...
 
struct  ns3::zigbee::NlmeStartRouterRequestParams
 NLME-START-ROUTER.request params. More...
 
struct  ns3::zigbee::ZigbeeNwk::PendingTxPkt
 Structure representing an element in the pending transaction queue. More...
 
struct  ns3::zigbee::ZigbeeNwk::TxPkt
 Structure representing an element in the Tx Buffer. More...
 
class  ns3::zigbee::ZigbeeNwk
 Class that implements the Zigbee Specification Network Layer. More...
 

Namespaces

namespace  ns3
 Every class exported by the ns3 library is enclosed in the ns3 namespace.
 
namespace  ns3::zigbee
 

Typedefs

typedef Callback< void, NldeDataConfirmParamsns3::zigbee::NldeDataConfirmCallback
 This callback is used to notify the next higher layer with a confirmation in response to a previously issued NLDE-DATA.request.
 
typedef Callback< void, NldeDataIndicationParams, Ptr< Packet > > ns3::zigbee::NldeDataIndicationCallback
 This callback is called after a NSDU has successfully received and NWK push it to deliver it to the next higher layer.
 
typedef Callback< void, NlmeDirectJoinConfirmParamsns3::zigbee::NlmeDirectJoinConfirmCallback
 This callback is used to notify the next higher layer with a confirmation in response to a previously issued NLME-DIRECT-JOIN.request.
 
typedef Callback< void, NlmeJoinConfirmParamsns3::zigbee::NlmeJoinConfirmCallback
 This callback is used to notify the next higher layer with a confirmation in response to a previously issued NLME-JOIN.request.
 
typedef Callback< void, NlmeJoinIndicationParamsns3::zigbee::NlmeJoinIndicationCallback
 This callback is used to notify the next higher layer with an indication that a new device has successfully joined its network by association or rejoining.
 
typedef Callback< void, NlmeNetworkDiscoveryConfirmParamsns3::zigbee::NlmeNetworkDiscoveryConfirmCallback
 This callback is used to notify the next higher layer with a confirmation in response to a previously issued NLME-NETWORK-DISCOVERY.request.
 
typedef Callback< void, NlmeNetworkFormationConfirmParamsns3::zigbee::NlmeNetworkFormationConfirmCallback
 This callback is used to notify the next higher layer with a confirmation in response to a previously issued NLME-NETWORK-FORMATION.request.
 
typedef Callback< void, NlmeRouteDiscoveryConfirmParamsns3::zigbee::NlmeRouteDiscoveryConfirmCallback
 This callback is used to notify the next higher layer with a confirmation in response to a previously issued NLME-ROUTE-DISCOVERY.request.
 
typedef Callback< void, NlmeStartRouterConfirmParamsns3::zigbee::NlmeStartRouterConfirmCallback
 This callback is used to notify the next higher layer with a confirmation in response to a previously issued NLME-START-ROUTER.request.
 

Enumerations

enum  ns3::zigbee::AddrAllocMethod { ns3::zigbee::DISTRIBUTED_ALLOC = 0x00 , ns3::zigbee::STOCHASTIC_ALLOC = 0x02 }
 Use to describe the method used to assign addresses in the NWK layer. More...
 
enum  ns3::zigbee::AddressMode { ns3::zigbee::NO_ADDRESS = 0x00 , ns3::zigbee::MCST = 0x01 , ns3::zigbee::UCST_BCST = 0x02 }
 Table 3.2 (Address Mode) NLDE-DATA-Request parameters. More...
 
enum  ns3::zigbee::JoiningMethod { ns3::zigbee::ASSOCIATION = 0x00 , ns3::zigbee::DIRECT_OR_REJOIN = 0x01 , ns3::zigbee::REJOINING = 0x02 , ns3::zigbee::CHANGE_CHANNEL = 0x03 }
 Use to describe the parameter that controls the method of joining the network. More...
 
enum  ns3::zigbee::NetworkStatusCode : std::uint8_t {
  ns3::zigbee::NO_ROUTE_AVAILABLE = 0x00 , ns3::zigbee::TREE_LINK_FAILURE = 0x01 , ns3::zigbee::NON_TREE_LINK_FAILURE = 0x02 , ns3::zigbee::LOW_BATTERY = 0x03 ,
  ns3::zigbee::NO_ROUTING_CAPACITY = 0x04 , ns3::zigbee::NO_INDIRECT_CAPACITY = 0x05 , ns3::zigbee::INDIRECT_TRANSACTION_EXPIRY = 0x06 , ns3::zigbee::TARGET_DEVICE_UNAVAILABLE = 0x07 ,
  ns3::zigbee::TARGET_ADDRESS_UNALLOCATED = 0x08 , ns3::zigbee::PARENT_LINK_FAILURE = 0x09 , ns3::zigbee::VALIDATE_ROUTE = 0x0a , ns3::zigbee::SOURCE_ROUTE_FAILURE = 0x0b ,
  ns3::zigbee::MANY_TO_ONE_ROUTE_FAILURE = 0x0c , ns3::zigbee::ADDRESS_CONFLICT = 0x0d , ns3::zigbee::VERIFY_ADDRESS = 0x0e , ns3::zigbee::PAN_IDENTIFIER_UPDATE = 0x0f ,
  ns3::zigbee::NETWORK_ADDRESS_UPDATE = 0x10 , ns3::zigbee::BAD_FRAME_COUNTER = 0x11 , ns3::zigbee::BAD_KEY_SEQUENCE_NUMBER = 0x12 , ns3::zigbee::UNKNOWN_COMMAND = 0x13
}
 Status codes for network status command frame and route discovery failures. More...
 
enum  ns3::zigbee::NwkStatus : std::uint8_t {
  ns3::zigbee::SUCCESS = 0 , ns3::zigbee::FULL_CAPACITY = 0x01 , ns3::zigbee::ACCESS_DENIED = 0x02 , ns3::zigbee::COUNTER_ERROR = 0xdb ,
  ns3::zigbee::IMPROPER_KEY_TYPE = 0xdc , ns3::zigbee::IMPROPER_SECURITY_LEVEL = 0xdd , ns3::zigbee::UNSUPPORTED_LEGACY = 0xde , ns3::zigbee::UNSUPPORTED_SECURITY = 0xdf ,
  ns3::zigbee::BEACON_LOSS = 0xe0 , ns3::zigbee::CHANNEL_ACCESS_FAILURE = 0xe1 , ns3::zigbee::DENIED = 0xe2 , ns3::zigbee::DISABLE_TRX_FAILURE = 0xe3 ,
  ns3::zigbee::SECURITY_ERROR = 0xe4 , ns3::zigbee::FRAME_TOO_LONG = 0xe5 , ns3::zigbee::INVALID_GTS = 0xe6 , ns3::zigbee::INVALID_HANDLE = 0xe7 ,
  ns3::zigbee::INVALID_PARAMETER_MAC = 0xe8 , ns3::zigbee::NO_ACK = 0xe9 , ns3::zigbee::NO_BEACON = 0xea , ns3::zigbee::NO_DATA = 0xeb ,
  ns3::zigbee::NO_SHORT_ADDRESS = 0xec , ns3::zigbee::OUT_OF_CAP = 0xed , ns3::zigbee::PAN_ID_CONFLICT = 0xee , ns3::zigbee::REALIGMENT = 0xef ,
  ns3::zigbee::TRANSACTION_EXPIRED = 0xf0 , ns3::zigbee::TRANSACTION_OVERFLOW = 0xf1 , ns3::zigbee::TX_ACTIVE = 0xf2 , ns3::zigbee::UNAVAILABLE_KEY = 0xf3 ,
  ns3::zigbee::INVALID_ADDRESS = 0xf5 , ns3::zigbee::ON_TIME_TOO_LONG = 0xf6 , ns3::zigbee::PAST_TIME = 0xf7 , ns3::zigbee::TRACKING_OFF = 0xf8 ,
  ns3::zigbee::INVALID_INDEX = 0xf9 , ns3::zigbee::READ_ONLY = 0xfb , ns3::zigbee::SUPERFRAME_OVERLAP = 0xfd , ns3::zigbee::INVALID_PARAMETER = 0xc1 ,
  ns3::zigbee::INVALID_REQUEST = 0xc2 , ns3::zigbee::NOT_PERMITED = 0xc3 , ns3::zigbee::STARTUP_FAILURE = 0xc4 , ns3::zigbee::ALREADY_PRESENT = 0xc5 ,
  ns3::zigbee::SYNC_FAILURE = 0xc6 , ns3::zigbee::NEIGHBOR_TABLE_FULL = 0xc7 , ns3::zigbee::UNKNOWN_DEVICE = 0xc8 , ns3::zigbee::UNSUPPORTED_ATTRIBUTE = 0xc9 ,
  ns3::zigbee::NO_NETWORKS = 0xca , ns3::zigbee::MAX_FRM_COUNTER = 0xcc , ns3::zigbee::NO_KEY = 0xcd , ns3::zigbee::BAD_CCM_OUTPUT = 0xce ,
  ns3::zigbee::ROUTE_DISCOVERY_FAILED = 0xd0 , ns3::zigbee::ROUTE_ERROR = 0xd1 , ns3::zigbee::BT_TABLE_FULL = 0xd2 , ns3::zigbee::FRAME_NOT_BUFFERED = 0xd3 ,
  ns3::zigbee::INVALID_INTERFACE = 0xd5 , ns3::zigbee::LIMIT_REACHED = 0xd6 , ns3::zigbee::SCAN_IN_PROGRESS = 0xd7
}
 Network layer status values Combines Zigbee Specification r22.1.0 Table 3-73 and and IEEE 802.15.4-2006 Table 78. More...
 
enum  ns3::zigbee::PendingPrimitiveNwk : std::uint8_t {
  ns3::zigbee::NLDE_NLME_NONE = 0 , ns3::zigbee::NLME_NETWORK_FORMATION = 1 , ns3::zigbee::NLME_DIRECT_JOIN = 2 , ns3::zigbee::NLME_JOIN = 3 ,
  ns3::zigbee::NLME_START_ROUTER = 4 , ns3::zigbee::NLME_NET_DISCV = 5 , ns3::zigbee::NLME_JOIN_INDICATION = 6 , ns3::zigbee::NLME_ROUTE_DISCOVERY = 7 ,
  ns3::zigbee::NLDE_DATA = 8
}
 Indicates a pending NWK primitive. More...
 
enum  ns3::zigbee::RouteDiscoveryStatus : std::uint8_t {
  ns3::zigbee::ROUTE_FOUND = 0x01 , ns3::zigbee::ROUTE_NOT_FOUND = 0x02 , ns3::zigbee::TABLE_FULL = 0x03 , ns3::zigbee::ROUTE_UPDATED = 0x04 ,
  ns3::zigbee::NO_DISCOVER_ROUTE = 0x05 , ns3::zigbee::DISCOVER_UNDERWAY = 0x06 , ns3::zigbee::MANY_TO_ONE_ROUTE = 0x07 , ns3::zigbee::NO_ROUTE_CHANGE = 0x08
}
 The status returned while attempting to find the next hop in route towards a specific destination or a many-to-one route request attempt. More...
 
enum  ns3::zigbee::StackProfile { ns3::zigbee::ZIGBEE = 0x01 , ns3::zigbee::ZIGBEE_PRO = 0x02 }
 Use to describe the identifier of the zigbee stack profile. More...
 

Functions

std::ostream & ns3::zigbee::operator<< (std::ostream &os, const NwkStatus &state)
 Overloaded operator to print the value of a NwkStatus.
 
std::ostream & ns3::zigbee::operator<< (std::ostream &os, const std::vector< uint8_t > &vec)
 Overloaded operator to print uint8_t vectors.
 
std::ostream & ns3::zigbee::operator<< (std::ostream &os, const uint8_t &num)
 

Variables

static constexpr uint32_t ns3::zigbee::ALL_CHANNELS = 0x07FFF800
 Bitmap representing all channels (11~26) LSB b0-b26, b27-b31 MSB Page 0 in Zigbee (250kbps O-QPSK)