using System;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
namespace HDL_ON.Entity
{
public class Light : Function
{
public Light()
{
bus_DeviceType = "Relay";
}
///
/// 开关状态
/// 0:关
/// 1:开
///
public int state = 0;
public List PropertyArray = new List();
///
/// 拼接、获取A协议操作数据
///
public override JObject GetSendJObject(string command )
{
var sendJob = new JObject();
if (command == "write")
{
sendJob = new JObject { { "Namespace", a_Protocol_Namespace }, { "Command", command }, { "Type", "device" } };
var data = new JObject { { "Switch", state }, { "sid", sid } };
sendJob.Add("objects", data);
return sendJob;
}
else if(command == "read")
{
}
return sendJob;
}
}
}