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.

关于endPointDesc_t和SimpleDescriptionFormat_t的几个问题

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是不是必须严格包含你在程序中使用过的簇,否则不能正常使用?

  • 1. 一個endPointDesc_t對應到的SimpleDescriptionFormat_t他們的endpoint必須一致
    2. 對的
  • 这个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 first
    epDesc->simpleDesc = simpleDesc;
    epDesc->latencyReq = noLatencyReqs;

    // Register the endpoint description with the AF
    afRegister( epDesc );
    }
    }
    你注册一个endpoint时候,你的这个epDesc->endpoint 就是通过simpleDesc->endpoint赋值的。
x 出现错误。请重试或与管理员联系。