| | |
| | | * @return |
| | | */ |
| | | public static void parseAlarmAndState(byte[] bs, int index, AlarmVo vo){ |
| | | byte b = bs[index] ; |
| | | byte b = bs[index + 1] ; |
| | | vo.statePump = (byte)(b & 0x1) ; |
| | | vo.alarmWaterRemain = (byte)(b >> 1 & 1) ; |
| | | vo.alarm0WaterRemain = (byte)(b >> 2 & 1) ; |
| | |
| | | vo.alarmWaterMeterBreak = (byte)(b >> 6 & 1) ; |
| | | vo.alarmEleMeterFault = (byte)(b >> 7 & 1) ; |
| | | |
| | | index++ ; |
| | | b = bs[index] ; |
| | | vo.alarm0MoneyRemain = (byte)(b & 0x1) ; |
| | | vo.alarmInnerDoor = (byte)(b >> 1 & 1) ; |
| | |
| | | cdData.elePrice = elePrice/100.0D; |
| | | |
| | | index += 2 ; |
| | | GlParse.parseAlarmAndState(bs, index, cdData) ; |
| | | GlParse.parseAlarmAndState(bs, index, cdData) ;//四个字节 |
| | | |
| | | index += 2 ; |
| | | index += 4 ; |
| | | int aVolt = ByteUtil.BCD2Int_LE(bs, index, index + 1) ; |
| | | cdData.aVolt = aVolt/10.0D; |
| | | |
| | |
| | | cdData.thisDuration = ByteUtil.BCD2Int_LE(bs, index, index + 1) ; |
| | | |
| | | index += 2 ; |
| | | GlParse.parseAlarmAndState(bs, index, cdData) ; |
| | | GlParse.parseAlarmAndState(bs, index, cdData) ;//四个字节 |
| | | } |
| | | /** |
| | | * 分析功能93、A3数据 |
| | |
| | | cdData.thisDuration = ByteUtil.BCD2Int_LE(bs, index, index + 1) ; |
| | | |
| | | index += 2 ; |
| | | GlParse.parseAlarmAndState(bs, index, cdData) ; |
| | | GlParse.parseAlarmAndState(bs, index, cdData) ;//四个字节 |
| | | } |
| | | } |