| | |
| | | /// 空调目标 |
| | | /// </summary> |
| | | AC = 5, |
| | | /// <summary> |
| | | /// 地暖目标 |
| | | /// </summary> |
| | | Fh = 6, |
| | | } |
| | | |
| | | #endregion |
| | |
| | | case BindType.FreshAir: |
| | | foreach (var deviceKeys in curRoom.ListDevice) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(deviceKeys); |
| | | var device = HdlDeviceCommonLogic.Current.GetDevice(deviceKeys); |
| | | if (device != null) |
| | | { |
| | | if (BindInfo.checkRealFreshAirDevice(device) == false) |
| | |
| | | curRoomDeviceListTemp = GetMatchHumiditySensorDevice(curRoom); |
| | | foreach (var deviceKeys in curRoom.ListDevice) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(deviceKeys); |
| | | var device = HdlDeviceCommonLogic.Current.GetDevice(deviceKeys); |
| | | if (device != null) |
| | | { |
| | | if (device.Type == DeviceType.FreshAirHumiditySensor) |
| | |
| | | case BindType.PM: |
| | | foreach (var deviceKeys in curRoom.ListDevice) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(deviceKeys); |
| | | var device = HdlDeviceCommonLogic.Current.GetDevice(deviceKeys); |
| | | if (device != null) |
| | | { |
| | | if (device.Type == DeviceType.PMSensor) |
| | |
| | | case BindType.AC: |
| | | foreach (var deviceKeys in curRoom.ListDevice) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(deviceKeys); |
| | | var device = HdlDeviceCommonLogic.Current.GetDevice(deviceKeys); |
| | | if (device != null) |
| | | { |
| | | if (device.Type == DeviceType.Thermostat) |
| | |
| | | List<CommonDevice> roomIncludeMatchTempDevice = new List<CommonDevice>(); |
| | | foreach (var de in room.ListDevice) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(de); |
| | | var device = HdlDeviceCommonLogic.Current.GetDevice(de); |
| | | if (device != null) |
| | | { |
| | | //电池设备不支持绑定 |
| | |
| | | if (device.Type == DeviceType.TemperatureSensor) |
| | | { |
| | | var dev = device as TemperatureSensor; |
| | | if (BindInfo.checkRealTemperatureDevice(device) == false) |
| | | { |
| | | continue; |
| | | } |
| | | if (dev.SensorDiv == 1) |
| | | { |
| | | roomIncludeMatchTempDevice.Add(device); |
| | |
| | | List<CommonDevice> roomIncludeMatchHumpDevice = new List<CommonDevice>(); |
| | | foreach (var de in room.ListDevice) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(de); |
| | | var device = HdlDeviceCommonLogic.Current.GetDevice(de); |
| | | if (device != null) |
| | | { |
| | | //电池设备不支持绑定 |
| | |
| | | if (device.Type == DeviceType.TemperatureSensor) |
| | | { |
| | | var dev = device as TemperatureSensor; |
| | | if (BindInfo.checkRealTemperatureDevice(device) == false) |
| | | { |
| | | continue; |
| | | } |
| | | if (dev.SensorDiv == 2) |
| | | { |
| | | roomIncludeMatchHumpDevice.Add(device); |
| | |
| | | case BindInfo.BindType.FreshAir: |
| | | foreach (var de in room.ListDevice) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(de); |
| | | var device = HdlDeviceCommonLogic.Current.GetDevice(de); |
| | | if (device != null) |
| | | { |
| | | if (BindInfo.checkRealFreshAirDevice(device) == false) |
| | |
| | | roomIncludeMatchDevice = GetMatchHumiditySensorDevice(room); |
| | | foreach (var de in room.ListDevice) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(de); |
| | | var device = HdlDeviceCommonLogic.Current.GetDevice(de); |
| | | if (device != null) |
| | | { |
| | | if (device.Type == DeviceType.FreshAirHumiditySensor) |
| | |
| | | case BindInfo.BindType.PM: |
| | | foreach (var de in room.ListDevice) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(de); |
| | | var device = HdlDeviceCommonLogic.Current.GetDevice(de); |
| | | if (device != null) |
| | | { |
| | | if (device.Type == DeviceType.PMSensor) |
| | |
| | | case BindInfo.BindType.AC: |
| | | foreach (var de in room.ListDevice) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(de); |
| | | var device = HdlDeviceCommonLogic.Current.GetDevice(de); |
| | | if (device != null) |
| | | { |
| | | if (device.Type == DeviceType.Thermostat) |
| | |
| | | List<CommonDevice> UndistributeCommonDeviceListTemp = new List<CommonDevice>(); |
| | | |
| | | //获取本地设备列表 |
| | | foreach (var tempDev in Shared.Common.LocalDevice.Current.listAllDevice) |
| | | foreach (var tempDev in HdlDeviceCommonLogic.Current.listAllDevice) |
| | | { |
| | | //获取设备所属房间 |
| | | var tempDevRoom = HdlRoomLogic.Current.GetRoomByDevice(tempDev); |
| | |
| | | } |
| | | foreach (var deviceKeys in r.ListDevice) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(deviceKeys); |
| | | var device = HdlDeviceCommonLogic.Current.GetDevice(deviceKeys); |
| | | if (device != null) |
| | | { |
| | | if (BindInfo.checkRealFreshAirDevice(device) == false) |
| | |
| | | } |
| | | foreach (var deviceKeys in r.ListDevice) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(deviceKeys); |
| | | var device = HdlDeviceCommonLogic.Current.GetDevice(deviceKeys); |
| | | if (device != null) |
| | | { |
| | | if (device.Type == DeviceType.FreshAirHumiditySensor) |
| | |
| | | } |
| | | foreach (var deviceKeys in r.ListDevice) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(deviceKeys); |
| | | var device = HdlDeviceCommonLogic.Current.GetDevice(deviceKeys); |
| | | if (device != null) |
| | | { |
| | | if (device.Type == DeviceType.PMSensor) |
| | |
| | | } |
| | | foreach (var deviceKeys in r.ListDevice) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(deviceKeys); |
| | | var device = HdlDeviceCommonLogic.Current.GetDevice(deviceKeys); |
| | | if (device != null) |
| | | { |
| | | if (device.Type == DeviceType.Thermostat) |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 是否是真实的空调设备 【部分是能绑定空调的设备】 |
| | | /// 是否是真实的空调设备 【过滤server端】 |
| | | /// </summary> |
| | | /// <param name="device"></param> |
| | | /// <returns></returns> |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 是否是真实的新风设备 【部分是能绑定新风的设备】 |
| | | /// 是否是真实的新风设备 【过滤server端】 |
| | | /// </summary> |
| | | /// <param name="device"></param> |
| | | /// <returns></returns> |
| | |
| | | { |
| | | bool result = true; |
| | | //获取设备类型的 |
| | | var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device }); |
| | | if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir) |
| | | { |
| | | result = false; |
| | | } |
| | | if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_SimpleEnvironment) |
| | | var clu = device.OutClusterList.Find((obj) => obj.OutCluster == 514); |
| | | if (clu != null) |
| | | { |
| | | result = false; |
| | | } |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 检测该设备能否显示 |
| | | /// 是否是真实的温度设备 【过滤server端】 |
| | | /// </summary> |
| | | /// <param name="device"></param> |
| | | /// <returns></returns> |
| | | public static bool checkRealTemperatureDevice(CommonDevice device) |
| | | { |
| | | bool result = true; |
| | | //获取设备属于【简约多功能面板】 |
| | | var deviceEnumInfo = HdlDeviceCommonLogic.Current.GetMyDeviceEnumInfo(new List<CommonDevice> { device }); |
| | | if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleMultifunction) |
| | | { |
| | | if (device.Type == DeviceType.TemperatureSensor && device.DeviceEpoint == 1) |
| | | { |
| | | //简约多功能面板第1回路是一个绑定温湿度传感器第类型,不是真的温湿度的传感器,需要屏蔽掉 |
| | | result = false; |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 检测该设备能否显示【过滤server端】 |
| | | /// </summary> |
| | | /// <param name="device"></param> |
| | | /// <returns></returns> |
| | |
| | | } |
| | | foreach (var deviceKeys in room.ListDevice) |
| | | { |
| | | var device = Common.LocalDevice.Current.GetDevice(deviceKeys); |
| | | var device = HdlDeviceCommonLogic.Current.GetDevice(deviceKeys); |
| | | //检测该设备能否显示 |
| | | if (CheckCanShowDevice(device, curDeviceBindType) == false) |
| | | { |