nRF5 SDK for Thread and Zigbee v1.0.0
Data Structures | Macros | Typedefs | Enumerations

Data Structures

struct  zb_nwk_route_discovery_s
 
struct  zb_nwk_pend_s
 
struct  zb_secur_material_set_t
 
struct  zb_tx_stat_window_s
 
struct  zb_nib_s
 

Macros

#define ZB_NIB_SEQUENCE_NUMBER()   ZB_NIB().sequence_number
 return NWK sequence number used to identify outgoing frames
 
#define ZB_NIB_SEQUENCE_NUMBER_INC()   (ZB_NIB().sequence_number++)
 increment NWK sequence number used to identify outgoing frames
 
#define ZB_NIB_MAX_DEPTH()   ZB_NIB().max_depth
 Maximum network depth a device can have.
 
#define ZB_NIB_DEPTH()   ZB_NIB().depth
 Device network depth.
 
#define ZB_IS_DEVICE_ZC()   0
 returns true if device is Coordinator
 
#define ZB_IS_DEVICE_ZR()   0
 returns true if device is Router
 
#define ZB_IS_DEVICE_ZED()   1
 returns true if device is End Device
 
#define ZB_IS_DEVICE_ZC_OR_ZR()   0
 returns true if device is Coordinator or Router
 
#define ZB_IS_DEVICE_NOT_ZR()   1
 returns true if device is not Router
 
#define ZB_SUBGHZ_SWITCH_MODE()   0
 
#define ZB_SET_SUBGHZ_SWITCH_MODE(mode)
 
#define ZB_NIB_DEVICE_TYPE()   ZB_NIB().device_type
 logical device type, see zb_nwk_device_type_e
 
#define ZB_NIB_EXT_PAN_ID()   ZB_NIB().extended_pan_id
 Device extended PAN ID.
 
#define ZB_NIB_UPDATE_ID()   ZB_NIB().update_id
 The value of ZB_NIB_ATTRIBUTE_UPDATE_ID attribute.
 
#define ZB_NIB_SECURITY_LEVEL()   ZB_NIB().security_level
 Device security level; by default is 5.
 
#define ZB_SET_NIB_SECURITY_LEVEL(v)   ZB_NIB().security_level = (v)
 Set Device security level to value 'v'.
 
#define ZB_NIB_GET_USE_TREE_ROUTING()   0
 Use tree routing - unsupported.
 
#define ZB_NIB_SET_USE_TREE_ROUTING(v)
 
#define ZB_NIB_GET_USE_MULTICAST()   ZB_NIB().nwk_use_multicast
 returns ZB_NIB_GET_USE_MULTICAST attribute value
 
#define ZB_NIB_SET_USE_MULTICAST(v)   (ZB_NIB().nwk_use_multicast = ( v ))
 Set ZB_NIB_SET_USE_MULTICAST attribute value to 'v'.
 
#define ZB_NIB_GET_LINK_STATUS_PERIOD()   ZB_NIB().link_status_period
 LINK_STATUS_PERIOD attribute.
 
#define ZB_NIB_GET_ROUTER_AGE_LIMIT()   ZB_NIB().router_age_limit
 ROUTER_AGE_LIMIT attribute.
 
#define ZB_NIB_GET_LEAVE_REQ_ALLOWED()   ZB_TRUE
 LEAVE_REQ_ALLOWED - always true.
 
#define ZB_NIB_SET_LEAVE_REQ_ALLOWED(v)
 
#define ZB_NIB_GET_LEAVE_REQ_WITHOUT_REJOIN_ALLOWED()   ZB_TRUE
 LEAVE_REQ_WITHOUT_REJOIN_ALLOWED - always true.
 
#define ZB_NIB_SET_LEAVE_REQ_WITHOUT_REJOIN_ALLOWED(v)
 
#define ZB_NIB_SECURITY_MATERIAL()   ZB_NIB().secur_material_set
 SECURITY_MATERIAL attribute.
 
#define ZB_NIB_NWK_MANAGER_ADDR()   ZB_NIB().nwk_manager_addr
 NWK_MANAGER_ADDR attribute.
 
#define ZB_NIB_NWK_TX_TOTAL()   (ZB_NIB().tx_stat.tx_total + 0)
 total number of transmissions made by NWK
 
#define ZB_NIB_NWK_TX_FAIL()   (ZB_NIB().tx_stat.tx_fail + 0)
 number of transmissions failed by NWK
 
#define ZB_TX_STAT_WINDOW_SIZE   (ZB_TX_TOTAL_THRESHOLD + 1)
 

