package com.example.agvcontroller.protocol; import java.io.Serializable; /** * 路径包 - 路径点 * Created by vincent on 2023/3/14 */ //@Data public class AgvActionItem implements Serializable { private static final long serialVersionUID = -6988765550778795176L; // 地面码 private String qrCode; // 动作码 // private AgvActionCmdType actionCmdType; // 属性值 private int val; // 动作参数 private T actionBody; public AgvActionItem() { } // public AgvActionItem(Class clazz) { // try { // actionBody = clazz.newInstance(); // } catch (Exception e) { // e.printStackTrace(); // } // this.actionCmdType = AgvActionCmdType.find(actionBody.getClass()); // if (null == actionCmdType) { // throw new CoolException(clazz.getName() + "检索 AgvActionCmdType 枚举失败"); // } // } public AgvActionItem setQrCode(String qrCode) { this.qrCode = qrCode; return this; } // public AgvActionItem setActionCmdType(AgvActionCmdType actionCmdType) { // this.actionCmdType = actionCmdType; // return this; // } public AgvActionItem setVal(int val) { this.val = val; return this; } public AgvActionItem bodySync(DataSupport dataSupport) { dataSupport.sync(this.actionBody); return this; } }