1、结构体
typedef struct
{
uint8 endPoint;
uint8 *task_id; // Pointer to location of the Application task ID.
SimpleDescriptionFormat_t *simpleDesc;
afNetworkLatencyReq_t latencyReq;
} endPointDesc_t;
和结构体
typedef struct
{
uint8 EndPoint;
uint16 AppProfId;
uint16 AppDeviceId;
uint8 AppDevVer:4;
uint8 Reserved:4; // AF_V1_SUPPORT uses for AppFlags:4.
uint8 AppNumInClusters;
cId_t *pAppInClusterList;
uint8 AppNumOutClusters;
cId_t *pAppOutClusterList;
} SimpleDescriptionFormat_t;
都有EndPoint这个属性,二者的这个属性是否必须保持一致。
2、SimpleDescriptionFormat_t中的pAppInClusterList和pAppOutClusterList是不是必须严格包含你在程序中使用过的簇,否则不能正常使用?
Alvin Chen:
回复 YiKai Chen:
这个endpoint 如Yk所说是要保持一致的:
void zclHA_Init( SimpleDescriptionFormat_t *simpleDesc )
{endPointDesc_t *epDesc;
// Register the application's endpoint descriptor//- This memory is allocated and never freed.epDesc = osal_mem_alloc( sizeof ( endPointDesc_t ) );if ( epDesc ){// Fill out the endpoint description.epDesc->endPoint = simpleDesc->EndPoint;epDesc->task_id = &zcl_TaskID;// all messages get sent to ZCL firstepDesc->simpleDesc = simpleDesc;epDesc->latencyReq = noLatencyReqs;
// Register the endpoint description with the AFafRegister( epDesc );}
}
你注册一个endpoint时候,你的这个epDesc->endpoint 就是通过simpleDesc->endpoint赋值的。