|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dy.common.mw.protocol.*; | 
|---|
|  |  |  | import com.dy.common.mw.protocol.p206V202404.*; | 
|---|
|  |  |  | import com.dy.common.mw.protocol.p206V202404.upVos.DataCd50Vo; | 
|---|
|  |  |  | import com.dy.common.mw.protocol.p206V202404.upVos.DataCd56Vo; | 
|---|
|  |  |  | import com.dy.common.util.ByteUtil; | 
|---|
|  |  |  | import com.dy.common.util.ByteUtilUnsigned; | 
|---|
|  |  |  | import org.apache.logging.log4j.LogManager; | 
|---|
|  |  |  | import org.apache.logging.log4j.Logger; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | protected void doParse(byte[] bs, int bsLen, String dataCode, Data data) throws Exception { | 
|---|
|  |  |  | DataV202404 dV1 = (DataV202404)data.getSubData() ; | 
|---|
|  |  |  | DataCd56Vo cdData = new DataCd56Vo() ; | 
|---|
|  |  |  | DataCd56Vo cdData = new DataCd56Vo(CodeV202404.getCodeName(dataCode)) ; | 
|---|
|  |  |  | dV1.subData = cdData ; | 
|---|
|  |  |  | int index = ProtocolConstantV206V202404.dataIndex ; | 
|---|
|  |  |  | cdData.controllerType = ByteUtil.bytes2Hex(bs, false, index, 1) ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | index++ ; | 
|---|
|  |  |  | cdData.projectNo = 0 + bs[index]; | 
|---|
|  |  |  | cdData.projectNo = (int)bs[index]; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | index++ ; | 
|---|
|  |  |  | cdData.waterAlarm = ByteUtilUnsigned.bytes2Short_BE(bs, index) ; | 
|---|
|  |  |  | cdData.waterAlarm = ByteUtil.BCD2Int_LE(bs, index, index + 1) ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | index += 2 ; | 
|---|
|  |  |  | cdData.moneyAlarm = ByteUtilUnsigned.bytes2Short_BE(bs, index) ; | 
|---|
|  |  |  | cdData.moneyAlarm = ByteUtil.BCD2Int_LE(bs, index, index + 1) ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|