|
@@ -99,6 +99,49 @@ public class Constant {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public static void main(String[] args) {
|
|
|
+ System.out.println(AGV_POWER_CMD.getValueByCode("1"));
|
|
|
+ }
|
|
|
+
|
|
|
+ public enum AGV_POWER_CMD{
|
|
|
+ /***
|
|
|
+ * 一号堆垛车车号以及充电指令
|
|
|
+ */
|
|
|
+ First("1", "87CD0008000C00010071000663010001%04X"),
|
|
|
+
|
|
|
+ /***
|
|
|
+ * 二号堆垛车车号以及充电指令
|
|
|
+ */
|
|
|
+ second("2", "87CD000800080001007100046301%04X");
|
|
|
+
|
|
|
+ private String code;
|
|
|
+
|
|
|
+ private String value;
|
|
|
+
|
|
|
+ AGV_POWER_CMD(String code, String value) {
|
|
|
+ this.code = code;
|
|
|
+ this.value = value;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getCode() {
|
|
|
+ return code;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getValue() {
|
|
|
+ return value;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static String getValueByCode(String code) {
|
|
|
+ for (AGV_POWER_CMD agvPowerCmd : values()) {
|
|
|
+ if (agvPowerCmd.getCode().equals(code)) {
|
|
|
+ return agvPowerCmd.value;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 产线编号
|