old mode 100644
new mode 100755
| | |
| | | /// </summary> |
| | | /// <param name="common">Common.</param> |
| | | /// <param name="objecttype">Objecttype.</param> |
| | | public static void AddDeviceconditions(CommonDevice common, Dictionary<string, string> objecttype) |
| | | public static void AddDeviceconditions(CommonDevice common, Dictionary<string, string> objecttype) |
| | | { |
| | | for (int i = 0; i < Common.Logic.CurrentLogic.Conditions.Count; i++) |
| | | { |
| | |
| | | Common.Logic.CurrentLogic.Conditions.Insert(i, objecttype); |
| | | return; |
| | | } |
| | | |
| | | } |
| | | else if (common.Type == DeviceType.IASZone) |
| | | { |
| | | var iASZonedevice = common as IASZone; |
| | | if (iASZonedevice.ModelIdentifier == "MSPIRB-ZB.10") |
| | | {//球形移动传感器 |
| | | if (Common.Logic.CurrentLogic.Conditions[i]["Cluster_ID"] == objecttype["Cluster_ID"]) |
| | | { |
| | | Common.Logic.CurrentLogic.Conditions.RemoveAt(i); |
| | | Common.Logic.CurrentLogic.Conditions.Insert(i, objecttype); |
| | | return; |
| | | } |
| | | continue; |
| | | } |
| | | |
| | | Common.Logic.CurrentLogic.Conditions.RemoveAt(i); |
| | | Common.Logic.CurrentLogic.Conditions.Insert(i, objecttype); |
| | | return; |
| | | |
| | | } |
| | | else |
| | |
| | | Common.Logic.CurrentLogic.Conditions.Add(objecttype); |
| | | } |
| | | #endregion |
| | | |
| | | #region ----逻辑输出目标---- |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | /// <param name="common">Common.</param> |
| | | /// <param name="actionsInfo">Objecttype.</param> |
| | | public static void AddDeviceactions(ZigBee.Device.CommonDevice common, Dictionary<string, object> actionsInfo) |
| | | public static void AddDeviceActions(ZigBee.Device.CommonDevice common, Dictionary<string, object> actionsInfo) |
| | | { |
| | | for (int i = 0; i < Common.Logic.CurrentLogic.Actions.Count; i++) |
| | | { |
| | | if (Common.Logic.CurrentLogic.Actions[i]["LinkType"].ToString() == "0") |
| | | { |
| | | if (Common.Logic.CurrentLogic.Actions[i]["DeviceAddr"].ToString() == common.DeviceAddr && Common.Logic.CurrentLogic.Actions[i]["Epoint"].ToString() == common.DeviceEpoint.ToString()) |
| | | { |
| | | Common.Logic.CurrentLogic.Actions.RemoveAt(i); |
| | | Common.Logic.CurrentLogic.Actions.Insert(i, actionsInfo); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | Common.Logic.CurrentLogic.Actions.Add(actionsInfo); |
| | | } |
| | | /// <summary> |
| | | /// 添加门锁设备输出的方法 |
| | | /// </summary> |
| | | /// <param name="common">Common.</param> |
| | | /// <param name="actionsInfo">Objecttype.</param> |
| | | public static void AddDoorLockActions(ZigBee.Device.CommonDevice common, Dictionary<string, object> actionsInfo) |
| | | { |
| | | for (int i = 0; i < Common.Logic.CurrentLogic.Actions.Count; i++) |
| | | { |
| | | if (Common.Logic.CurrentLogic.Actions[i]["LinkType"].ToString() == "8") |
| | | { |
| | | if (Common.Logic.CurrentLogic.Actions[i]["DeviceAddr"].ToString() == common.DeviceAddr && Common.Logic.CurrentLogic.Actions[i]["Epoint"].ToString() =="200") |
| | | { |
| | | Common.Logic.CurrentLogic.Actions.RemoveAt(i); |
| | | Common.Logic.CurrentLogic.Actions.Insert(i, actionsInfo); |
| | |
| | | /// <summary> |
| | | /// 添加安防输出的方法 |
| | | /// </summary> |
| | | /// <param name="objecttype">Objecttype.</param> |
| | | /// <param name="o">O.</param> |
| | | /// <param name="actionsInfo">actionsInfo.</param> |
| | | public static void AddSecurityactions(Dictionary<string, object> actionsInfo) |
| | | { |
| | | for (int i = 0; i < Common.Logic.CurrentLogic.Actions.Count; i++) |
| | |
| | | /// <summary> |
| | | /// 添加自动化输出的方法 |
| | | /// </summary> |
| | | /// <param name="objecttype">Objecttype.</param> |
| | | /// <param name="o">O.</param> |
| | | /// <param name="actionsInfo">Objecttype.</param> |
| | | /// <param name="logic">logic</param> |
| | | public static void AddLogicactions(Common.Logic logic, Dictionary<string, object> actionsInfo) |
| | | { |
| | | |