From 307e554fb2ef6491d08afc58a6c0a852f44b4f46 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 01 十二月 2020 17:04:50 +0800
Subject: [PATCH] 2020-12-01-1
---
HDL_ON/Entity/Function/Function.cs | 36 +++++++++++++++++-------------------
1 files changed, 17 insertions(+), 19 deletions(-)
diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index a602940..be61b11 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -1,5 +1,6 @@
锘縰sing System;
using System.Collections.Generic;
+using HDL_ON.DriverLayer;
using Shared;
namespace HDL_ON.Entity
@@ -255,24 +256,24 @@
public AprotocolControlObj GetControlSendData(Dictionary<string, string> commandDictionary)
{
var sendDataObj = new AprotocolControlObj();
- sendDataObj.from_oid = "";
- sendDataObj.to_oid = "";
- sendDataObj.time_stamp = "";
- sendDataObj.type = "device_sid";
- sendDataObj.command = "write";
+ sendDataObj.id = Control.Ins.msg_id.ToString();
+ sendDataObj.time_stamp = Control.Ins.Get_TimeStamp();
- var acoList = new AprotocolControlData();
- acoList.sid = sid;
- var aco = new AprotocolControlAttribute();
+
+ var acd = new AprotocolControlData();
+ acd.sid = sid;
+#if DEBUG
+ acd.sid = "0001016FB925AB02020100010101";
+#endif
+ var aca = new AprotocolControlAttribute();
foreach(var dic in commandDictionary)
{
- aco.name = dic.Key;
- aco.value = dic.Value;
- acoList.function.Add(aco);
+ aca.key = dic.Key;
+ aca.value = dic.Value;
+ acd.status.Add(aca);
}
- sendDataObj.objects.Add(acoList);
-
+ sendDataObj.objects.Add(acd);
return sendDataObj;
}
@@ -285,11 +286,8 @@
{
public List<AprotocolControlData> objects = new List<AprotocolControlData>();
- public string from_oid = "";
- public string to_oid = "";
public string time_stamp = "";
- public string type = "";
- public string command = "";
+ public string id = "";
}
/// <summary>
/// A鍗忚鎺у埗鏁版嵁
@@ -298,14 +296,14 @@
{
public string sid = "";
- public List<AprotocolControlAttribute> function = new List<AprotocolControlAttribute>();
+ public List<AprotocolControlAttribute> status = new List<AprotocolControlAttribute>();
}
/// <summary>
/// A鍗忚鎺у埗灞炴�у璞�
/// </summary>
public class AprotocolControlAttribute
{
- public string name;
+ public string key;
public string value;
}
--
Gitblit v1.8.0