From dd3fecc3a8b92b377febfcf92d32ec22a07724f6 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期日, 26 九月 2021 15:21:57 +0800
Subject: [PATCH] 主从网关属性,防挤下线账号删除
---
HDL_ON/Entity/FunctionList.cs | 35 +++++++++++++++--------------------
1 files changed, 15 insertions(+), 20 deletions(-)
diff --git a/HDL_ON/Entity/FunctionList.cs b/HDL_ON/Entity/FunctionList.cs
index 707c057..aee9ad3 100644
--- a/HDL_ON/Entity/FunctionList.cs
+++ b/HDL_ON/Entity/FunctionList.cs
@@ -5,6 +5,7 @@
using HDL_ON.Common;
using HDL_ON.DAL;
using HDL_ON.DAL.Server;
+using HDL_ON.DriverLayer;
using Shared;
namespace HDL_ON.Entity
@@ -127,7 +128,7 @@
/// </summary>
public List<Function> GetEnvirSensorsList()
{
- var spkList = SPK.EnvironSpkList();
+ var spkList = SPK.EnvironDeviceSpkList();
return Functions.FindAll((obj) => spkList.Contains(obj.spk));
}
/// <summary>
@@ -174,6 +175,7 @@
/// </summary>
public List<SecurityAlarm> securities = new List<SecurityAlarm>();
+
/// <summary>
/// 鍔犺浇鍔熻兘鍒楄〃
/// </summary>
@@ -184,7 +186,6 @@
/// <para>false:鐩存帴鏃犳潯浠舵坊鍔�</para></param>
public void IniFunctionList(string filePath, bool checkRepeat = false)
{
- MainPage.Log("鍒濆鍖栧姛鑳芥暟鎹�");
// todo 澧炲姞璁惧锛屽鍔犲姛鑳借繘鍔熻兘鍒楄〃
if (filePath.StartsWith("FunctionData_"))
{
@@ -414,24 +415,18 @@
{
foreach (var function in GetDeviceFunctionList(SPK.BrandType.Hdl))
{
- switch (function.Spk_Prefix)
- {
- case FunctionCategory.Music:
- case FunctionCategory.DryContact:
- continue;
- }
- DriverLayer.Control.Ins.SendReadCommand(function);
- //switch (function.Spk_Prefix)
- //{
- // case FunctionCategory.Light:
- // case FunctionCategory.Electric:
- // case FunctionCategory.Curtain:
- // case FunctionCategory.AC:
- // case FunctionCategory.FloorHeat:
- // case FunctionCategory.Sensor:
- // DriverLayer.Control.Ins.SendReadCommand(function);
- // break;
- //}
+ Control.Ins.SendReadCommand(function);
+ }
+ if(DB_ResidenceData.Instance.GatewayType == 1)
+ {
+ Dictionary<string, string> pairs = new Dictionary<string, string>();
+ string sendId = Control.Ins.msg_id.ToString();
+ pairs.Add("id", sendId);
+ pairs.Add("time_stamp", Utlis.GetTimestamp());
+ var readSecurityStatusJson = Newtonsoft.Json.JsonConvert.SerializeObject(pairs);
+ var sendBytes = Control.Ins.ConvertSendBodyData(CommunicationTopic.ct.ReadSecurityStatus, readSecurityStatusJson);
+ MainPage.Log($"鏈湴閫氳 璇诲彇瀹夐槻鐘舵��:{readSecurityStatusJson}");
+ new Control_Udp().SendLocalHdlLinkData(sendBytes, sendId);
}
}
else
--
Gitblit v1.8.0