wxr
2020-02-27 37c33341f75841dc39c535eb62a3603f596516a1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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
        */
 
        /// <summary>
        /// 当前功能分类行
        /// 如:空调类、灯光类、窗帘类
        /// </summary>
        public FunctionType functionCategory
        {
            get
            {
                var functionType = sid.Substring(22, 2);//截取23,24字符获取控制的设备的类型
                return (FunctionType)Enum.ToObject(typeof(FunctionType), Convert.ToInt32(functionType));
            }
        }
        /// <summary>
        /// 功能ID
        /// </summary>
        public string sid = "1234121234567890123456FF00010001";
        /// <summary>
        /// 备注
        /// </summary>
        public string name;
        /// <summary>
        /// A协议数据格式
        /// </summary>
        public string a_Protocol_Namespace = "HDL";
        /// <summary>
        /// A协议功能的通行
        /// 如:是AC功能:特性包含:Switch/mode/fan/temperature
        /// </summary>
        public string trait = "";
 
 
    }
}