理解ZCL在Z-stack协议栈中的位置和作用

The ZCL is a repository for cluster functionality that is developed by the ZigBee Alliance, and, as a consequence, it will be a working library with regular updates as new
functionality is added.

A developer constructing a new application profile should use the ZCL to find relevant cluster functionality that can be incorporated into the new profile. Correspondingly, new clusters that are de fined for application profiles should be considered for inclusion in the ZCL.

The ZCL consists of the ZCL Foundation, a set of elements that apply across the entire library (such as frame structur es, attribute access commands and data types), and a number of sets of clusters. Clusters that are generally useful across many application domains are included in the General set. Clusters that are intended for use mainly in specific application domains are grouped together in domain oriented sets.

——————————————————

————————————————————

    上图体现了ZCL层在z-stack协议栈中的位置。一旦被使用,ZCL运转在AF层之上,具体的Application之下。AF层接收到的Message中,包含符合ZCL格式的命令,这些命令不是由非ZCL应用中用户自定义的app_process_event任务所处理的,而是进入ZCL的任务队列(task's queue),由zcl_event_loop()处理。ZCL在此充当了AF层和ZCL应用之间的一个中间层,zcl命令被解析后,由用户定义的cmd callback回调函数对命令做出响应;应用需要向外发出消息时,通过调用zcl层的API实现。

    而ZCL包括自下而上的两层,下层是基础层(foundation layer),该层负责实现库中所通用的若干特性,例如帧结构,属性访问命令和数据类型。可以认为基础层完成zcl格式的封装和解析。上层是功能域层,该层包含了多个cluster的实现,其中又按应用类别划分为general、lighting、HVAC等。

  • 3
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值