|  |  |  | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public static void parseAlarmAndState(byte[] bs, int index, AlarmVo vo){ | 
|---|
|  |  |  | byte b = bs[index + 1] ; | 
|---|
|  |  |  | byte b = bs[index] ; | 
|---|
|  |  |  | 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) ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | b = bs[index] ; | 
|---|
|  |  |  | b = bs[index + 1] ; | 
|---|
|  |  |  | vo.alarm0MoneyRemain = (byte)(b & 0x1) ; | 
|---|
|  |  |  | vo.alarmInnerDoor = (byte)(b >> 1 & 1) ; | 
|---|
|  |  |  | vo.alarmOuterDoor = (byte)(b >> 2 & 1) ; | 
|---|
|  |  |  | 
|---|
|  |  |  | index += 8 ; | 
|---|
|  |  |  | cdData.startDt  = GlParse.parseRtuDt(bs, index) ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if(cdData.opResult == (byte)0x81){ | 
|---|
|  |  |  | //失败了,下面就没有数据了 | 
|---|
|  |  |  | return ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | index += 6 ; | 
|---|
|  |  |  | cdData.endDt  = GlParse.parseRtuDt(bs, index) ; | 
|---|
|  |  |  |  | 
|---|