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

Classes

class  BroadcastTransactionRecord
 A broadcast Transaction Record (BTR) As described in Table 3-70. More...
 
class  BroadcastTransactionTable
 The Broadcast Transaction Table (BTT) The BTT is used to keep track of data broadcast transactions. More...
 
class  CapabilityInformation
 Represent the the Capability Information Bit fields See zigbe Specification r22.1.0, Table 3-62. More...
 
struct  ChannelList
 Channel List Structure. More...
 
class  NeighborTable
 The network layer Network Table See Zigbee specification r22.1.0, 3.6.1.5. More...
 
class  NeighborTableEntry
 The Network layer Neighbor Table Entry See Zigbee specification r22.1.0, Table 3-63. More...
 
struct  NetFormPendingParamsGen
 A group of pending parameters arranged into a structure during the execution of a NLME-NETWORK-FORMATION.request primitive. More...
 
struct  NetworkDescriptor
 Network Descriptor, Zigbee Specification r22.1.0, 3.2.2.4, Table 3-12. More...
 
struct  NldeDataConfirmParams
 NLDE-DATA.confirm params. More...
 
struct  NldeDataIndicationParams
 NLDE-DATA.indication params. More...
 
struct  NldeDataRequestParams
 NLDE-DATA.request params. More...
 
struct  NlmeDirectJoinConfirmParams
 NLME-DIRECT-JOIN.confirm params. More...
 
struct  NlmeDirectJoinRequestParams
 NLME-DIRECT-JOIN.request params. More...
 
struct  NlmeJoinConfirmParams
 NLME-JOIN.confirm params. More...
 
struct  NlmeJoinIndicationParams
 NLME-JOIN.indication params. More...
 
struct  NlmeJoinRequestParams
 NLME-JOIN.request params. More...
 
struct  NlmeNetworkDiscoveryConfirmParams
 NLME-NETWORK-DISCOVERY.confirm params. More...
 
struct  NlmeNetworkDiscoveryRequestParams
 NLME-NETWORK-DISCOVERY.request params. More...
 
struct  NlmeNetworkFormationConfirmParams
 NLME-NETWORK-FORMATION.confirm params. More...
 
struct  NlmeNetworkFormationRequestParams
 NLME-NETWORK-FORMATION.request params. More...
 
struct  NlmeRouteDiscoveryConfirmParams
 NLME-ROUTE-DISCOVERY.confirm params. More...
 
struct  NlmeRouteDiscoveryRequestParams
 NLME-ROUTE-DISCOVERY.request params. More...
 
struct  NlmeStartRouterConfirmParams
 NLME-START-ROUTER.confirm params. More...
 
struct  NlmeStartRouterRequestParams
 NLME-START-ROUTER.request params. More...
 
class  PanIdTable
 A table that keeps record of neighbors devices NWK extended PAN ids (64 bits) and their related 16 bit MAC pan id. More...
 
class  RouteDiscoveryTable
 The network layer Route Discovery Table See Zigbee specification r22.1.0, 3.6.3.2. More...
 
class  RouteDiscoveryTableEntry
 The Network layer Route Discovery Table Entry See Zigbee specification r22.1.0, Table 3-68. More...
 
class  RoutingTable
 The network layer Routing Table. More...
 
class  RoutingTableEntry
 Routing table entry Zigbee Specification r22.1.0, Table 3-66. More...
 
class  RreqRetryTable
 A table storing information about upcoming route request retries. More...
 
class  RreqRetryTableEntry
 The route request retry table entry. More...
 
class  SuperframeInformation
 Represent the Superframe Specification information field. More...
 
class  ZigbeeBeaconPayload
 Represents the payload portion of a beacon frame. More...
 
class  ZigbeeNwk
 Class that implements the Zigbee Specification Network Layer. More...
 
class  ZigbeeNwkHeader
 Represent the NWK Header with the Frame Control and Routing fields Zigbee Specification r22.1.0, General NPDU Frame Format (Section 3.3.1) More...
 
