package com.zy.acs.common.enums;
|
|
import com.zy.acs.common.domain.protocol.ICommandBody;
|
import com.zy.acs.common.domain.protocol.command.*;
|
|
/**
|
*
|
*
|
*/
|
public enum AgvCommandType {
|
|
SHUTDOWN(0x00, "停止", ShutdownCommand.class),
|
|
START_UP(0x01, "启动", StartupCommand.class),
|
|
ENTER_STANDBY_MODE(0x40, "进入待机模式", EnterStandbyModeCommand.class),
|
|
EXIT_STANDBY_MODE(0x41, "退出待机模式", ExitStandbyModeCommand.class),
|
|
MACHINE_RESET(0x60, "整机复位", MachineResetCommand.class),
|
|
CAMERA_RESET(0x61, "相机复位", MachineResetCommand.class),
|
|
GYRO_RESET(0x62, "陀螺仪复位", GyroResetCommand.class),
|
|
CLEAR_PATH(0x65, "清空机器人缓存的所有路径", ClearPathCommand.class),
|
|
RETURN_ZERO_FORK(0x66, "货叉归零", ReturnZeroForkCommand.class),
|
|
RETURN_ZERO_LIFT(0x68, "升降归零", ReturnZeroLiftCommand.class),
|
|
QUERY_AGV_TEMP_BOX(0x7D, "扫描AGV暂存料箱并上报", QueryAgvTempBoxCommand.class),
|
|
ENTER_SCAN_MODE(0x7E, "进入扫描货架码和料箱码模式", EnterScanModeCommand.class),
|
|
EXIT_SCAN_MODE(0x7F, "退出描货架码和料箱码模式", ExitScanModeCommand.class),
|
|
ENTER_MANUAL_MODE(0x80, "进入手动模式", EnterManualModeCommand.class),
|
|
MANUAL_LIFT(0x81, "手动控制升降", ManualLiftCommand.class),
|
|
MANUAL_ROTATE(0x82, "手动控制旋转", ManualRotateCommand.class),
|
|
MANUAL_TELESCOPIC(0x83, "手动控制伸缩", ManualTelescopicCommand.class),
|
|
MANUAL_LEVER_OF_FRONT(0x84, "手动控制前拨杆", ManualLeverOfFrontCommand.class),
|
|
MANUAL_LEVER_OF_BACK(0x85, "手动控制后拨杆", ManualLeverOfBackCommand.class),
|
|
EXIT_MANUAL_MODE(0x8F, "退出手动模式", ExitManualModeCommand.class),
|
|
URGENT_STOP(0xF0, "紧急停车", UrgentStopCommand.class),
|
|
OUTAGE_POWER_ALL(0xF2, "所有电机断电", OutagePowerAllCommand.class),
|
|
LOC_ONE_OF_MOTOR(0xF3, "给某一个电机加锁", LockOneOfMotorCommand.class),
|
|
;
|
|
public int commandCode;
|
|
public String desc;
|
|
public Class<? extends ICommandBody> cls;
|
|
AgvCommandType(int commandCode, String desc, Class<? extends ICommandBody> cls) {
|
this.commandCode = commandCode;
|
this.desc = desc;
|
this.cls = cls;
|
}
|
|
public static AgvCommandType find(Class<? extends ICommandBody> cls) {
|
for (AgvCommandType value : AgvCommandType.values()) {
|
if (value.cls.equals(cls)) {
|
return value;
|
}
|
}
|
return null;
|
}
|
|
|
}
|