using System; namespace HDL_ON.Entity { public class A_Protocol_FunctionInfo { /* HDL统一协议格式:16bytes 厂商代号:2bytes 通讯方式:有线/无线/ZIGBEE等1bytes 产品识别码:以添加设备的年月日时分秒 + 随机数8bytes Category 功能类别:1bytes 数据表索引地址:2bytes 回路:2bytes 举例: 0001-00-201910120900002567-01-0001-0001 */ /// /// 当前功能分类行 /// 如:空调类、灯光类、窗帘类 /// public FunctionType functionCategory { get { var functionType = sid.Substring(22, 2);//截取23,24字符获取控制的设备的类型 return (FunctionType)Enum.ToObject(typeof(FunctionType), Convert.ToInt32(functionType)); } } /// /// 功能ID /// public string sid = "1234121234567890123456FF00010001"; /// /// 备注 /// public string name; /// /// A协议数据格式 /// public string a_Protocol_Namespace = "HDL"; /// /// A协议功能的通行 /// 如:是AC功能:特性包含:Switch/mode/fan/temperature /// public string trait = ""; } }