class  ZigbeePayloadRouteReplyCommand
 Represent a variable portion of the zigbee payload header that includes the route reply command. More...
 
class  ZigbeePayloadRouteRequestCommand
 Represent a variable portion of the zigbee payload header that includes the route request command. More...
 
class  ZigbeePayloadType
 Represent the static portion of the zigbee payload header that describes the payload command type. More...
 
class  ZigbeeStack
 Zigbee protocol stack to device interface. More...
 
class  ZigbeeStackContainer
 Holds a vector of ns3::ZigbeeStack pointers. More...
 

Typedefs

typedef Callback< void, NldeDataConfirmParamsNldeDataConfirmCallback
 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 > > 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, NlmeDirectJoinConfirmParamsNlmeDirectJoinConfirmCallback
 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, NlmeJoinConfirmParamsNlmeJoinConfirmCallback
 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, NlmeJoinIndicationParamsNlmeJoinIndicationCallback
 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, NlmeNetworkDiscoveryConfirmParamsNlmeNetworkDiscoveryConfirmCallback
 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, NlmeNetworkFormationConfirmParamsNlmeNetworkFormationConfirmCallback
 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, NlmeRouteDiscoveryConfirmParamsNlmeRouteDiscoveryConfirmCallback
 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, NlmeStartRouterConfirmParamsNlmeStartRouterConfirmCallback
 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  AddrAllocMethod { DISTRIBUTED_ALLOC = 0x00 , STOCHASTIC_ALLOC = 0x02 }
 Use to describe the method used to assign addresses in the NWK layer. More...
 
enum  AddressMode { NO_ADDRESS = 0x00 , MCST = 0x01 , UCST_BCST = 0x02 }
 Table 3.2 (Address Mode) NLDE-DATA-Request parameters. More...
 
enum  DiscoverRouteType { SUPPRESS_ROUTE_DISCOVERY = 0x00 , ENABLE_ROUTE_DISCOVERY = 0x01 }
 Zigbee Specification r22.1.0, Values of the discover route sub-field (Table 3-47) More...
 
enum  JoiningMethod { ASSOCIATION = 0x00 , DIRECT_OR_REJOIN = 0x01 , REJOINING = 0x02 , CHANGE_CHANNEL = 0x03 }
 Use to describe the parameter that controls the method of joining the network. More...
 
enum  MacDeviceType { ENDDEVICE = 0 , ROUTER = 1 }
 The device Type Zigbee Specification r22.1.0 (Table 3-62 or Table 3-63) More...
 
enum  ManyToOne { NO_MANY_TO_ONE = 0 , ROUTE_RECORD = 1 , NO_ROUTE_RECORD = 2 }
 Zigbee Specification 3.4.1.3.1 , Table 3-50 Values of the many to one command option field. More...
 
enum  MulticastMode { NONMEMBER = 0 , MEMBER = 1 }
 Zigbee Specification r22.1.0, Multicast Mode Sub-Field (Table 3-7) More...
 
enum  NetworkStatusCode : std::uint8_t {
  NO_ROUTE_AVAILABLE = 0x00 , TREE_LINK_FAILURE = 0x01 , NON_TREE_LINK_FAILURE = 0x02 , LOW_BATTERY = 0x03 ,
  NO_ROUTING_CAPACITY = 0x04 , NO_INDIRECT_CAPACITY = 0x05 , INDIRECT_TRANSACTION_EXPIRY = 0x06 , TARGET_DEVICE_UNAVAILABLE = 0x07 ,
  TARGET_ADDRESS_UNALLOCATED = 0x08 , PARENT_LINK_FAILURE = 0x09 , VALIDATE_ROUTE = 0x0a , SOURCE_ROUTE_FAILURE = 0x0b ,
  MANY_TO_ONE_ROUTE_FAILURE = 0x0c , ADDRESS_CONFLICT = 0x0d , VERIFY_ADDRESS = 0x0e , PAN_IDENTIFIER_UPDATE = 0x0f ,
  NETWORK_ADDRESS_UPDATE = 0x10 , BAD_FRAME_COUNTER = 0x11 , BAD_KEY_SEQUENCE_NUMBER = 0x12 , UNKNOWN_COMMAND = 0x13
}
 Status codes for network status command frame and route discovery failures. More...
 
