使用ZDO_RegisterForZdoCB设置回调函数,这些回调函数有什么意义?返回值代表什么?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
使用ZDO_RegisterForZdoCB设置回调函数,这些回调函数有什么意义?返回值代表什么?
可以注册处理的事件如下。一般不需要注册,都有默认的处理。如果你希望自己处理就调ZDO_RegisterForZdoCB(),回调函数类型是
typedef void* (*pfnZdoCb)( void *param );没有返回值。
比如ZDO_BEACON_NOTIFY_IND_CBID事件,是处理收到的beacon,可以看ZDO_beaconNotifyIndCB()函数。如果你注册了就自己处理,没有,就使用默认处理。
所有相关都在ZDAPP.C中,其他事件,跟踪下代码,很容易就可以知道事件的含义。
enum
{
ZDO_SRC_RTG_IND_CBID,
ZDO_CONCENTRATOR_IND_CBID,
ZDO_NWK_DISCOVERY_CNF_CBID,
ZDO_BEACON_NOTIFY_IND_CBID,
ZDO_JOIN_CNF_CBID,
ZDO_LEAVE_CNF_CBID,
MAX_ZDO_CB_FUNC // Must be at the bottom of the list
};