TI中文支持网
TI专业的中文技术问题搜集分享网站

CC2530 Z-STACK 3.0.1 的 endPointDesc_t 和 SimpleDescriptionFormat_t 里的 endpoint

endPointDesc_t 和 SimpleDescriptionFormat_t  都有一个成员 endpoint ,而 SimpleDescriptionFormat_t   又是  endPointDesc_t 的成员,

1.这两个endpoint有什么区别?

2.endPointDesc_t 的成员 epType,应该是 端点类型,似乎例程中都赋值为0,,这个成员的作用及取值是什么?

3. OTA Dongle 中,有如下 endPointDesc_t 

#define OTA_DONGLE_BINDINGLIST 2

// Endpoint to allow SYS_APP_MSGs
static endPointDesc_t ota_SysAppEp =
{
    OTA_SYSAPP_ENDPOINT, // Sys App endpoint
    0,
    &OTA_Dongle_TaskID,
    (SimpleDescriptionFormat_t *) &OTA_Dongle_SimpleDesc,
    (afNetworkLatencyReq_t)0 // No Network Latency req
};

static endPointDesc_t ota_DongleEp =
{
    OTA_DONGLE_ENDPOINT, // Sys App endpoint
    0,
    &zcl_TaskID,
    (SimpleDescriptionFormat_t*) &OTA_Dongle_SimpleDesc,
    (afNetworkLatencyReq_t)0 // No Network Latency req
};

其中的endpoint注释都为 Sys App endpoint,但实际值却不一样;SimpleDescriptionFormat_t都为OTA_Dongle_SimpleDesc;这两个端点描述符的在工程代码里作用分别是什么?为什么 static endPointDesc_t ota_DongleEp里的task_id 为zcl_TaskID?

为什么 samplelight 例程里 endPointDesc_t 不需要 Simple description?

// Test Endpoint to allow SYS_APP_MSGs
static endPointDesc_t sampleLight_TestEp =
{
SAMPLELIGHT_ENDPOINT,
0,
&zclSampleLight_TaskID,
(SimpleDescriptionFormat_t *)NULL, // No Simple description for this test endpoint
(afNetworkLatencyReq_t)0 // No Network Latency req
};

Susan Yang:

一个设备可能有多个endpoint,endPointDesc_t用于每个endpoint的描述,而SimpleDescriptionFormat_t表示的是这个endpoint上面支持的cluster,包括out cluster 和in cluster。

协议栈的定义内,endPointDesc_t里面包含了SimpleDescriptionFormat_t,这样就可以识别具体的功能了

XL Peng:

回复 Susan Yang:

如图,在OTA Dongle 里,endPointDesc_t 的 endpoint 跟 (SimpleDescriptionFormat_t *) &OTA_Dongle_SimpleDesc, 的 EndPoint 值不一样。

另外其他2个问题如何解释?

赞(0)
未经允许不得转载:TI中文支持网 » CC2530 Z-STACK 3.0.1 的 endPointDesc_t 和 SimpleDescriptionFormat_t 里的 endpoint
分享到: 更多 (0)