enum  NwkCommandType {
  ROUTE_REQ_CMD = 0x01 , ROUTE_REP_CMD = 0x02 , NWK_STATUS_CMD = 0X03 , LEAVE_CMD = 0x04 ,
  ROUTE_RECORD_CMD = 0x05 , REJOIN_REQ_CMD = 0x06 , REJOIN_RESP_CMD = 0x07 , LINK_STATUS_CMD = 0x08 ,
  NWK_REPORT_CMD = 0x09 , NWK_UPDATE_CMD = 0x0a , TIMEOUT_REQ_CMD = 0x0b , TIMEOUT_RESP_CMD = 0x0c ,
  LINK_POWER_DELTA_CMD = 0x0d
}
 Zigbee Specification, Payload command types. More...
 
enum  NwkDeviceType { ZIGBEE_COORDINATOR = 0x0 , ZIGBEE_ROUTER = 0x01 , ZIGBEE_ENDDEVICE = 0x02 }
 The network layer device type. More...
 
enum  NwkStatus : std::uint8_t {
  SUCCESS = 0 , FULL_CAPACITY = 0x01 , ACCESS_DENIED = 0x02 , COUNTER_ERROR = 0xdb ,
  IMPROPER_KEY_TYPE = 0xdc , IMPROPER_SECURITY_LEVEL = 0xdd , UNSUPPORTED_LEGACY = 0xde , UNSUPPORTED_SECURITY = 0xdf ,
  BEACON_LOSS = 0xe0 , CHANNEL_ACCESS_FAILURE = 0xe1 , DENIED = 0xe2 , DISABLE_TRX_FAILURE = 0xe3 ,
  SECURITY_ERROR = 0xe4 , FRAME_TOO_LONG = 0xe5 , INVALID_GTS = 0xe6 , INVALID_HANDLE = 0xe7 ,
  INVALID_PARAMETER_MAC = 0xe8 , NO_ACK = 0xe9 , NO_BEACON = 0xea , NO_DATA = 0xeb ,
  NO_SHORT_ADDRESS = 0xec , OUT_OF_CAP = 0xed , PAN_ID_CONFLICT = 0xee , REALIGMENT = 0xef ,
  TRANSACTION_EXPIRED = 0xf0 , TRANSACTION_OVERFLOW = 0xf1 , TX_ACTIVE = 0xf2 , UNAVAILABLE_KEY = 0xf3 ,
  INVALID_ADDRESS = 0xf5 , ON_TIME_TOO_LONG = 0xf6 , PAST_TIME = 0xf7 , TRACKING_OFF = 0xf8 ,
  INVALID_INDEX = 0xf9 , READ_ONLY = 0xfb , SUPERFRAME_OVERLAP = 0xfd , INVALID_PARAMETER = 0xc1 ,
  INVALID_REQUEST = 0xc2 , NOT_PERMITED = 0xc3 , STARTUP_FAILURE = 0xc4 , ALREADY_PRESENT = 0xc5 ,
  SYNC_FAILURE = 0xc6 , NEIGHBOR_TABLE_FULL = 0xc7 , UNKNOWN_DEVICE = 0xc8 , UNSUPPORTED_ATTRIBUTE = 0xc9 ,
  NO_NETWORKS = 0xca , MAX_FRM_COUNTER = 0xcc , NO_KEY = 0xcd , BAD_CCM_OUTPUT = 0xce ,
  ROUTE_DISCOVERY_FAILED = 0xd0 , ROUTE_ERROR = 0xd1 , BT_TABLE_FULL = 0xd2 , FRAME_NOT_BUFFERED = 0xd3 ,
  INVALID_INTERFACE = 0xd5 , LIMIT_REACHED = 0xd6 , 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  NwkType { DATA = 0 , NWK_COMMAND = 1 , INTER_PAN = 3 }
 Zigbee Specification r22.1.0, Values of the frame Type Sub-field (Table 3-46) More...
 
enum  PendingPrimitiveNwk : std::uint8_t {
  NLDE_NLME_NONE = 0 , NLME_NETWORK_FORMATION = 1 , NLME_DIRECT_JOIN = 2 , NLME_JOIN = 3 ,
  NLME_START_ROUTER = 4 , NLME_NET_DISCV = 5 , NLME_JOIN_INDICATION = 6 , NLME_ROUTE_DISCOVERY = 7 ,
  NLDE_DATA = 8
}
 Indicates a pending NWK primitive. More...
 
enum  PowerSource { OTHER_POWER_SOURCE = 0 , MAINPOWER = 1 }
 The power source capabilities. More...
 
enum  Relationship {
  NBR_PARENT = 0x0 , NBR_CHILD = 0x01 , NBR_SIBLING = 0x02 , NBR_NONE = 0x03 ,
  NBR_PREV_CHILD = 0x04 , NBR_UNAUTH_CHILD = 0x05
}
 The relationship between the neighbor and the current device. More...
 
enum  RouteDiscoveryStatus : std::uint8_t {
  ROUTE_FOUND = 0x01 , ROUTE_NOT_FOUND = 0x02 , TABLE_FULL = 0x03 , ROUTE_UPDATED = 0x04 ,
  NO_DISCOVER_ROUTE = 0x05 , DISCOVER_UNDERWAY = 0x06 , MANY_TO_ONE_ROUTE = 0x07 , 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  RouteStatus {
  ROUTE_ACTIVE = 0x0 , ROUTE_DISCOVERY_UNDERWAY = 0x1 , ROUTE_DISCOVER_FAILED = 0x2 , ROUTE_INACTIVE = 0x3 ,
  ROUTE_VALIDATION_UNDERWAY = 0x4
}
 Route record states. More...
 
enum  StackProfile { ZIGBEE = 0x01 , ZIGBEE_PRO = 0x02 }
 Use to describe the identifier of the zigbee stack profile. More...
 

Functions

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

Variables

static constexpr uint32_t ALL_CHANNELS = 0x07FFF800
 Bitmap representing all channels (11~26) LSB b0-b26, b27-b31 MSB Page 0 in Zigbee (250kbps O-QPSK)
 
static const double RequestedTimeoutField [15] {0.166667, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384}
 Requested Timeout Field See Zigbee Specification r22.1.0, 3.4.11.3.1.
 

Enumeration Type Documentation

◆ AddrAllocMethod

Use to describe the method used to assign addresses in the NWK layer.

See Zigbee specification r22.1.0, Table 3-58

Enumerator
DISTRIBUTED_ALLOC 

Distributed address allocation (Zigbee Specification r22.1.0 Section 3.6.1.6)

STOCHASTIC_ALLOC 

Stochastic address allocation (Zigbee Specification r22.1.0 Section 3.6.1.7)

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

◆ DiscoverRouteType

Zigbee Specification r22.1.0, Values of the discover route sub-field (Table 3-47)

Enumerator
SUPPRESS_ROUTE_DISCOVERY 

Suppress route discovery.

ENABLE_ROUTE_DISCOVERY 

Enable route discovery.

Definition at line 37 of file zigbee-nwk-header.h.

◆ JoiningMethod

Use to describe the parameter that controls the method of joining the network.

See Zigbee specification r22.1.0, Table 3-21

Enumerator
ASSOCIATION 

The device is requesting to join a network through association.

DIRECT_OR_REJOIN 

The device is joining directly or rejoining using the orphaning procedure.

REJOINING 

The device is joining the network using the rejoining procedure.

CHANGE_CHANNEL 

The device is to change the operational network channel to that identified in the ScanChannel parameter.

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

◆ ManyToOne

Zigbee Specification 3.4.1.3.1 , Table 3-50 Values of the many to one command option field.

Enumerator
NO_MANY_TO_ONE 
ROUTE_RECORD 
NO_ROUTE_RECORD 

Definition at line 46 of file zigbee-nwk-payload-header.h.

◆ MulticastMode

Zigbee Specification r22.1.0, Multicast Mode Sub-Field (Table 3-7)

Enumerator
NONMEMBER 

Non member multicast mode.

MEMBER 

Member multicast mode.

Definition at line 46 of file zigbee-nwk-header.h.

◆ NwkCommandType

Zigbee Specification, Payload command types.

Enumerator
ROUTE_REQ_CMD 

Route request command.

ROUTE_REP_CMD 

Route response command.

NWK_STATUS_CMD 

Network status command.

LEAVE_CMD 

Leave network command.

ROUTE_RECORD_CMD 

Route record command.

REJOIN_REQ_CMD 

Rejoin request command.

REJOIN_RESP_CMD 

Rejoin response command.

LINK_STATUS_CMD 

Link status command.

NWK_REPORT_CMD 

Network report command.

NWK_UPDATE_CMD 

Network update command.

TIMEOUT_REQ_CMD 

Time out request command.

TIMEOUT_RESP_CMD 

Time out response command.

LINK_POWER_DELTA_CMD 

Link power delta command.

Definition at line 25 of file zigbee-nwk-payload-header.h.

◆ NwkType

Zigbee Specification r22.1.0, Values of the frame Type Sub-field (Table 3-46)

Enumerator
DATA 

Data frame type.

NWK_COMMAND 

Network command frame type.

INTER_PAN 

Inter-Pan frame type.

Definition at line 27 of file zigbee-nwk-header.h.

◆ RouteDiscoveryStatus

enum ns3::zigbee::RouteDiscoveryStatus : std::uint8_t

The status returned while attempting to find the next hop in route towards a specific destination or a many-to-one route request attempt.

Enumerator
ROUTE_FOUND 

The next hop toward the destination was found in our routing table or neighbor table (Mesh route).

ROUTE_NOT_FOUND 

The next hop was not found.

A new entry is is registered in the routing table with DISCOVER_UNDERWAY status(Mesh route).

TABLE_FULL 

Either the routing or neighbor table are full.

ROUTE_UPDATED 

A route was found and updated with a better route (Mesh route or Many-To-One route)

NO_DISCOVER_ROUTE 

We are currently not allowed to perform a route discovery for this route (RouteDiscover flag in network header is false).

DISCOVER_UNDERWAY 

The route was found in the tables but currently has no next hop.

i.e. A previous attempt was already made is currently awaiting for a response (hence the route discover is underway).

MANY_TO_ONE_ROUTE 

A new Many-To-One route was created.

NO_ROUTE_CHANGE 

No route entry was created or updated during a Many-To-One process.

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

◆ StackProfile

Use to describe the identifier of the zigbee stack profile.

Enumerator
ZIGBEE 

Zigbee stack profile 0x01 (a.k.a.

Zigbee 2006, Zigbee 2007, Zigbee)

ZIGBEE_PRO 

Zigbee stack profile 0x02 (Zigbee Pro, also known as r22.1.0, 3.0)

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

Function Documentation

◆ operator<<() [1/3]

◆ operator<<() [2/3]

std::ostream & ns3::zigbee::operator<< ( std::ostream & os,
const std::vector< uint8_t > & vec )

Overloaded operator to print uint8_t vectors.

Parameters
osThe output stream
vecThe uint8_t vector to print
Returns
The output stream with the text value of the uint8_t vector members

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

◆ operator<<() [3/3]

std::ostream & ns3::zigbee::operator<< ( std::ostream & os,
const uint8_t & num )
Parameters
osThe output stream
numThe uint8_t number to print
Returns
The output stream with the text value of the uint8_t number

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

Variable Documentation

◆ ALL_CHANNELS

uint32_t ns3::zigbee::ALL_CHANNELS = 0x07FFF800
staticconstexpr

Bitmap representing all channels (11~26) LSB b0-b26, b27-b31 MSB Page 0 in Zigbee (250kbps O-QPSK)

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

Referenced by ZigbeeRreqRetryTestCase::DoRun().