在Home1.2.2a中,在应用层有注册这样一个端口
static endPointDesc_t SampleApp_TestEp =
{
20, // Test endpoint
&zclSampleApp_TaskID,
(SimpleDescriptionFormat_t *)NULL, // No Simple description for this test endpoint
(afNetworkLatencyReq_t)0 // No Network Latency req
};
像这个端口的simpleDesc和latencyReq都是NULL和0,尤其是simpleDesc居然是NULL,这样注册的端口能正常使用吗?我记得在Zstack2.5.1中,它的simpleDesc是有具体内容的,尤其还会在ClusterList中指定CLUSTERID的。
const SimpleDescriptionFormat_t SampleApp_SimpleDesc =
{
SAMPLEAPP_ENDPOINT, // int Endpoint;
SAMPLEAPP_PROFID, // uint16 AppProfId[2];
SAMPLEAPP_DEVICEID, // uint16 AppDeviceId[2];
SAMPLEAPP_DEVICE_VERSION, // int AppDevVer:4;
SAMPLEAPP_FLAGS, // int AppFlags:4;
SAMPLEAPP_MAX_CLUSTERS, // uint8 AppNumInClusters;
(cId_t *)SampleApp_ClusterList, // uint8 *pAppInClusterList;
SAMPLEAPP_MAX_CLUSTERS, // uint8 AppNumInClusters;
(cId_t *)SampleApp_ClusterList // uint8 *pAppInClusterList;
};
像Home1.2.2a的那种用法,还能在接收方做switch(CLUSTERID)吗,因为在注册端口的时候就没有指定CLUSTERID
YiKai Chen:
你用的是Z-Stack Home1.2.2a的哪個例程?
user5281211:
回复 Alvin Chen:
还有一个问题请教您,是不是SimpleDescriptionFormat_t 中的cId_t*pAppInClusterList和cId_t*pAppOutClusterList分别限定了这个注册的端口只能接收来自pAppInClusterList中CLUSTERID的网络帧,以及只能通过pAppOutClusterList的CLUSTERID发送的网络帧?
user5281211:
回复 YiKai Chen:
DoorLock,多谢您的回复。Alvin Chen已经指出问题所在啦
Alvin Chen:
回复 user5281211:
Application Cluster
An application cluster generates persistent functional application transactions between client and server sides of a cluster, and the targets of these transactions are determined when binds are created between matching clusters (client and server).
Examples of application cluster transactions include: On/Off cluster – Switch (On/Off cluster client) sends commands to Light (On/Off cluster server) Temperature Measurement cluster – Temperature Sensor (Temp Meas. cluster server) sends reports to Thermostat (Temp Meas. cluster client)