Developing with ZBOSS for Zigbee
|
There is an internal structure that stores user-defined callbacks for every active ZDP request and calls callback upon reception of response with matching TSN.
This structure is needed to notify user about reception of response and helps user to handle result of response. Also, if there is no ZDP response received within certain timeout, callback will be called with ZB_ZDP_STATUS_TIMEOUT status.
Most ZDO requests that have zb_callback_t as an argument and return ZDP transaction sequence number, utilize the structure described above.
Note that this structure will be cleared if device leaves network (whether with rejoin or without it). In such case, ZB_ZDO_SIGNAL_LEAVE will be raised and user callbacks that had been registered earlier will never be called.
There are some examples of functions that use this structure to store callbacks: