| | |
| | | // } |
| | | // } |
| | | |
| | | |
| | | /** |
| | | * 获取干接点传感器模块状态 |
| | | * @param info |
| | | */ |
| | | public static void getDryContactSensorStateFromNetwork(final AppliancesInfo info) { |
| | | if (info == null) { |
| | | return; |
| | | } |
| | | HDLDeviceManager.isGetDeviceStateSuccess = false; |
| | | switch (info.getDeviceType()) { |
| | | case HDLApConfig.TYPE_SENSOR_DRY_CONTACT: |
| | | case HDLApConfig.TYPE_SENSOR_MOVEMENT_DETECTOR: |
| | | case HDLApConfig.TYPE_SENSOR_TEMP: |
| | | case HDLApConfig.TYPE_SENSOR_HUMIDITY: |
| | | case HDLApConfig.TYPE_SENSOR_ILLUMINACE: |
| | | case HDLApConfig.TYPE_SENSOR_VOC: |
| | | case HDLApConfig.TYPE_SENSOR_PM_2_POINT_5: |
| | | case HDLApConfig.TYPE_SENSOR_C02: |
| | | case HDLApConfig.TYPE_SENSOR_LPG: |
| | | case HDLApConfig.TYPE_SENSOR_CO_H2: |
| | | case HDLApConfig.TYPE_SENSOR_CH4: |
| | | case HDLApConfig.TYPE_SENSOR_SMOG: |
| | | case HDLApConfig.TYPE_SENSOR_WIND_SPEED: |
| | | case HDLApConfig.TYPE_SENSOR_WIND_PRESSURE: |
| | | case HDLApConfig.TYPE_SENSOR_LIQUID_FLOW: |
| | | case HDLApConfig.TYPE_SENSOR_LIQUID_PRESSURE: |
| | | case HDLApConfig.TYPE_SENSOR_LIQUID_DEPTH: |
| | | case HDLApConfig.TYPE_SENSOR_RAIN_FALL: |
| | | case HDLApConfig.TYPE_SENSOR_WEIGHT: |
| | | case HDLApConfig.TYPE_SENSOR_HEIGHT_LENGTH: |
| | | case HDLApConfig.TYPE_SENSOR_OBJECT_SPEED: |
| | | case HDLApConfig.TYPE_SENSOR_SHAKE: |
| | | case HDLApConfig.TYPE_SENSOR_VOLTAGE: |
| | | case HDLApConfig.TYPE_SENSOR_ELECTRICITY: |
| | | case HDLApConfig.TYPE_SENSOR_POWER: |
| | | case HDLApConfig.TYPE_SENSOR_FLOODING: |
| | | case HDLApConfig.TYPE_SENSOR_DOOR_MAGNET: |
| | | case HDLApConfig.TYPE_SENSOR_EMERGENCY_BUTTON: |
| | | //发送获传感器模块状态数据 |
| | | byte[] sendDatabyte = new byte[]{ |
| | | (byte) 1, |
| | | (byte) info.getChannelNum() |
| | | }; |
| | | |
| | | addSendData(info, sendDatabyte, Configuration.STATE); |
| | | break; |
| | | default: |
| | | HDLLog.info("不是传感器模块"); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | } |