Zigbee标准协议中的对象属性分类

1、Profile

最上面的是剖面Profile,这里可以理解为领域,zigbee应用现有如下的几个领域:每个领域就是剖面Profile,都有一个Profile值的!

Home Automation的Profile为0x0104

Buiding Automation的Profile为0x0105

Light link的Profile应该为0xc05e,但是为了互通性,HA的0x0104同样作为ZLL的ProfileID,0xc05e作为一个副ProfileID使用

2、DeviceID

以前觉得DeviceID和ClusterID有隶属关系,其实不是了!DeviceID与ClusterID没有隶属关系!DeviceID是各种设备(传感器、控制器)在ZHA协议中被编订一个对应数值!客户端通过这个值来识别这个设备!

DeviceID在zstack里被zcl_ha.h文件、zcl_ll.h(light link)或zba.h(Building Automation)文件定义

3、ClusterID

一个ClusterID是一群AttributeID的集合!ClusterID是一个容器,容纳了许多AttributeID!他两是有隶属关系的!任何设备是通过ClusterID和AttributeID来描述设备的属性!

ClusterID在zstack里被zcl.h定义

4、AttributeSet

将相近的attribute集合到一个成为AttributeSet,每个AttributeSet有16个attributeID

这个集合Set就像中国行政中的地市,尽管存在着市管县,但是官方文件确明确表示我们是省/县/乡三级行政机构!故这个SetID没有在协议体现出来!

不过也有联系,AttributeID的十六进制的前三个数实为其所在的AttributeSet编码,比如0x0001其所在的Set编码为0x000,0x0011其所在的Set编码为0x001

同样从侧面反映出为啥一个Set最多只可包含16个attribute了!从0到F嘛!

5、AttributeID

AttributeID是每个设备的一项属性!比如把人看做一个设备,那么其身高,发型,籍贯等等都可以作为其一个Attribute,并编订一个ID来表示这个属性!客户端接收这个ID即知道这个是什么属性,表述何种信息!任何设备是通过ClusterID和AttributeID来描述设备的属性!

AttributeID在zstack里被zcl_hvac.h、zcl_lighting.h这样的文件定义

1
2
3
4
5
typedef  struct
{
   uint16          clusterID;     // Real cluster ID
   zclAttribute_t  attr;
} zclAttrRec_t;

包含下

1
2
3
4
5
6
7
8
// Attribute record
typedef  struct
{
   uint16  attrId;          // Attribute ID
   uint8   dataType;        // Data Type - defined in AF.h
   uint8   accessControl;   // Read/write - bit field
   void     *dataPtr;        // Pointer to data field
} zclAttribute_t;


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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值