| | |
| | | String controllerType = ByteUtil.bytes2Hex(bs, false, index, 1) ; |
| | | |
| | | index++ ; |
| | | Integer projectNo = 0 + bs[index]; |
| | | Integer projectNo = (int)bs[index]; |
| | | |
| | | index++ ; |
| | | byte hasRecord = bs[index]; |
| | |
| | | List<DataCd55Vo> list = new ArrayList<>() ; |
| | | DataCd55Vo vo = this.doParseData(bs, index, bsLen, controllerType, projectNo) ; |
| | | while(vo != null){ |
| | | index += 39 ; |
| | | index += 35 ; |
| | | list.add(vo) ; |
| | | vo = this.doParseData(bs, index, bsLen, controllerType, projectNo) ; |
| | | } |
| | |
| | | cdData.icCardNo = GlParse.parseIcCardNo(bs, index, 6, 2) ; |
| | | |
| | | index += 8 ; |
| | | int chargeMoney = ByteUtil.BCD2Int_BE(bs, index, index + 4) ; |
| | | Long chargeMoney = ByteUtil.BCD2Long_LE(bs, index, index + 4) ; |
| | | cdData.chargeMoney = chargeMoney/100.0D; |
| | | |
| | | index += 5 ; |
| | | int chargeWater = ByteUtil.BCD2Int_BE(bs, index, index + 4) ; |
| | | Long chargeWater = ByteUtil.BCD2Long_LE(bs, index, index + 4) ; |
| | | cdData.chargeWater = chargeWater/100.0D; |
| | | |
| | | index += 5 ; |
| | | cdData.flowNo = ByteUtil.BCD2String_BE(bs, index, index + 5) ; |
| | | cdData.flowNo = ByteUtil.BCD2String_LE(bs, index, index + 5) ; |
| | | |
| | | index += 6 ; |
| | | byte flag = bs[index] ; |
| | |
| | | } |
| | | |
| | | index += 1 ; |
| | | String ss = ByteUtil.BCD2String_BE(bs, index, index) ; |
| | | index++ ; |
| | | String mm = ByteUtil.BCD2String_BE(bs, index, index) ; |
| | | index++ ; |
| | | String HH = ByteUtil.BCD2String_BE(bs, index, index) ; |
| | | index++ ; |
| | | String dd = ByteUtil.BCD2String_BE(bs, index, index) ; |
| | | index++ ; |
| | | String MM = ByteUtil.BCD2String_BE(bs, index, index) ; |
| | | index++ ; |
| | | String yy = ByteUtil.BCD2String_BE(bs, index, index) ; |
| | | cdData.dt = "20" + yy + "-" + MM + "-" + dd + " " + HH + ":" + mm + ":" + ss ; |
| | | cdData.dt = GlParse.parseRtuDt(bs, index) ; |
| | | |
| | | return cdData ; |
| | | }else{ |