From b1ced15165c0c120483f821079fc23c63d455e8e Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期五, 05 三月 2021 17:54:49 +0800
Subject: [PATCH] 2021-3-5-1
---
HDL_ON/DAL/DriverLayer/Control_Udp.cs | 58 +++++++++++++++++++++++++++++-----------------------------
1 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/HDL_ON/DAL/DriverLayer/Control_Udp.cs b/HDL_ON/DAL/DriverLayer/Control_Udp.cs
index 5789606..507f1c1 100644
--- a/HDL_ON/DAL/DriverLayer/Control_Udp.cs
+++ b/HDL_ON/DAL/DriverLayer/Control_Udp.cs
@@ -156,35 +156,7 @@
/// </summary>
public void ControlBusScenes(Scene scene)
{
- if (Control.Ins.IsRemote)
- {
- foreach (var f in scene.functions)
- {
- var count = 0;
- List<ApiAlinkControlActionObj> actionObjs = new List<ApiAlinkControlActionObj>();
- Dictionary<string, string> d = new Dictionary<string, string>();
- var pm = new DAL.Server.HttpServerRequest();
- foreach (var temp in f.status)
- {
- if (f.localFunction == null)
- {
- continue;
- }
- d.Add(temp.key, temp.value);
- var apiControlData = f.localFunction.GetApiControlData(d);
- actionObjs.Add(apiControlData);
- count++;
- if (count > 9)
- {
- var result = pm.ControlDevice(actionObjs);
- actionObjs = new List<ApiAlinkControlActionObj>();
- count = 0;
- }
- }
- var pack = pm.ControlDevice(actionObjs);
- }
- }
- else
+ if(Control.Ins.GatewayOnline_Local)
{
foreach (var f in scene.functions)
{
@@ -332,6 +304,34 @@
}
}
}
+ else
+ {
+ foreach (var f in scene.functions)
+ {
+ var count = 0;
+ List<ApiAlinkControlActionObj> actionObjs = new List<ApiAlinkControlActionObj>();
+ Dictionary<string, string> d = new Dictionary<string, string>();
+ var pm = new DAL.Server.HttpServerRequest();
+ foreach (var temp in f.status)
+ {
+ if (f.localFunction == null)
+ {
+ continue;
+ }
+ d.Add(temp.key, temp.value);
+ var apiControlData = f.localFunction.GetApiControlData(d);
+ actionObjs.Add(apiControlData);
+ count++;
+ if (count > 9)
+ {
+ var result = pm.ControlDevice(actionObjs);
+ actionObjs = new List<ApiAlinkControlActionObj>();
+ count = 0;
+ }
+ }
+ var pack = pm.ControlDevice(actionObjs);
+ }
+ }
}
/// <summary>
--
Gitblit v1.8.0