| | |
| | | /// <summary> |
| | | /// 拼接、获取A协议操作数据 |
| | | /// </summary> |
| | | public override JObject GetSendJObject(string command) |
| | | public override JObject GetSendJObject(CommandType_A command) |
| | | { |
| | | var sendJob = new JObject(); |
| | | if (command == "write") |
| | | if (command == CommandType_A.write) |
| | | { |
| | | |
| | | sendJob = new JObject { { "vendor_code", vendor_code }, { "Command", command }, { "Type", "device" } }; |
| | | sendJob = new JObject { { "vendor_code", vendor_code }, { "Command", command.ToString() }, { "Type", "device" } }; |
| | | JObject data = null; |
| | | switch (functionType) |
| | | { |
| | |
| | | } |
| | | sendJob.Add("objects", data); |
| | | } |
| | | else if (command == "read") |
| | | else if (command == CommandType_A.read) |
| | | { |
| | | sendJob = new JObject { { "vendor_code", vendor_code }, { "Command", command }, { "Type", "device" } }; |
| | | sendJob = new JObject { { "vendor_code", vendor_code }, { "Command", command.ToString() }, { "Type", "device" } }; |
| | | var data = new JObject { { "sid", sid } }; |
| | | sendJob.Add("objects", data); |
| | | } |