Developing with ZBOSS for Zigbee

Data Structures

struct  zb_nwk_nbr_iterator_cb_params_s
 
struct  zb_nwk_nbr_iterator_entry_s
 

Macros

#define ZB_NWK_IS_ADDRESS_BROADCAST(addr)   ( (addr) >= ZB_NWK_BROADCAST_RESERVED )
 Check that address is broadcast. More...
 
#define ZB_NWK_NBR_ITERATOR_INDEX_EOT   0xFFFFU /*! Index, indicating that the iterator reached boundaries of the neighbour table. */
 

Typedefs

typedef struct zb_nwk_nbr_iterator_cb_params_s zb_nwk_nbr_iterator_params_t
 
typedef struct zb_nwk_nbr_iterator_entry_s zb_nwk_nbr_iterator_entry_t
 

Functions

zb_nwk_device_type_t zb_get_device_type (void)
 
zb_uint16_t zb_nwk_get_parent (void)
 
zb_ret_t zb_nwk_nbr_iterator_next (zb_uint8_t bufid, zb_callback_t cb)
 

Detailed Description

Macro Definition Documentation

◆ ZB_NWK_IS_ADDRESS_BROADCAST

#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 otherwise

Function Documentation

◆ zb_get_device_type()

zb_nwk_device_type_t zb_get_device_type ( void  )

Get own device type.

Returns
One of the values from nwk_device_type.
device_type = zb_get_device_type();
TRACE_MSG(TRACE_APP1, "Device (%d) STARTED OK", (FMT__D, device_type));

◆ zb_nwk_get_parent()

zb_uint16_t zb_nwk_get_parent ( void  )

Get short address of the parent node.

Returns
Short address of the parent node or ZB_UNKNOWN_SHORT_ADDR if the device isn't joined to a network.

◆ zb_nwk_nbr_iterator_next()

zb_ret_t zb_nwk_nbr_iterator_next ( zb_uint8_t  bufid,
zb_callback_t  cb 
)

Read the next active entry from the NWK neighbour table. The index indicates the point, from which the entry will be searched in the neighbour table. This API returns neighbour table entry inside the buffer payload, that are connected to the same PAN and their entries are not marked as stale or timed out. The index of the entry is passed as buffer parameters.

Parameters
bufidThe ZBOSS buffer, containing arguments defined by zb_nwk_nbr_iterator_params_t structure, passed as buffer parameters.
cbCallback function, that will get the next neighbour table entry.
TRACE_MSG
#define TRACE_MSG(lm, fmts, args)
Put trace output.
Definition: zb_trace.h:359
zb_nwk_device_type_t
zb_uint8_t zb_nwk_device_type_t
Type for network device type.
Definition: zboss_api_nwk.h:83
ZB_NWK_DEVICE_TYPE_NONE
#define ZB_NWK_DEVICE_TYPE_NONE
Definition: zboss_api_nwk.h:74
zb_get_device_type
zb_nwk_device_type_t zb_get_device_type(void)