| | |
| | | */ |
| | | protected void doParse(byte[] bs, int bsLen, String dataCode, Data data) throws Exception { |
| | | DataV202404 dV1 = (DataV202404)data.getSubData() ; |
| | | DataCd83Vo cdData = new DataCd83Vo() ; |
| | | DataCd83Vo cdData = new DataCd83Vo(CodeV202404.getCodeName(dataCode)) ; |
| | | dV1.subData = cdData ; |
| | | int index = ProtocolConstantV206V202404.dataIndex ; |
| | | cdData.controllerType = ByteUtil.bytes2Hex(bs, false, index, 1) ; |
| | |
| | | cdData.projectNo = (int)bs[index]; |
| | | |
| | | index ++ ; |
| | | cdData.waterTotalAmountYear = ByteUtil.BCD2Int_BE(bs, index, index + 4)/100.0D ; |
| | | cdData.waterTotalAmountYear = ByteUtil.BCD2Long_LE(bs, index, index + 4)/100.0D ; |
| | | |
| | | index += 5 ; |
| | | cdData.waterTotalAmountMeter = ByteUtil.BCD2Int_BE(bs, index, index + 4)/100.0D ; |
| | | cdData.waterTotalAmountMeter = ByteUtil.BCD2Long_LE(bs, index, index + 4)/100.0D ; |
| | | |
| | | index += 5 ; |
| | | cdData.eleTotalAmountYear = ByteUtil.BCD2Int_BE(bs, index, index + 4)/100.0D ; |
| | | cdData.eleTotalAmountYear = ByteUtil.BCD2Long_LE(bs, index, index + 4)/100.0D ; |
| | | |
| | | index += 5 ; |
| | | cdData.eleTotalAmountMeter = ByteUtil.BCD2Int_BE(bs, index, index + 4)/100.0D ; |
| | | cdData.eleTotalAmountMeter = ByteUtil.BCD2Long_LE(bs, index, index + 4)/100.0D ; |
| | | |
| | | index += 5 ; |
| | | cdData.waterTotalAmountDay = ByteUtil.BCD2Int_BE(bs, index, index + 3)/100.0D ; |
| | | cdData.waterTotalAmountDay = ByteUtil.BCD2Long_LE(bs, index, index + 3)/100.0D ; |
| | | |
| | | index += 4 ; |
| | | cdData.waterUserTotalAmountDay = ByteUtil.BCD2Int_BE(bs, index, index + 3)/100.0D ; |
| | | cdData.waterUserTotalAmountDay = ByteUtil.BCD2Long_LE(bs, index, index + 3)/100.0D ; |
| | | |
| | | index += 4 ; |
| | | cdData.lossTotalAmountDay = ByteUtil.BCD2Int_BE(bs, index, index + 3)/100.0D ; |
| | | cdData.lossTotalAmountDay = ByteUtil.BCD2Long_LE(bs, index, index + 3)/100.0D ; |
| | | |
| | | index += 4 ; |
| | | cdData.batteryVolt = ByteUtil.BCD2Int_BE(bs, index, index + 1)/100.0D ; |
| | | cdData.batteryVolt = ByteUtil.BCD2Int_LE(bs, index, index + 1)/100.0D ; |
| | | |
| | | } |
| | | |