| | |
| | | dV1.subData = cdData ; |
| | | |
| | | short index = ProtocolConstantV206V1_0_0.dataIndex ; |
| | | //cdData.opType = bs[index] ; |
| | | cdData.opType = bs[index] ; |
| | | |
| | | //index++ ; |
| | | //cdData.cardType = bs[index] ; |
| | | index++ ; |
| | | cdData.cardType = bs[index] ; |
| | | |
| | | //index++ ; |
| | | //cdData.cardAddr = ByteUtil.bytes2Hex(bs, false, index, 4) ; |
| | | index++ ; |
| | | cdData.cardAddr = ByteUtil.bytes2Hex_LE(bs, false, index, 4) ; |
| | | |
| | | //index += 4 ; |
| | | index += 4 ; |
| | | //用水户号数据格式:5字节BCD码低位在前高位在后。 |
| | | cdData.cardNo = ByteUtil.BCD2String_LE(bs, index, index + 4) ; |
| | | |
| | | index += 5 ; |
| | | //用水户余额:用户余额4字节BCD码,取值范围0.00~999999.99,单位为元。 |
| | | cdData.remainMoney = 0.0D ; |
| | | int tpInt = ByteUtil.BCD2Int_LE(bs, index, index + 3) ; |
| | | cdData.remainMoney += tpInt/100.0 ; |
| | | cdData.remainMoney = tpInt/100.0 ; |
| | | |
| | | index += 4 ; |
| | | //累计流量:5字节BCD码,取值范围0~9999999999,单位为m3。 |
| | | cdData.totalAmount = 0.0D ; |
| | | tpInt = ByteUtil.BCD2Int_LE(bs, index, index + 4) ; |
| | | cdData.totalAmount += tpInt; |
| | | cdData.totalAmount = tpInt/100.0; |
| | | |
| | | index += 5 ; |
| | | //瞬时流量:5字节BCD码,取值范围0~9999999.999,单位为m3/h。 |
| | | cdData.instantAmount = 0.0D ; |
| | | tpInt = ByteUtil.BCD2Int_LE(bs, index, index + 4) ; |
| | | cdData.instantAmount += tpInt/1000.0 ; |
| | | cdData.instantAmount = tpInt/1000.0 ; |
| | | |
| | | index += 5 ; |
| | | cdData.alarmVo = GlParse.parseAlarm(bs, index) ; |