package com.hdl.sdk.link.zigbee.bean;
|
|
import androidx.annotation.NonNull;
|
import java.io.Serializable;
|
import java.util.ArrayList;
|
import java.util.List;
|
|
/**
|
* Created by jlchen on 12/29/21.
|
* 搜索ZigBee设备回路回复
|
*/
|
public class ZBDeviceBean implements Serializable {
|
/// <summary>
|
/// 实际的设备id
|
/// <para>258:color dimmable light,调关灯 </para>
|
/// <para>10:Door lock,门锁</para>
|
/// <para>514:Window covering device,窗帘</para>
|
/// <para>515:Window covering controller,窗帘控制器</para>
|
/// <para>769:Thermostat,恒温面板/空调</para>
|
/// <para>770:Temperature Sensor,温度传感器</para>
|
/// <para>775:Temperature Sensor,湿度传感器</para>
|
/// <para>262:Light sensor,光照传感器</para>
|
/// <para>1026:sensor,传感器,具体类型的传感器DeviceType来区分</para>
|
/// </summary>
|
private int Device_ID;
|
/// MAC地址
|
private String DeviceAddr;
|
//设备端口号
|
//和mac地址共同标识唯一的zigbee设备
|
//数值范围0-255
|
//如果无设备该字段不存在
|
private int Epoint;
|
//返回入网设备信息
|
private int Data_ID;
|
//设备详细信息
|
private ZBDataBean Data;
|
//自定义添加字段 可能是oid,可能是网关Id,可能是mac
|
private String gatewayMac;
|
|
/**
|
* 模板匹配标记 wxr 自定义 2022-02-23 16:09:44
|
*/
|
private boolean templateSettingFlag = false;
|
public boolean isTemplateSettingFlag() {
|
return templateSettingFlag;
|
}
|
|
public void setTemplateSettingFlag(boolean templateSettingFlag) {
|
this.templateSettingFlag = templateSettingFlag;
|
}
|
private String templateAddr ;
|
|
private String linkSid;
|
private String linkSpk;
|
private String linkOid;
|
private String linkName;
|
|
public ZBDeviceBean() {
|
}
|
|
public ZBDeviceBean(String linkSid, String linkSpk, String linkOid, String linkName) {
|
this.linkSid = linkSid;
|
this.linkSpk = linkSpk;
|
this.linkOid = linkOid;
|
this.linkName = linkName;
|
}
|
|
public String getLinkSid() {
|
return linkSid == null ? "" : linkSid;
|
}
|
|
public void setLinkSid(@NonNull String linkSid) {
|
this.linkSid = linkSid;
|
}
|
|
public String getLinkSpk() {
|
return linkSpk == null ? "" : linkSpk;
|
}
|
|
public void setLinkSpk(@NonNull String linkSpk) {
|
this.linkSpk = linkSpk;
|
}
|
|
public String getLinkOid() {
|
return linkOid == null ? "" : linkOid;
|
}
|
|
public void setLinkOid(@NonNull String linkOid) {
|
this.linkOid = linkOid;
|
}
|
|
public String getLinkName() {
|
return linkName == null ? "" : linkName;
|
}
|
|
public void setLinkName(@NonNull String linkName) {
|
this.linkName = linkName;
|
}
|
|
public String getTemplateAddr() {
|
return templateAddr == null ? "" : templateAddr;
|
}
|
|
public void setTemplateAddr(String templateAddr) {
|
this.templateAddr = templateAddr;
|
}
|
|
@NonNull
|
public String getGatewayMac() {
|
return gatewayMac == null ? "" : gatewayMac;
|
}
|
|
public void setGatewayMac(@NonNull String gatewayMac) {
|
this.gatewayMac = gatewayMac;
|
}
|
|
public int getDevice_ID() {
|
return Device_ID;
|
}
|
|
public void setDevice_ID(int Device_ID) {
|
this.Device_ID = Device_ID;
|
}
|
|
@NonNull
|
public String getDeviceAddr() {
|
return DeviceAddr == null ? "" : DeviceAddr;
|
}
|
|
public void setDeviceAddr(@NonNull String DeviceAddr) {
|
this.DeviceAddr = DeviceAddr;
|
}
|
|
public int getEpoint() {
|
return Epoint;
|
}
|
|
public void setEpoint(int Epoint) {
|
this.Epoint = Epoint;
|
}
|
|
public int getData_ID() {
|
return Data_ID;
|
}
|
|
public void setData_ID(int Data_ID) {
|
this.Data_ID = Data_ID;
|
}
|
|
|
|
public ZBDataBean getData() {
|
if(Data == null){
|
Data = new ZBDataBean();
|
}
|
return Data;
|
}
|
|
public void setData(ZBDataBean Data) {
|
this.Data = Data;
|
}
|
|
/**
|
* 设备详细信息
|
*/
|
public static class ZBDataBean implements Serializable{
|
private int TotalNum;//入网设备总数。等于0时,表示没有设备信息,下面字段将不存在。
|
private int DeviceNum;//标识当前设备是发送的是第几个设备。DeviceNum从1开始每发送一个设备信息,下一个设备信息的DeviceNum将加1。直到DeviceNum等于TotalNum说明所有设备信息发送完毕
|
private int JoinTime;//入网的utc时间戳
|
private int ZigbeeType;//1:路由器设备 2:终端设备,电池设备
|
private int NwkAddr;//设备网络地址
|
private int DeviceType;//该字段主要针对IAS安防设备设立。所有IAS安防设备共用一个DeviceID为1026。所以要区分子设备类型,需要该字段。
|
//用于判断设备的zigbee协议版本。49246:ZLL1.0标准设备。260: ZHA1.2标准设备、 Z3.0标准设备。
|
// 41440:ZGP3.0标准设备。265:ZSE1.4标准设备。
|
private int Profile;
|
//设备mac名称
|
private String MacName;
|
//设备名
|
private String DeviceName;
|
//0:设备不在线 1:设备在线
|
private int IsOnline;
|
//输入簇列表
|
//端点回路自身拥有多少功能,可以被控制;被控功能
|
//参考zigbee联盟文档
|
private List<InClusterListBean> InClusterList;
|
//输出簇列表
|
//端点回路可以控制其他设备多少功能;控制功能
|
//参考zigbee联盟文档
|
private List<OutClusterListBean> OutClusterList;
|
//用于记录设备最新上报的属性状态信息。最大支持记录16个属性状态,且只记录属性值长度不大于4字节的数据。
|
private List<AttributeStatusBean> AttributeStatus;
|
//当前运行程序版本信息
|
private int ImgVersion;
|
//当前镜像类型id
|
private int ImgTypeId;
|
//硬件版本
|
private int HwVersion;
|
//驱动代码。为0时,表示zigbee协调器设备。其他值表示为虚拟驱动设备
|
private int DriveCode;
|
//设备所在网关的网关id
|
private String GwId;
|
//所有指定cluster是否都已经成功绑定协调器
|
//0:未完全绑定
|
//1:已经绑定
|
private int ClusterBindZbSuccess;
|
//是否获取所有默认绑定信息
|
//0:否
|
//1:是
|
private int IsGetAllDefaultBind;
|
//制造商名字
|
private String ManufacturerName;
|
//设备型号
|
private String ModelIdentifier;
|
//产品码 序列号
|
private String ProductCode;
|
//用来表示实际回路用于什么功能,可扩展
|
//0-继电器接普通开关
|
//1-继电器接灯光
|
//插座
|
private String FunctionType;
|
|
public int getTotalNum() {
|
return TotalNum;
|
}
|
|
public void setTotalNum(int TotalNum) {
|
this.TotalNum = TotalNum;
|
}
|
|
public int getDeviceNum() {
|
return DeviceNum;
|
}
|
|
public void setDeviceNum(int DeviceNum) {
|
this.DeviceNum = DeviceNum;
|
}
|
|
public int getJoinTime() {
|
return JoinTime;
|
}
|
|
public void setJoinTime(int JoinTime) {
|
this.JoinTime = JoinTime;
|
}
|
|
public int getZigbeeType() {
|
return ZigbeeType;
|
}
|
|
public void setZigbeeType(int ZigbeeType) {
|
this.ZigbeeType = ZigbeeType;
|
}
|
|
public int getNwkAddr() {
|
return NwkAddr;
|
}
|
|
public void setNwkAddr(int NwkAddr) {
|
this.NwkAddr = NwkAddr;
|
}
|
|
public int getDeviceType() {
|
return DeviceType;
|
}
|
|
public void setDeviceType(int DeviceType) {
|
this.DeviceType = DeviceType;
|
}
|
|
public int getProfile() {
|
return Profile;
|
}
|
|
public void setProfile(int Profile) {
|
this.Profile = Profile;
|
}
|
|
@NonNull
|
public String getMacName() {
|
return MacName == null ? "" : MacName;
|
}
|
|
public void setMacName(@NonNull String MacName) {
|
this.MacName = MacName;
|
}
|
|
@NonNull
|
public String getDeviceName() {
|
return DeviceName == null ? "" : DeviceName;
|
}
|
|
public void setDeviceName(@NonNull String DeviceName) {
|
this.DeviceName = DeviceName;
|
}
|
|
public int getIsOnline() {
|
return IsOnline;
|
}
|
|
public void setIsOnline(int IsOnline) {
|
this.IsOnline = IsOnline;
|
}
|
|
@NonNull
|
public List<InClusterListBean> getInClusterList() {
|
if (InClusterList == null) {
|
return new ArrayList<>();
|
}
|
return InClusterList;
|
}
|
|
public void setInClusterList(@NonNull List<InClusterListBean> InClusterList) {
|
this.InClusterList = InClusterList;
|
}
|
|
@NonNull
|
public List<OutClusterListBean> getOutClusterList() {
|
if (OutClusterList == null) {
|
return new ArrayList<>();
|
}
|
return OutClusterList;
|
}
|
|
public void setOutClusterList(@NonNull List<OutClusterListBean> OutClusterList) {
|
this.OutClusterList = OutClusterList;
|
}
|
|
@NonNull
|
public List<AttributeStatusBean> getAttributeStatus() {
|
if (AttributeStatus == null) {
|
return new ArrayList<>();
|
}
|
return AttributeStatus;
|
}
|
|
public void setAttributeStatus(@NonNull List<AttributeStatusBean> AttributeStatus) {
|
this.AttributeStatus = AttributeStatus;
|
}
|
|
public int getImgVersion() {
|
return ImgVersion;
|
}
|
|
public void setImgVersion(int ImgVersion) {
|
this.ImgVersion = ImgVersion;
|
}
|
|
public int getImgTypeId() {
|
return ImgTypeId;
|
}
|
|
public void setImgTypeId(int ImgTypeId) {
|
this.ImgTypeId = ImgTypeId;
|
}
|
|
public int getHwVersion() {
|
return HwVersion;
|
}
|
|
public void setHwVersion(int HwVersion) {
|
this.HwVersion = HwVersion;
|
}
|
|
public int getDriveCode() {
|
return DriveCode;
|
}
|
|
public void setDriveCode(int DriveCode) {
|
this.DriveCode = DriveCode;
|
}
|
|
@NonNull
|
public String getGwId() {
|
return GwId == null ? "" : GwId;
|
}
|
|
public void setGwId(@NonNull String GwId) {
|
this.GwId = GwId;
|
}
|
|
public int getClusterBindZbSuccess() {
|
return ClusterBindZbSuccess;
|
}
|
|
public void setClusterBindZbSuccess(int ClusterBindZbSuccess) {
|
this.ClusterBindZbSuccess = ClusterBindZbSuccess;
|
}
|
|
public int getIsGetAllDefaultBind() {
|
return IsGetAllDefaultBind;
|
}
|
|
public void setIsGetAllDefaultBind(int IsGetAllDefaultBind) {
|
this.IsGetAllDefaultBind = IsGetAllDefaultBind;
|
}
|
|
@NonNull
|
public String getManufacturerName() {
|
return ManufacturerName == null ? "" : ManufacturerName;
|
}
|
|
public void setManufacturerName(@NonNull String ManufacturerName) {
|
this.ManufacturerName = ManufacturerName;
|
}
|
|
@NonNull
|
public String getModelIdentifier() {
|
return ModelIdentifier == null ? "" : ModelIdentifier;
|
}
|
|
public void setModelIdentifier(@NonNull String ModelIdentifier) {
|
this.ModelIdentifier = ModelIdentifier;
|
}
|
|
@NonNull
|
public String getProductCode() {
|
return ProductCode == null ? "" : ProductCode;
|
}
|
|
public void setProductCode(@NonNull String ProductCode) {
|
this.ProductCode = ProductCode;
|
}
|
|
public String getFunctionType() {
|
return FunctionType;
|
}
|
|
public void setFunctionType(String FunctionType) {
|
this.FunctionType = FunctionType;
|
}
|
|
/**
|
* 输入簇
|
*/
|
public static class InClusterListBean implements Serializable{
|
/// <summary>
|
/// 设备支持的输入功能
|
/// <para>0:Basic,设备支持“基础属性” </para>
|
/// <para>3:Identify,设备支持“识别功能”</para>
|
/// <para>4:Groups,设备支持“组功能”</para>
|
/// <para>5:Scenes,设备支持“场景功能”</para>
|
/// <para>6:on/off,设备支持“开关功能”</para>
|
/// 开关功能的设备如:调关灯/继电器/窗帘等。。。
|
/// <para>8:Level Control,设备支持“亮度调节功能”</para>
|
/// 亮度调节功能的设备如:调关灯。。。
|
/// <para>257:Door Lock,设备支持“门锁功能”</para>
|
/// 门锁功能的设备如:门锁。。。
|
/// <para>258:Window Covering,设备支持“窗帘控制功能”</para>
|
/// 窗帘控制功能的设备如:窗帘/开合帘/卷帘。。。
|
/// <para>513:Thermostat,设备支持“恒温器功能”</para>
|
/// 恒温器功能的设备如:空调。。。
|
/// <para>768:Color Control,设备支持“颜色调节功能”</para>
|
/// 颜色调节功能的设备如:调光灯。。。
|
/// <para>1026:Temperature Measurement,设备支持“温度测量功能”</para>
|
/// 温度测量功能的设备如:温度传感器。。。
|
/// <para>1029:Relative Humidity Measurement,设备支持“湿度测量功能”</para>
|
/// 湿度测量功能的设备如:湿度传感器。。。
|
/// <para>1066:Pm2.5 Measurement,设备支持“pm2.5测量功能”</para>
|
/// Pm2.5测量功能的设备如:Pm2.5传感器。。。
|
/// </summary>
|
private int InCluster;
|
|
public int getInCluster() {
|
return InCluster;
|
}
|
|
public void setInCluster(int inCluster) {
|
this.InCluster = inCluster;
|
}
|
}
|
|
/**
|
* 输出簇
|
*/
|
public static class OutClusterListBean implements Serializable{
|
/// <summary>
|
/// 设备支持的输出功能
|
/// <para>0:Basic,设备支持“基础属性” </para>
|
/// <para>3:Identify,设备支持“识别功能”</para>
|
/// <para>4:Groups,设备支持“组功能”</para>
|
/// <para>5:Scenes,设备支持“场景功能”</para>
|
/// <para>6:on/off,设备支持“开关功能”</para>
|
/// 开关功能的设备如:调关灯/继电器/窗帘等。。。
|
/// <para>8:Level Control,设备支持“亮度调节功能”</para>
|
/// 亮度调节功能的设备如:调关灯。。。
|
/// <para>257:Door Lock,设备支持“门锁功能”</para>
|
/// 门锁功能的设备如:门锁。。。
|
/// <para>258:Window Covering,设备支持“窗帘控制功能”</para>
|
/// 窗帘控制功能的设备如:窗帘/开合帘/卷帘。。。
|
/// <para>513:Thermostat,设备支持“恒温器功能”</para>
|
/// 恒温器功能的设备如:空调。。。
|
/// <para>768:Color Control,设备支持“颜色调节功能”</para>
|
/// 颜色调节功能的设备如:调光灯。。。
|
/// <para>1026:Temperature Measurement,设备支持“温度测量功能”</para>
|
/// 温度测量功能的设备如:温度传感器。。。
|
/// <para>1029:Relative Humidity Measurement,设备支持“湿度测量功能”</para>
|
/// 湿度测量功能的设备如:湿度传感器。。。
|
/// </summary>
|
private int OutCluster;
|
|
public int getOutCluster() {
|
return OutCluster;
|
}
|
|
public void setOutCluster(int outCluster) {
|
this.OutCluster = outCluster;
|
}
|
}
|
|
/**
|
* 设备最新上报的属性状态信息
|
*/
|
public static class AttributeStatusBean implements Serializable{
|
|
/// <summary>
|
/// 属性簇id
|
/// </summary>
|
private int ClusterId;
|
/// <summary>
|
/// 属性id
|
/// </summary>
|
private int AttributeId;
|
/// <summary>
|
/// 属性值,这个东西不需要什么高位在后低位在前,它已经是转为了10进制
|
/// </summary>
|
private int AttributeData;
|
/// <summary>
|
/// 属性状态最后更新的utc时间戳
|
/// </summary>
|
private int ReportTime;
|
|
public int getClusterId() {
|
return ClusterId;
|
}
|
|
public void setClusterId(int clusterId) {
|
this.ClusterId = ClusterId;
|
}
|
|
public int getAttributeId() {
|
return AttributeId;
|
}
|
|
public void setAttributeId(int AttributeId) {
|
this.AttributeId = AttributeId;
|
}
|
|
public int getAttributeData() {
|
return AttributeData;
|
}
|
|
public void setAttributeData(int attributeData) {
|
this.AttributeData = AttributeData;
|
}
|
|
public int getReportTime() {
|
return ReportTime;
|
}
|
|
public void setReportTime(int ReportTime) {
|
this.ReportTime = ReportTime;
|
}
|
}
|
}
|
}
|