New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using Newtonsoft.Json.Linq; |
| | | |
| | | namespace ZigBee.Device |
| | | { |
| | | [System.Serializable] |
| | | public class BindObj : CommonDevice |
| | | { |
| | | #region 设备绑定 |
| | | |
| | | [System.Serializable] |
| | | public class AddedDeviceBindResponseAllData : ErrorResponCommon |
| | | { |
| | | /// <summary> |
| | | /// 网关直接反馈绑定设备信息 |
| | | /// </summary> |
| | | public AddedDeviceBindResponseData addedDeviceBindResponseData; |
| | | } |
| | | |
| | | [System.Serializable] |
| | | public class AddedDeviceBindResponseData |
| | | { |
| | | /// <summary> |
| | | ///绑定名称 |
| | | /// </summary> |
| | | public string BindName; |
| | | /// <summary> |
| | | ///绑定列表 ,当Status=0时存在 |
| | | /// </summary> |
| | | public List<BindListResponseObj> BindList = new List<BindListResponseObj>(); |
| | | /// <summary> |
| | | /// 0:绑定所有目标成功 |
| | | ///<para>1:绑定目标失败,绑定设备目标有漏掉</para> |
| | | /// </summary> |
| | | public int Result = -1; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 绑定列表的信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class AddBindListResponseObj : BindListResponseObj |
| | | { |
| | | /// <summary> |
| | | /// 0:加入成功(该状态只适用用于跨网关绑定和绑定场景。同网关设备间的绑定需要节点设备的确认成功信息,不会直接反馈成功。) |
| | | ///<para>1:失败,节点设备或场景不存在。</para> |
| | | ///<para>2:未知,由节点设备反馈发送“Bind/BindResult”主题消息确定是否成功。</para> |
| | | ///<para>3:绑定已经存在。</para> |
| | | /// </summary> |
| | | public int Result; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 按键设备的确认的信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class AddBindResultResponseData |
| | | { |
| | | /// <summary> |
| | | ///绑定结果 |
| | | ///<para>0:成功</para> |
| | | ///<para>140:失败,控制设备的绑定列表已满</para> |
| | | ///<para>其他:失败</para> |
| | | /// </summary> |
| | | public int Result; |
| | | /// <summary> |
| | | /// 绑定的cluster |
| | | /// </summary> |
| | | public int BindCluster; |
| | | /// <summary> |
| | | /// 绑定设备Mac地址, 当BindType=0时存在 |
| | | /// </summary> |
| | | public string BindMacAddr; |
| | | /// <summary> |
| | | /// 绑定设备的端口号,当BindType=0时存在 |
| | | /// </summary> |
| | | public int BindEpoint; |
| | | /// <summary> |
| | | /// 绑定场景,当BindType=2时存在 |
| | | /// </summary> |
| | | public int BindScenesId; |
| | | /// <summary> |
| | | /// 绑定设备的名称 |
| | | /// </summary> |
| | | public string DeviceName; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 绑定设备的数据 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class AddBindData |
| | | { |
| | | /// <summary> |
| | | /// 控制设备节点的mac地址 |
| | | /// </summary> |
| | | public string DeviceAddr; |
| | | /// <summary> |
| | | /// 错误信息 |
| | | /// </summary> |
| | | public int Epoint; |
| | | /// <summary> |
| | | ///绑定名称,不修改名称时忽略该选项 |
| | | /// </summary> |
| | | public string BindName; |
| | | /// <summary> |
| | | ///绑定列表,不修改绑定列表时忽略该选项。 |
| | | /// </summary> |
| | | public List<AddBindListObj> BindList = new List<AddBindListObj>(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 控制设备绑定的信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class AddBindListObj |
| | | { |
| | | /// <summary> |
| | | /// 绑定类型 |
| | | ///<para>0:绑定设备 </para> |
| | | ///<para>1:绑定场景</para> |
| | | /// </summary> |
| | | public int BindType; |
| | | /// <summary> |
| | | /// 绑定的cluster,需要控制设备的OutCluster列表中存在该cluster。 |
| | | ///如绑定某个设备的on/off,为6。 |
| | | /// </summary> |
| | | public int BindCluster; |
| | | /// <summary> |
| | | /// 绑定设备Mac地址, 当BindType=0时存在 |
| | | /// </summary> |
| | | public string BindMacAddr; |
| | | /// <summary> |
| | | /// 绑定设备的端口号,当BindType=0时存在 |
| | | /// </summary> |
| | | public int BindEpoint; |
| | | /// <summary> |
| | | /// 绑定场景,当BindType=1时存在 |
| | | /// </summary> |
| | | public int BindScenesId; |
| | | } |
| | | #endregion |
| | | |
| | | #region 解除绑定 |
| | | |
| | | /// <summary> |
| | | ///解除绑定数据,网关反馈信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class DelDeviceBindResponseAllData : ErrorResponCommon |
| | | { |
| | | /// <summary> |
| | | /// 解除绑定数据信息 |
| | | /// </summary> |
| | | public DelDeviceBindResponseData delDeviceBindResponseData; |
| | | |
| | | /// <summary> |
| | | /// 解除绑定按键确认数据信息 |
| | | /// </summary> |
| | | public RemoveBindResultResponseData removeBindResultResponseData; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 解除绑定数据 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class DelDeviceBindResponseData |
| | | { |
| | | /// <summary> |
| | | ///绑定列表 ,当Status=0时存在 |
| | | /// </summary> |
| | | public List<RemoveBindListResponseObj> RemoveBindList = new List<RemoveBindListResponseObj>(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 移除设备绑定的信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class RemoveBindListResponseObj : BindListResponseObj |
| | | { |
| | | /// <summary> |
| | | /// 0:移除成功(该状态只适用用于跨网关绑定、绑定场景、失效设备(设备已经从网关的设备列表中删除)。同网关设备间的解除绑定需要节点设备的确认成功信息,不会直接反馈成功。) |
| | | ///<para>1:失败,设备不在绑定列表中</para> |
| | | ///<para>3:失败,在等待节点设备确认是否解除绑定成功(当网关还在等待某节点设备确认是否解除绑定成功的反馈信息时,客户端再次发送解除绑定该节点设备的指令,将反馈该状态。)</para> |
| | | ///<para>2:未知,由节点设备反馈发送“Bind/RemoveBindResult”主题消息确定是否成功。</para> |
| | | /// </summary> |
| | | public int Result; |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 移除设备绑定按键确认的信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class RemoveBindResultResponseData |
| | | { |
| | | /// <summary> |
| | | ///绑定结果 |
| | | ///<para>0:成功</para> |
| | | ///<para>136:控制设备本地绑定列表中无此绑定</para> |
| | | ///<para>其他:失败</para> |
| | | /// </summary> |
| | | public int Result; |
| | | |
| | | /// <summary> |
| | | /// 绑定设备Mac地址 |
| | | /// </summary> |
| | | public string BindMacAddr; |
| | | /// <summary> |
| | | /// 绑定设备的端口号 |
| | | /// </summary> |
| | | public int BindEpoint; |
| | | /// <summary> |
| | | /// 绑定的cluster |
| | | /// </summary> |
| | | public int BindCluster; |
| | | /// <summary> |
| | | /// 绑定设备名称 |
| | | /// </summary> |
| | | public string DeviceName; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 解除绑定数据 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class DelDeviceBindData |
| | | { |
| | | /// <summary> |
| | | /// 控制设备节点的mac地址 |
| | | /// </summary> |
| | | public string DeviceAddr; |
| | | /// <summary> |
| | | /// 错误信息 |
| | | /// </summary> |
| | | public int Epoint; |
| | | /// <summary> |
| | | ///绑定列表 ,当Status=0时存在 |
| | | /// </summary> |
| | | public List<RemoveBindListObj> RemoveBindList = new List<RemoveBindListObj>(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 移除设备绑定的信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class RemoveBindListObj |
| | | { |
| | | |
| | | /// <summary> |
| | | /// 绑定类型 |
| | | ///<para>0:移除设备 </para> |
| | | ///<para>1:移除场景</para> |
| | | /// </summary> |
| | | public int BindType; |
| | | /// <summary> |
| | | /// 绑定的cluster |
| | | /// </summary> |
| | | public int BindCluster; |
| | | /// <summary> |
| | | /// 绑定设备Mac地址, 当BindType=0时存在 |
| | | /// </summary> |
| | | public string BindMacAddr; |
| | | /// <summary> |
| | | /// 绑定设备的端口号,当BindType=0时存在 |
| | | /// </summary> |
| | | public int BindEpoint; |
| | | /// <summary> |
| | | /// 绑定场景,当BindType=1时存在 |
| | | /// </summary> |
| | | public int BindScenesId; |
| | | } |
| | | #endregion |
| | | |
| | | #region (从网关中)获取所有绑定 |
| | | |
| | | /// <summary> |
| | | ///获取所有绑定数据,网关反馈信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class GetDeviceBindResponseAllData : ErrorResponCommon |
| | | { |
| | | /// <summary> |
| | | /// 控制设备绑定的设备列表回复数据 |
| | | /// </summary> |
| | | public GetDeviceBindResponseData getAllBindResponseData; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取所有绑定回复的数据 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class GetDeviceBindResponseData |
| | | { |
| | | /// <summary> |
| | | /// 0:成功 |
| | | ///<para>1:绑定不存在</para> |
| | | /// </summary> |
| | | public int Result; |
| | | /// <summary> |
| | | /// 绑定列表 ,当Status=0时存在。 |
| | | /// </summary> |
| | | public List<BindListResponseObj> BindList = new List<BindListResponseObj>(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取所有绑定的信息 |
| | | /// </summary> |
| | | public class BindListResponseObj |
| | | { |
| | | /// <summary> |
| | | /// 绑定类型 |
| | | ///<para>0:同网关设备</para> |
| | | ///<para>1:跨网关设备间</para> |
| | | ///<para>2:场景</para> |
| | | /// </summary> |
| | | public int BindType; |
| | | /// <summary> |
| | | /// 绑定的cluster |
| | | /// </summary> |
| | | public int BindCluster; |
| | | /// <summary> |
| | | /// 绑定设备Mac地址, 当BindType=0时存在 |
| | | /// </summary> |
| | | public string BindMacAddr; |
| | | /// <summary> |
| | | /// 绑定设备的端口号,当BindType=0时存在 |
| | | /// </summary> |
| | | public int BindEpoint; |
| | | /// <summary> |
| | | /// 绑定场景,当BindType=1时存在 |
| | | /// </summary> |
| | | public int BindScenesId; |
| | | /// <summary> |
| | | /// 绑定的设备或场景名称 |
| | | /// </summary> |
| | | public string ESName; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取所有绑定的信息 |
| | | /// </summary> |
| | | public class BindListAllInfo |
| | | { |
| | | /// <summary> |
| | | /// 控制源设备Mac地址 |
| | | /// </summary> |
| | | public string KeyMacAddr; |
| | | /// <summary> |
| | | /// 控制源设备的端口号 |
| | | /// </summary> |
| | | public int KeyEpoint; |
| | | /// <summary> |
| | | /// 绑定类型 |
| | | ///<para>0:同网关设备</para> |
| | | ///<para>1:跨网关设备间</para> |
| | | ///<para>2:场景</para> |
| | | /// </summary> |
| | | public int BindType; |
| | | /// <summary> |
| | | /// 绑定的cluster |
| | | /// </summary> |
| | | public int BindCluster; |
| | | /// <summary> |
| | | /// 绑定设备Mac地址, 当BindType=0时存在 |
| | | /// </summary> |
| | | public string BindMacAddr; |
| | | /// <summary> |
| | | /// 绑定设备的端口号,当BindType=0时存在 |
| | | /// </summary> |
| | | public int BindEpoint; |
| | | /// <summary> |
| | | /// 绑定场景,当BindType=1时存在 |
| | | /// </summary> |
| | | public int BindScenesId; |
| | | /// <summary> |
| | | /// 绑定的设备或场景名称 |
| | | /// </summary> |
| | | public string ESName; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取面板绑定回复的数据【通过mac获取的回复] |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class GetPanelBindResponseDataByMac |
| | | { |
| | | /// <summary> |
| | | /// 0:成功 |
| | | ///<para>1:绑定不存在</para> |
| | | /// </summary> |
| | | public int Result; |
| | | /// <summary> |
| | | /// MaxNumItems |
| | | /// </summary> |
| | | public int MaxNumItems; |
| | | /// <summary> |
| | | /// StartIndex |
| | | /// </summary> |
| | | public int StartIndex; |
| | | /// <summary> |
| | | /// ReturnBindNum |
| | | /// </summary> |
| | | public int ReturnBindNum; |
| | | /// <summary> |
| | | /// 绑定列表 ,当Status=0时存在。 |
| | | /// </summary> |
| | | public List<BindDeviceByMacObj> BindList = new List<BindDeviceByMacObj>(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取面板绑定回复的数据【通过mac获取的回复] |
| | | /// </summary> |
| | | public class BindDeviceByMacObj |
| | | { |
| | | /// <summary> |
| | | /// ControllerEpoint |
| | | /// </summary> |
| | | public int ControllerEpoint; |
| | | /// <summary> |
| | | /// 绑定的cluster |
| | | /// </summary> |
| | | public int BindCluster; |
| | | /// <summary> |
| | | /// 绑定设备Mac地址, 当BindType=0时存在 |
| | | /// </summary> |
| | | public string BindMacAddr; |
| | | /// <summary> |
| | | /// 绑定设备的端口号,当BindType=0时存在 |
| | | /// </summary> |
| | | public int BindEpoint; |
| | | /// <summary> |
| | | /// BindMode |
| | | /// </summary> |
| | | public int BindMode; |
| | | } |
| | | #endregion |
| | | |
| | | #region 从节点设备本地记录读取绑定列表信息 |
| | | |
| | | /// <summary> |
| | | ///从节点设备本地记录读取绑定列表信息回复的数据,网关反馈信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class GetDeviceLocalBindResponseAllData : ErrorResponCommon |
| | | { |
| | | /// <summary> |
| | | /// 从节点设备本地记录读取绑定列表信息回复的数据 |
| | | /// </summary> |
| | | public GetDeviceLocalBindResponseData getDeviceLocalBindResponseData; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 从节点设备本地记录读取绑定列表信息回复的数据 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class GetDeviceLocalBindResponseData |
| | | { |
| | | /// <summary> |
| | | /// 0:成功 |
| | | ///<para>181:失败</para> |
| | | /// </summary> |
| | | public int Result; |
| | | /// <summary> |
| | | /// 该设备一共有多少个绑定列表 |
| | | /// </summary> |
| | | public int MaxNumItems; |
| | | /// <summary> |
| | | ///开始索引号 |
| | | /// </summary> |
| | | public int StartIndex; |
| | | /// <summary> |
| | | /// 该次读取返回绑定列表个数 |
| | | /// </summary> |
| | | public int ReturnBindNum;
|
| | | /// <summary> |
| | | /// 绑定列表,当Result=0时存在 |
| | | /// </summary> |
| | | public List<BindDeviceLocalListResponseObj> BindList = new List<BindDeviceLocalListResponseObj>(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 从节点设备本地记录读取绑定列表的信息 |
| | | /// </summary> |
| | | public class BindDeviceLocalListResponseObj |
| | | { |
| | | /// <summary> |
| | | /// 绑定类型 |
| | | ///<para>0x01:绑定组(暂没用到组绑定,可忽略)</para> |
| | | ///<para>0x03:绑定设备</para> |
| | | /// </summary> |
| | | public int BindMode; |
| | | /// <summary> |
| | | /// 控制设备的端口号 |
| | | /// </summary> |
| | | public int ControllerEpoint; |
| | | /// <summary> |
| | | /// 绑定的cluster |
| | | /// </summary> |
| | | public int BindCluster; |
| | | /// <summary> |
| | | /// 绑定的组(暂没用到组绑定,可忽略)。当BindMode为1时存在 |
| | | /// </summary> |
| | | public int GroupId; |
| | | /// <summary> |
| | | /// 绑定设备Mac地址, 当BindMode为3时存在 |
| | | /// </summary> |
| | | public string BindMacAddr; |
| | | /// <summary> |
| | | /// 绑定设备的端口号,当BindMode 为3时存在 |
| | | /// </summary> |
| | | public int BindEpoint; |
| | | } |
| | | #endregion |
| | | |
| | | #region 删除一个控制设备所有绑定信息 |
| | | |
| | | /// <summary> |
| | | ///删除一个控制设备所有绑定数据,网关反馈信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class ClearBindInfoResponseAllData : ErrorResponCommon |
| | | { |
| | | /// <summary> |
| | | /// 控制设备绑定的设备列表回复数据 |
| | | /// </summary> |
| | | public ClearBindInfoResponseData clearBindInfoResponseData; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 删除一个控制设备所有绑定信息回复的数据 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class ClearBindInfoResponseData |
| | | { |
| | | /// <summary> |
| | | /// 0:成功 |
| | | ///<para>1:绑定信息不存在</para> |
| | | /// </summary> |
| | | public int Result; |
| | | } |
| | | |
| | | #endregion |
| | | } |
| | | } |