| | |
| | | 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<DataCd5CVo> list = new ArrayList<>() ; |
| | | DataCd5CVo vo = this.doParseData(bs, index, bsLen, controllerType, projectNo) ; |
| | | while(vo != null){ |
| | | index += 39 ; |
| | | index += 16 ; |
| | | list.add(vo) ; |
| | | vo = this.doParseData(bs, index, bsLen, controllerType, projectNo) ; |
| | | } |
| | |
| | | String yy = ByteUtil.BCD2String_BE(bs, index, index) ; |
| | | cdData.dt = "20" + yy + "-" + MM + "-" + dd + " " + HH ; |
| | | |
| | | int meterAmountDay = ByteUtil.BCD2Int_BE(bs, index, index + 3) ; |
| | | Long meterAmountDay = ByteUtil.BCD2Long_LE(bs, index, index + 3) ; |
| | | cdData.meterAmountDay = meterAmountDay/100.0D; |
| | | |
| | | index += 4 ; |
| | | int farmerAmountDay = ByteUtil.BCD2Int_BE(bs, index, index + 3) ; |
| | | Long farmerAmountDay = ByteUtil.BCD2Long_LE(bs, index, index + 3) ; |
| | | cdData.farmerAmountDay = farmerAmountDay/100.0D; |
| | | |
| | | index += 4 ; |
| | | int lossAmountDay = ByteUtil.BCD2Int_BE(bs, index, index + 3) ; |
| | | Long lossAmountDay = ByteUtil.BCD2Long_LE(bs, index, index + 3) ; |
| | | cdData.lossAmountDay = lossAmountDay/100.0D; |
| | | |
| | | return cdData ; |