| | |
| | | package com.dy.common.mw.protocol.p206V1_0_0.parse.global; |
| | | |
| | | import com.dy.common.mw.protocol.p206V1_0_0.DataAlarmVo; |
| | | import com.dy.common.mw.protocol.p206V1_0_0.DataStateVo; |
| | | import com.dy.common.mw.protocol.p206V1_0_0.upVos.DataAlarmVo; |
| | | import com.dy.common.mw.protocol.p206V1_0_0.upVos.DataStateVo; |
| | | import com.dy.common.util.ByteUtil; |
| | | import org.apache.logging.log4j.LogManager; |
| | | import org.apache.logging.log4j.Logger; |
| | |
| | | DataAlarmVo avo = new DataAlarmVo() ; |
| | | byte b = bs[index] ; |
| | | index++ ; |
| | | avo.batteryVolt = (byte)(b & 0x2) ; |
| | | avo.loss = (byte)(b & 0x8) ; |
| | | avo.meter = (byte)(b & 0x20) ; |
| | | avo.batteryVolt = (byte)(b & 0x2 >> 1) ; |
| | | avo.loss = (byte)(b & 0x8 >> 3) ; |
| | | avo.meter = (byte)(b & 0x20 >> 5) ; |
| | | |
| | | b = bs[index] ; |
| | | avo.valve = (byte)(b & 0x20) ; |
| | | avo.valve = (byte)(b & 0x20 >> 5) ; |
| | | return avo ; |
| | | } |
| | | |
| | |
| | | DataStateVo avo = new DataStateVo() ; |
| | | byte b = bs[index] ; |
| | | index++ ; |
| | | avo.icCard = (byte)(b & 0x4) ; |
| | | avo.working = (byte)(b & 0x8) ; |
| | | avo.valve = (byte)(b & 0x20) ; |
| | | avo.icCard = (byte)(b & 0x4 >> 2) ; |
| | | avo.working = (byte)(b & 0x8 >> 3) ; |
| | | avo.valve = (byte)(b & 0x20 >> 5) ; |
| | | return avo ; |
| | | } |
| | | |