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_RegisterForZDOMsg和afRegister是不是重复了?

sapi.c中的SAPI_Init()函数。

ZDO_RegisterForZDOMsg( sapi_TaskID, NWK_addr_rsp );

表示接收某任务 要订阅某一种簇的消息 。

但是afRegister( &sapi_epDesc ),却又注册了AppNumInClusters和pAppInClusterList,那这个注册是做什么呢?

typedef struct
{
byte endPoint;
byte *task_id; // Pointer to location of the Application task ID.
SimpleDescriptionFormat_t *simpleDesc;
afNetworkLatencyReq_t latencyReq;
} endPointDesc_t;

typedef struct
{
byte EndPoint;
uint16 AppProfId;
uint16 AppDeviceId;
byte AppDevVer:4;
byte Reserved:4; // AF_V1_SUPPORT uses for AppFlags:4.
byte AppNumInClusters;
cId_t *pAppInClusterList;
byte AppNumOutClusters;
cId_t *pAppOutClusterList;
} SimpleDescriptionFormat_t;