| | |
| | | package com.example.agvcontroller.protocol; |
| | | |
| | | |
| | | import com.example.agvcontroller.socket.RadixTools; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * Created by vincent on 2023/3/15 |
| | | */ |
| | | public class AGV_F0_UP implements IMessageBody, Serializable { |
| | | |
| | | private static final long serialVersionUID = 8403019742104020004L; |
| | | private static final long serialVersionUID = -5588066188890649095L; |
| | | |
| | | @Override |
| | | public byte[] writeToBytes() { |
| | |
| | | |
| | | @Override |
| | | public void readFromBytes(byte[] bytes) { |
| | | this.password = ""; |
| | | this.carType = 0; |
| | | this.baseVersion = ""; |
| | | this.bothData = ""; |
| | | this.softwareVersion = ""; |
| | | this.optData = ""; |
| | | this.totalTime = 0; |
| | | this.totalDistance = 0; |
| | | this.batteryType = 0; |
| | | this.maxChargeCurrent = 0; |
| | | this.batteryVoltage = 0; |
| | | this.remainingBattery = 0; |
| | | this.soh = 0; |
| | | this.groundCode = ""; |
| | | this.qrCode = ""; |
| | | this.offsetX = 0; |
| | | this.offsetY = 0; |
| | | this.groundCodeOffset0 = 0; |
| | | this.status = 0; |
| | | this.faultFlag = 0; |
| | | this.intrusionCount = 0; |
| | | this.spareSpaceCount = 0; |
| | | // password |
| | | this.password = RadixTools.bytesToHexStr(Utils.sliceWithReverse(bytes, 0, 4)); |
| | | // type |
| | | this.type = Utils.sliceWithReverse(bytes, 4, 1)[0]; |
| | | |
| | | |
| | | } |
| | | |
| | | @Override |
| | |
| | | return ""; |
| | | } |
| | | |
| | | // 密码 |
| | | private String password; |
| | | |
| | | // 设备类型 |
| | | private int carType; |
| | | |
| | | // 硬件版本 |
| | | private String baseVersion; |
| | | |
| | | // 出厂日期 |
| | | private String bothData; |
| | | |
| | | // 软件版本 |
| | | private String softwareVersion; |
| | | |
| | | // 发布日期 |
| | | private String optData; |
| | | |
| | | // 累计工作时间 |
| | | private int totalTime; |
| | | |
| | | // 累计行走距离 |
| | | private int totalDistance; |
| | | // 电池类型 |
| | | private int batteryType; |
| | | |
| | | // 最大充电电流 |
| | | private int maxChargeCurrent; |
| | | |
| | | // 电池电压 |
| | | private int batteryVoltage; |
| | | |
| | | // 剩余电量 |
| | | private int remainingBattery; |
| | | |
| | | // soh |
| | | private int soh; |
| | | |
| | | // 地面码 |
| | | private String groundCode; |
| | | |
| | | //地面码ID |
| | | private String qrCode; |
| | | |
| | | //地面码偏移x |
| | | private int offsetX; |
| | | |
| | | //地面码偏移y |
| | | private int offsetY; |
| | | |
| | | //地面码偏移θ |
| | | private int groundCodeOffset0; |
| | | |
| | | //当前状态 |
| | | private int status; |
| | | |
| | | // 故障标志 |
| | | private int faultFlag; |
| | | |
| | | // 入侵检测次数 |
| | | private int intrusionCount; |
| | | |
| | | // 暂存货位数量 |
| | | private int spareSpaceCount; |
| | | |
| | | |
| | | |
| | | |
| | | private byte type; |
| | | |
| | | } |
| | | |