| | |
| | | using HDL_ON.Common; |
| | | using HDL_ON.DAL; |
| | | using HDL_ON.DAL.Server; |
| | | using HDL_ON.DriverLayer; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.Entity |
| | |
| | | /// </summary> |
| | | public List<Function> GetEnvirSensorsList() |
| | | { |
| | | var spkList = SPK.EnvironSpkList(); |
| | | var spkList = SPK.EnvironDeviceSpkList(); |
| | | return Functions.FindAll((obj) => spkList.Contains(obj.spk)); |
| | | } |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | public List<SecurityAlarm> securities = new List<SecurityAlarm>(); |
| | | |
| | | |
| | | /// <summary> |
| | | /// 加载功能列表 |
| | | /// </summary> |
| | |
| | | /// <para>false:直接无条件添加</para></param> |
| | | public void IniFunctionList(string filePath, bool checkRepeat = false) |
| | | { |
| | | MainPage.Log("初始化功能数据"); |
| | | // todo 增加设备,增加功能进功能列表 |
| | | if (filePath.StartsWith("FunctionData_")) |
| | | { |
| | |
| | | // break; |
| | | //} |
| | | } |
| | | 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 |
| | | { |