wxr
2020-09-11 8df24b0a3dfd5b6f39c5393ef24eab25b70ab858
HDL_ON/Entity/Function/AC.cs
@@ -1,8 +1,5 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using Shared;
namespace HDL_ON.Entity
{
@@ -258,7 +255,6 @@
            }
        }
        Trait _trait_swting;
        [Newtonsoft.Json.JsonIgnore]
        public Trait trait_swting
@@ -387,37 +383,6 @@
                }
            }
        }
        /// <summary>
        /// 拼接、获取A协议操作数据
        /// </summary>
        public override JObject GetSendJObject(CommandType_A command)
        {
            var sendJob = new JObject();
            if (command == CommandType_A.write)
            {
                sendJob = new JObject { { "Namespace", vendor_code }, { "Command", command.ToString() }, { "Type", "device" } };
                JObject data = new JObject { { "sid", sid } };
                sendJob.Add("objects", data);
                List<ControlData> controlData = new List<ControlData>();
                controlData.Add(new ControlData()
                {
                    name = "on_off",
                    data_type = "Bool",
                    value = trait_on_off.value.ToString()
                });
            }
            else if (command == CommandType_A.read)
            {
                sendJob = new JObject { { "Namespace", vendor_code }, { "Command", command.ToString() }, { "Type", "device" } };
                var data = new JObject { { "sid", sid } };
                sendJob.Add("objects", data);
            }
            return sendJob;
        }
    }
}