Typedefs

typedef enum zb_nib_attribute_e zb_nib_attribute_t
 
typedef struct
zb_nwk_route_discovery_s 
zb_nwk_route_discovery_t
 
typedef struct zb_nwk_pend_s zb_nwk_pend_t
 
typedef struct
zb_secur_material_set_t 
zb_secur_material_set_t
 
typedef struct zb_tx_stat_window_s zb_tx_stat_window_t
 
typedef struct zb_nib_s zb_nib_t
 

Enumerations

enum  zb_nib_attribute_e {
  ZB_NIB_ATTRIBUTE_SEQUENCE_NUMBER = 0X81, ZB_NIB_ATTRIBUTE_PASSIVE_ASK_TIMEOUT = 0X82, ZB_NIB_ATTRIBUTE_MAX_BROADCAST_RETRIES = 0X83, ZB_NIB_ATTRIBUTE_MAX_CHILDREN = 0X84,
  ZB_NIB_ATTRIBUTE_MAX_DEPTH = 0X85, ZB_NIB_ATTRIBUTE_MAX_ROUTERS = 0X86, ZB_NIB_ATTRIBUTE_NEIGHBOR_TABLE = 0X87, ZB_NIB_ATTRIBUTE_BROADCAST_DELIVERY_TIME = 0X88,
  ZB_NIB_ATTRIBUTE_REPORT_CONSTANT_COST = 0X89, ZB_NIB_ATTRIBUTE_ROUTE_DISCOVERY_RETRIES_PERMITTED = 0X8A, ZB_NIB_ATTRIBUTE_ROUTE_TABLE = 0X8B, ZB_NIB_ATTRIBUTE_SYM_LINK = 0X8E,
  ZB_NIB_ATTRIBUTE_CAPABILITY_INFORMATION = 0X8F, ZB_NIB_ATTRIBUTE_ADDR_ALLOC = 0X90, ZB_NIB_ATTRIBUTE_USE_TREE_ROUTING = 0X91, ZB_NIB_ATTRIBUTE_MANAGER_ADDR = 0X92,
  ZB_NIB_ATTRIBUTE_MAX_SOURCE_ROUTE = 0X93, ZB_NIB_ATTRIBUTE_UPDATE_ID = 0X94, ZB_NIB_ATTRIBUTE_TRANSACTION_PERSISTENCE_TIME = 0X95, ZB_NIB_ATTRIBUTE_NETWORK_ADDRESS = 0X96,
  ZB_NIB_ATTRIBUTE_STACK_PROFILE = 0X97, ZB_NIB_ATTRIBUTE_BROADCAST_TRANSACTION_TABLE = 0X98, ZB_NIB_ATTRIBUTE_GROUP_ID_TABLE = 0X99, ZB_NIB_ATTRIBUTE_EXTENDED_PANID = 0X9A,
  ZB_NIB_ATTRIBUTE_USE_MULTICAST = 0X9B, ZB_NIB_ATTRIBUTE_ROUTE_RECORD_TABLE = 0X9C, ZB_NIB_ATTRIBUTE_IS_CONCENTRATOR = 0X9D, ZB_NIB_ATTRIBUTE_CONCENTRATOR_RADIUS = 0X9E,
  ZB_NIB_ATTRIBUTE_CONCENTRATOR_DESCOVERY_TIME = 0X9F, ZB_NIB_ATTRIBUTE_SECURITY_LEVEL = 0XA0, ZB_NIB_ATTRIBUTE_SECURITY_MATERIAL_SET = 0XA1, ZB_NIB_ATTRIBUTE_ACTIVE_KEY_SEQ_NUMBER = 0XA2,
  ZB_NIB_ATTRIBUTE_ALL_FRESH = 0XA3, ZB_NIB_ATTRIBUTE_SECURE_ALL_FRAMES = 0XA5, ZB_NIB_ATTRIBUTE_LINK_STATUS_PERIOD = 0XA6, ZB_NIB_ATTRIBUTE_ROUTER_AGE_LIMIT = 0XA7,
  ZB_NIB_ATTRIBUTE_UNIQUE_ADDR = 0XA8, ZB_NIB_ATTRIBUTE_ADDRESS_MAP = 0XA9, ZB_NIB_ATTRIBUTE_TIME_STAMP = 0X8C, ZB_NIB_ATTRIBUTE_PAN_ID = 0X80,
  ZB_NIB_ATTRIBUTE_TX_TOTAL = 0X8D, ZB_NIB_ATTRIBUTE_LEAVE_REQ_ALLOWED = 0xAA
}
 

Detailed Description

NWK NIB
Some NIB fields are indeed PIB fields. Use macros to access it.

Macro Definition Documentation

#define ZB_NIB_SET_LEAVE_REQ_ALLOWED (   v)
#define ZB_NIB_SET_LEAVE_REQ_WITHOUT_REJOIN_ALLOWED (   v)
#define ZB_NIB_SET_USE_TREE_ROUTING (   v)
#define ZB_SUBGHZ_SWITCH_MODE ( )    0

Check that we at ZC working in Switch mode (routing between 2.4 and sub-ghz).

Currently Switch is not implemented, so always return 0.

#define ZB_TX_STAT_WINDOW_SIZE   (ZB_TX_TOTAL_THRESHOLD + 1)

TX counters window size.

Typedef Documentation

NWK NIB Attributes

typedef struct zb_nib_s zb_nib_t

This is NWK NIB residental in memory. It is not clear yet when it will be save to nvram and when read.

typedef struct zb_nwk_pend_s zb_nwk_pend_t

NWK pending list element

NWK route discovery

Part of the secured material stored in array.

Other secured material components stored elsewhere: OutgoingFrameCounter - NIB IncomingFrameCounterSet - neighbor table

Data structure for TX statistics

Enumeration Type Documentation

NWK NIB Attributes

Enumerator
ZB_NIB_ATTRIBUTE_SEQUENCE_NUMBER 

A sequence number used to identify outgoing frames.

ZB_NIB_ATTRIBUTE_PASSIVE_ASK_TIMEOUT 

The maximum time duration in OctetDurations allowed for the parent and all child devices to retransmit a broadcast message (passive acknowledgment timeout).

ZB_NIB_ATTRIBUTE_MAX_BROADCAST_RETRIES 

The maximum number of retries allowed after a broadcast transmission failure.

ZB_NIB_ATTRIBUTE_MAX_CHILDREN 

The number of children a device is allowed to have on its current network. Note that when nwkAddrAlloc has a value of 0x02, indicating stochastic addressing, the value of this attribute is implementation-dependent.

ZB_NIB_ATTRIBUTE_MAX_DEPTH 

The depth a device can have.

ZB_NIB_ATTRIBUTE_MAX_ROUTERS 

The number of routers any one device is allowed to have as children. This value is determined by the ZigBee coordinator for all devices in the network. If nwkAddrAlloc is 0x02 this value not used.

ZB_NIB_ATTRIBUTE_NEIGHBOR_TABLE 

The current set of neighbor table entries in the device.

ZB_NIB_ATTRIBUTE_BROADCAST_DELIVERY_TIME 

Time duration in OctetDurations that a broadcast message needs to encompass the entire network. This is a calculated quantity based on other NIB attributes.

ZB_NIB_ATTRIBUTE_REPORT_CONSTANT_COST 

If this is set to 0, the NWK layer shall calculate link cost from all neighbor nodes using the LQI values reported by the MAC layer; other-wise, it shall report a constant value.

ZB_NIB_ATTRIBUTE_ROUTE_DISCOVERY_RETRIES_PERMITTED 

Reserved.

ZB_NIB_ATTRIBUTE_ROUTE_TABLE 

The current set of routing table entries in the device.

ZB_NIB_ATTRIBUTE_SYM_LINK 

The current route symmetry setting:

  • TRUE means that routes are considered to be comprised of symmetric links. Backward and forward routes are created during one-route discovery and they are identical.
  • FALSE indicates that routes are not consider to be comprised of symmetric links. Only the forward route is stored during route discovery.
ZB_NIB_ATTRIBUTE_CAPABILITY_INFORMATION 

This field shall contain the device capability information established at network joining time.

ZB_NIB_ATTRIBUTE_ADDR_ALLOC 

A value that determines the method used to assign addresses:

  • 0x00 = use distributed address allocation
  • 0x01 = reserved
  • 0x02 = use stochastic address allocation
ZB_NIB_ATTRIBUTE_USE_TREE_ROUTING 

A flag that determines whether the NWK layer should assume the ability to use hierarchical routing:

  • TRUE = assume the ability to use hierarchical routing.
  • FALSE = never use hierarchical routing.
ZB_NIB_ATTRIBUTE_MANAGER_ADDR 

The address of the designated network channel manager function.

ZB_NIB_ATTRIBUTE_MAX_SOURCE_ROUTE 

The maximum number of hops in a source route.

ZB_NIB_ATTRIBUTE_UPDATE_ID 

The value identifying a snapshot of the network settings with which this node is operating with.

