| | |
| | | package com.zy.acs.common.domain.protocol; |
| | | |
| | | import com.zy.acs.common.constant.CommonConstant; |
| | | import com.zy.acs.framework.common.RadixTools; |
| | | import com.zy.acs.common.utils.QrCodeCodecSupport; |
| | | import com.zy.acs.common.utils.Utils; |
| | | import lombok.Data; |
| | | |
| | |
| | | , (byte) this.faultLevel |
| | | , Utils.reverse(RadixTools.intToBytes(this.data1)) |
| | | , Utils.reverse(RadixTools.intToBytes(this.data2)) |
| | | , Utils.reverse(RadixTools.intToBytes(Integer.parseInt(this.qrCode))) |
| | | , QrCodeCodecSupport.encode(this.qrCode) |
| | | ); |
| | | } |
| | | |
| | |
| | | // //故障标志位 |
| | | // this.flag = RadixTools.bytesToInt(Utils.sliceWithReverse(bytes, 12, 4)); |
| | | //地面码ID |
| | | this.qrCode = Utils.zeroFill(String.valueOf(RadixTools.bytesToInt(Utils.sliceWithReverse(bytes, 12, 4))), CommonConstant.QR_CODE_LEN);; |
| | | this.qrCode = QrCodeCodecSupport.decode(bytes, 12); |
| | | |
| | | } |
| | | |