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

情景控制的延时功能怎么实现?

尊敬的TI工程师,论坛好友们:

       大家好!最近在做CC2530的情景控制功能,协议栈用的是HA1.2.2a。在基于zha标准的GROUP和SCENE来实现的情景控制。如何实现情景延时?

       具体情况是:某一情景被触发,到实现这个情景控制之间的延时。SCENE的参数里面有Scene transition time和TransitionTime100ms,它们如何实现,是需要用户在应用层编写代码实现这个情景延时功能吗?请指导!谢谢!

Viki Shi:

// The format of a Scene Table Entry
typedef struct
{uint16 groupID;// The group ID for which this scene appliesuint8 ID;// Scene IDuint16 transTime;// Time to take to transition to this sceneuint16 transTime100ms;// Together with transTime, this allows transition time to be specified in 1/10suint8 name[ZCL_GEN_SCENE_NAME_LEN]; // Scene nameuint8 extLen;// Length of extension fieldsuint8 extField[ZCL_GEN_SCENE_EXT_LEN]; // Extension fields
} zclGeneral_Scene_t;

格式如上。

TI 诚邀您参加全新设计的产品页面测试,参加测试即可享有 TI 购物 9 折优惠码,点击加入 EP产品页面测试报名,名额有限。感谢您的参与!

xuezheng su:

回复 Viki Shi:

是的,Scene Table是这样。但是,我的意思是如何实现,是不是底层已经实现了,直接按照这样配置参数就可以了吗?

YiKai Chen:

是的,需要用户在应用层编写代码实现这个情景延时功能

xuezheng su:

回复 YiKai Chen:

好的。谢谢!那在ZCL文档里面“On receipt of the Add Scene command, the Scene Transition Time element of the scene table SHALL be updated with the value of the Transition Time field and the TransitionTime100ms element SHALL be set to zero.”。这样说的意思,是说设置“ Transition Time ”的值时,“TransitionTime100ms ”需要设置为0,又是什么意思?

xuezheng su:

回复 YiKai Chen:

好的,谢谢!我在ZCL文档里面看到“Recall Scene Command”命令中也可以添加“Transition Time”参数,这样在“Add Scene command”里面的“Transition Time”参数是否就没有意义了,重复了?

YiKai Chen:

回复 xuezheng su:

也不完全是没有意义,看你怎樣運用吧

赞(0)
未经允许不得转载:TI中文支持网 » 情景控制的延时功能怎么实现?
分享到: 更多 (0)