wxr
2020-06-09 77e7b5223dd04a6e036dc952efb38f2b770a6828
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
using System;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
 
namespace HDL_ON.Entity
{
 
    public class ControlData
    {
        /// <summary>
        /// 控制属性的名称
        /// </summary>
        public string name;
        /// <summary>
        /// 控制属性的类型
        /// </summary>
        public string data_type;
        /// <summary>
        /// 控制属性的值
        /// </summary>
        public string value;
    }
 
    public class FunctionControlData
    {
        public string sid = "";
 
        public List<ControlData> function;
 
    }
 
 
    public class AProtocolEntity
    {
        public List<object> objects = new List<object>();
        public string type;
        public string vendor_code;
        public string command;
 
 
        public void ControlFunction(string sid, List<ControlData> function)
        {
            var fcd = new FunctionControlData();
            fcd.sid = sid;
            fcd.function = function;
            objects.Add(fcd);
        }
    }
}