| | |
| | | // } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取干接点传感器模块状态 |
| | | * |
| | | * @param info |
| | | */ |
| | | public static void getSensorStateFromNetwork(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) info.getBigType(), |
| | | (byte) info.getLittleType(), |
| | | (byte) info.getChannelNum() |
| | | }; |
| | | |
| | | addSendData(info, sendDatabyte, Configuration.STATE); |
| | | break; |
| | | // 下面的都是用干节点指令 |
| | | case HDLApConfig.TYPE_SENSOR_DRY_CONTACT: //干节点 |
| | | case HDLApConfig.TYPE_SENSOR_MOVEMENT_DETECTOR: //红外感应传感器 |
| | | case HDLApConfig.TYPE_SENSOR_CO_H2: //煤气传感器 |
| | | case HDLApConfig.TYPE_SENSOR_SMOG: //烟雾传感器 |
| | | case HDLApConfig.TYPE_SENSOR_FLOODING: //水浸传感器 |
| | | case HDLApConfig.TYPE_SENSOR_DOOR_MAGNET: //门磁传感器 |
| | | case HDLApConfig.TYPE_SENSOR_EMERGENCY_BUTTON://紧急按钮 |
| | | //发送获传感器模块 干节点状态数据 |
| | | byte[] sendDatabyte2 = new byte[]{ |
| | | (byte) 1, |
| | | (byte) info.getChannelNum() |
| | | }; |
| | | addSendData(info, sendDatabyte2, Configuration.STATE); |
| | | break; |
| | | default: |
| | | HDLLog.info("不是传感器模块"); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取干接点传感器模块状态 |
| | | * |