ZB_NIB_ATTRIBUTE_TRANSACTION_PERSISTENCE_TIME 

The maximum time (in superframe periods) that a transaction is stored by a coordinator and indicated in its beacon. This attribute reflects the value of the MAC PIB attribute macTransaction-PersistenceTime and any changes made by the higher layer will be reflected in the MAC PIB attribute value as well.

ZB_NIB_ATTRIBUTE_NETWORK_ADDRESS 

The 16-bit address that the device uses to communicate with the PAN. This attribute reflects the value of the MAC PIB attribute macShortAddress and any changes made by the higher layer will be reflected in the MAC PIB attribute value as well.

ZB_NIB_ATTRIBUTE_STACK_PROFILE 

The identifier of the ZigBee stack profile in use for this device.

ZB_NIB_ATTRIBUTE_BROADCAST_TRANSACTION_TABLE 

The current set of broadcast transaction table entries in the device.

ZB_NIB_ATTRIBUTE_GROUP_ID_TABLE 

The set of group identifiers, in the range 0x0000 - 0xffff, for groups of which this device is a member.

ZB_NIB_ATTRIBUTE_EXTENDED_PANID 

The Extended PAN Identifier for the PAN of which the device is a member. The value 0x0000000000000000 means the Extended PAN Identifier is unknown.

ZB_NIB_ATTRIBUTE_USE_MULTICAST 

A flag determining the layer where multicast messaging occurs.

  • TRUE = multicast occurs at the network layer.
  • FALSE= multicast oc-curs at the APS layer and using the APS header.
ZB_NIB_ATTRIBUTE_ROUTE_RECORD_TABLE 

The route record table.

ZB_NIB_ATTRIBUTE_IS_CONCENTRATOR 

A flag determining if this device is a concentrator.

  • TRUE = Device is a concentrator.
  • FALSE = Device is not a concentrator.
ZB_NIB_ATTRIBUTE_CONCENTRATOR_RADIUS 

The hop count radius for concentrator route dis-coveries.

ZB_NIB_ATTRIBUTE_CONCENTRATOR_DESCOVERY_TIME 

The time in seconds between concentrator route discoveries. If set to 0x0000, the discoveries are done at start up and by the next higher layer only.

ZB_NIB_ATTRIBUTE_SECURITY_LEVEL 

Security attribute defined in Chapter 4.

See Also
ZB R21 specification.
ZB_NIB_ATTRIBUTE_SECURITY_MATERIAL_SET 

Security attribute defined in Chapter 4.

See Also
ZB R21 specification.
ZB_NIB_ATTRIBUTE_ACTIVE_KEY_SEQ_NUMBER 

Security attribute defined in Chapter 4.

See Also
ZB R21 specification.
ZB_NIB_ATTRIBUTE_ALL_FRESH 

Security attribute defined in Chapter 4.

See Also
ZB R21 specification.
ZB_NIB_ATTRIBUTE_SECURE_ALL_FRAMES 

Not used.

ZB_NIB_ATTRIBUTE_LINK_STATUS_PERIOD 

The time in seconds between link status command frames.

ZB_NIB_ATTRIBUTE_ROUTER_AGE_LIMIT 

The number of missed link status command frames before resetting the link costs to zero.

ZB_NIB_ATTRIBUTE_UNIQUE_ADDR 

A flag that determines whether the NWK layer should detect and correct conflicting addresses:

  • TRUE = assume ad-dresses are unique.
  • FALSE = addresses may not be unique.
ZB_NIB_ATTRIBUTE_ADDRESS_MAP 

The current set of 64-bit IEEE to 16-bit network address map.

ZB_NIB_ATTRIBUTE_TIME_STAMP 

A flag that determines if a time stamp indication is provided on incoming and outgoing packets.

  • TRUE= time indication provided.
  • FALSE = no time indication provided.
ZB_NIB_ATTRIBUTE_PAN_ID 

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

ZB_NIB_ATTRIBUTE_TX_TOTAL 

A count of unicast transmissions made by the NWK layer on this device. Each time the NWK layer transmits a unicast frame, by invoking the MCPS-DATA.request primitive of the MAC sub-layer, it shall increment this counter. When either the NHL performs an NLME-SET.request on this attribute or if the value of nwkTxTotal rolls over past 0xffff the NWK layer shall reset to 0x00 each Transmit Failure field contained in the neighbor table.

ZB_NIB_ATTRIBUTE_LEAVE_REQ_ALLOWED 

This policy determines whether or not a remote NWK leave request command frame received by the local device is accepted.


Documentation feedback | Developer Zone | Subscribe | Updated