nRF5 SDK for Thread and Zigbee v1.0.0
Modules | Data Structures
NWK functions visible to applications

Modules

 NWK Informational Base
 
 NWK address and address translation table
 

Data Structures

struct  zb_nwk_pib_cache_s
 

NWK common constants and API.

enum  zb_nwk_broadcast_address_e {
  ZB_NWK_BROADCAST_ALL_DEVICES = 0xFFFF, ZB_NWK_BROADCAST_RX_ON_WHEN_IDLE = 0xFFFD, ZB_NWK_BROADCAST_ROUTER_COORDINATOR = 0xFFFC, ZB_NWK_BROADCAST_LOW_POWER_ROUTER = 0xFFFB,
  ZB_NWK_BROADCAST_RESERVED = 0xFFF8
}
 Network broadcast addresses types. More...
 
enum  zb_nwk_device_type_e { ZB_NWK_DEVICE_TYPE_COORDINATOR, ZB_NWK_DEVICE_TYPE_ROUTER, ZB_NWK_DEVICE_TYPE_ED, ZB_NWK_DEVICE_TYPE_NONE }
 
enum  zb_nwk_leave_type_e { ZB_NWK_LEAVE_TYPE_RESET = 0x00, ZB_NWK_LEAVE_TYPE_REJOIN = 0x01 }
 Leave types. More...
 
typedef enum
zb_nwk_broadcast_address_e 
zb_nwk_broadcast_address_t
 Network broadcast addresses types.
 
typedef enum zb_nwk_device_type_e zb_nwk_device_type_t
 
typedef enum zb_nwk_leave_type_e zb_nwk_leave_type_t
 Leave types.
 
#define ZB_NWK_IS_ADDRESS_BROADCAST(addr)   ( (addr) >= ZB_NWK_BROADCAST_RESERVED )
 Check that address is broadcast. More...
 
#define ZB_MAC_LQI_UNDEFINED   0
 
#define ZB_MAC_RSSI_UNDEFINED   0x7f
 
#define ZB_MAC_START_CHANNEL_NUMBER   11
 
#define ZB_MAC_MAX_CHANNEL_NUMBER   26
 
#define ZB_MAC_SUPPORTED_CHANNELS   (ZB_MAC_MAX_CHANNEL_NUMBER - ZB_MAC_START_CHANNEL_NUMBER + 1)
 

PIB cache

typedef struct zb_nwk_pib_cache_s zb_nwk_pib_cache_t
 

PIB cache mirror

Here are cache of PIB / NIB mirror of PIB values.

After that values modified in NWK or upper, must sync it with MAC using MLME-SET.

zb_nwk_pib_cache_tzb_nwk_get_pib_cache ()
 
zb_nib_tzb_nwk_get_nib ()
 
#define ZB_PIB_CACHE()   zb_nwk_get_pib_cache()
 
#define ZB_PIBCACHE_NETWORK_ADDRESS()   ZB_PIB_CACHE()->mac_short_address
 
#define ZB_PIBCACHE_PAN_ID()   ZB_PIB_CACHE()->mac_pan_id
 
#define ZB_PIBCACHE_EXTENDED_ADDRESS()   ZB_PIB_CACHE()->mac_extended_address
 
#define ZB_PIBCACHE_RX_ON_WHEN_IDLE()   ZB_PIB_CACHE()->mac_rx_on_when_idle
 
#define ZB_PIBCACHE_ASSOCIATION_PERMIT()   ZB_PIB_CACHE()->mac_association_permit
 
#define ZB_PIBCACHE_CURRENT_CHANNEL()   ZB_PIB_CACHE()->phy_current_channel
 
#define ZB_NIB()   zb_nwk_get_nib()
 

Detailed Description

Macro Definition Documentation

#define ZB_MAC_LQI_UNDEFINED   0

LQI undefined value

#define ZB_MAC_MAX_CHANNEL_NUMBER   26

Maximal number of the channels

#define ZB_MAC_RSSI_UNDEFINED   0x7f

RSSI undefined value

#define ZB_MAC_START_CHANNEL_NUMBER   11

Number of the first channel

#define ZB_MAC_SUPPORTED_CHANNELS   (ZB_MAC_MAX_CHANNEL_NUMBER - ZB_MAC_START_CHANNEL_NUMBER + 1)

Total number of supported channels

#define ZB_NIB ( )    zb_nwk_get_nib()

Macro used to access NWK Information Base.

Returns
pointer to NWK Information Base.
#define ZB_NWK_IS_ADDRESS_BROADCAST (   addr)    ( (addr) >= ZB_NWK_BROADCAST_RESERVED )

Check that address is broadcast.

Parameters
addr- 16-bit address
Returns
TRUE if address is broadcast, FALSE otherwhise
#define ZB_PIB_CACHE ( )    zb_nwk_get_pib_cache()

Macro used to access PIB cache.

Returns
pointer to PIB cache.
#define ZB_PIBCACHE_ASSOCIATION_PERMIT ( )    ZB_PIB_CACHE()->mac_association_permit

Cached value of AssociationPermit attribute

#define ZB_PIBCACHE_CURRENT_CHANNEL ( )    ZB_PIB_CACHE()->phy_current_channel

Cached value of CurrentChannel attribute

#define ZB_PIBCACHE_EXTENDED_ADDRESS ( )    ZB_PIB_CACHE()->mac_extended_address

Cached value of device extended address

#define ZB_PIBCACHE_NETWORK_ADDRESS ( )    ZB_PIB_CACHE()->mac_short_address

Cached value of device network address

#define ZB_PIBCACHE_PAN_ID ( )    ZB_PIB_CACHE()->mac_pan_id

Cached value of device PAN ID

#define ZB_PIBCACHE_RX_ON_WHEN_IDLE ( )    ZB_PIB_CACHE()->mac_rx_on_when_idle

Cached value of RxOnWhenIdle attribute

Typedef Documentation

Network device type

Data structure used to cache frequently used PIB attributes.

Useful whe using alien MAC layer without direct access to PIB: blockable "get" interface to PIB is too complex and slow.

Enumeration Type Documentation

Network broadcast addresses types.

Enumerator
ZB_NWK_BROADCAST_ALL_DEVICES 

All devices in PAN

ZB_NWK_BROADCAST_RX_ON_WHEN_IDLE 

macRxOnWhenIdle = TRUE

ZB_NWK_BROADCAST_ROUTER_COORDINATOR 

All routers and coordinator

ZB_NWK_BROADCAST_LOW_POWER_ROUTER 

Low power routers only

Network device type

Enumerator
ZB_NWK_DEVICE_TYPE_COORDINATOR 

Device - Coordinator

ZB_NWK_DEVICE_TYPE_ROUTER 

Device - Router

ZB_NWK_DEVICE_TYPE_ED 

Device - End device

ZB_NWK_DEVICE_TYPE_NONE 

Unknown Device

Leave types.

Enumerator
ZB_NWK_LEAVE_TYPE_RESET 

Leave without rejoin

ZB_NWK_LEAVE_TYPE_REJOIN 

Leave with rejoin

Function Documentation

zb_nib_t* zb_nwk_get_nib ( )

Function used to access NWK Information Base.

Returns
pointer to NWK Information Base.
zb_nwk_pib_cache_t* zb_nwk_get_pib_cache ( )

Function used to access PIB cache.

Returns
pointer to PIB cache.

Documentation feedback | Developer Zone | Subscribe | Updated