z-stack协议栈里的所有函数在文档里都有说明吗?比如zcl库,在HomeAutomation的例子里面,有一些函数在zcl的文档里就没有,如zclClosures_RegisterDoorLockCmdCallbacks()这个函数(Z-Stack Home 1.2.1),还有其他一些函数也找不到说明,这些函数应该是协议栈定义好的,但为什么没有这个函数的说明呢?
Susan Yang:
/********************************************************************** @fnzclClosures_RegisterDoorLockCmdCallbacks** @briefRegister an applications DoorLock command callbacks** @paramendpoint - application's endpoint* @paramcallbacks - pointer to the callback record.** @returnZMemError if not able to allocate*/ ZStatus_t zclClosures_RegisterDoorLockCmdCallbacks( uint8 endpoint, zclClosures_DoorLockAppCallbacks_t *callbacks ) {zclClosuresDoorLockCBRec_t *pNewItem;zclClosuresDoorLockCBRec_t *pLoop;// Register as a ZCL Pluginif ( !zclDoorLockPluginRegisted ){zcl_registerPlugin( ZCL_CLUSTER_ID_CLOSURES_DOOR_LOCK,ZCL_CLUSTER_ID_CLOSURES_DOOR_LOCK,zclClosures_HdlIncoming );zclDoorLockPluginRegisted = TRUE;}// Fill in the new profile listpNewItem = zcl_mem_alloc( sizeof( zclClosuresDoorLockCBRec_t ) );if ( pNewItem == NULL ){return ( ZMemError );}pNewItem->next = (zclClosuresDoorLockCBRec_t *)NULL;pNewItem->endpoint = endpoint;pNewItem->CBs = callbacks;// Find spot in listif ( zclClosuresDoorLockCBs == NULL ){zclClosuresDoorLockCBs = pNewItem;}else{// Look for end of listpLoop = zclClosuresDoorLockCBs;while ( pLoop->next != NULL ){pLoop = pLoop->next;}// Put new item at end of listpLoop->next = pNewItem;}return ( ZSuccess ); }
songfeng zhang:
回复 Susan Yang:
我知道这个函数在哪,我的问题是:这些函数在zcl文档里面为什么没有说明呢?ZCL应该是按照ZigBee官方协议的Standard-ZigBee Home Automation标准实现的吧?里面的很多功能是用户自己实现还是协议栈实现的?
还想问个问题:
1.要实现哪些回调函数以及回调函数在回调数组里面的排序是自己定义还是z-stack定义好的?
2.zclGeneral_HdlIncoming()函数是在哪里被调用的,这个没有找到。