Scenes Cluster——场景

这段时间在看ZCL,然后搞到scene时就头大了,网上找不到任何详细说明,而且协议栈的例程代码也没用到scene的地方,所以就各种看文档,看代码...总结如下,如果有问题,还望大家不吝指出

// The format of a Scene Table Entry
typedef struct
{
  uint16 groupID;                   // The group ID for which this scene applies
  uint8 ID;                         // Scene ID
  uint16 transTime;                 // Time to take to transition to this scene
  uint8 name[ZCL_GEN_SCENE_NAME_LEN]; // Scene name
  uint8 extLen;                     // Length of extension fields
  uint8 extField[ZCL_GEN_SCENE_EXT_LEN]; // Extension fields
} zclGeneral_Scene_t;


1.Overview
The scenes cluster provides attributes and commands for settin g up and recalling scenes. Each scene corresponds to a set of  stored values of specified attributes for
one or more clusters on the same end point as the scenes cluster.
In most cases scenes are associated with a particular group ID.  Scenes may also exist without a group, in which case the  value 0x0000 replaces the group ID.  Note that extra care is required in these  cases to avoid a scene ID collision, and that commands related to scenes without a group may only be unicast, i.e.: they may not be multicast or broadcast.

大概意思就是,端口可以在场景中可以存储对应簇的属性值(具体方法在下面会进行说明);在绝大多数情况下,情景和一个特定的GroupID关联在一起,情景也可能没有组而存在,在这种情况下,用GroupID0x0000来代替。值得特别注意的是:要避免情景ID冲突,并且没与组关联的情景相关的命令只支持单播,也就是说:它们不支持多播或组播。

Commands Received

Command ID  Description            

0x00                  Add scene
0x01 View scene 
0x02 Remove scene 
0x03  Remove all scenes 
0x04 Store scene 
0x05 Recall scene
0x06 Get scene mem

Add scene command,向设备的端口添加scene

参数说明:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值