package cn.iocoder.yudao.module.system.enums.robot;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 下发给车机的类型
 */
@Getter
@AllArgsConstructor
public enum CommandTypeEnum {
    MOVE_POSES_AND_FORK("MOVE_POSES_AND_FORK","移动且降叉"),
    MOVE_POSES("MOVE_POSES","移动"),
    MOVE_POSE("MOVE_POSE","移动"),
    JOY_AGV("JOY_AGV","遥感AGV移动"),
    JOY_FORK("JOY_FORK","遥控货叉上下移动"),
    SHUT_DOWN("SHUT_DOWN","关机"),
    RESTART("RESTART","重启"),
    STOP("STOP","停止"),
    START("START","启动"),
    WAIT("WAIT","等待"),
    GET_PALLET_TOPIC("GET_PALLET_TOPIC","获取托盘位置"),
    MOVE_TO_PALLET_POSE("MOVE_TO_PALLET_POSE","移动到取货终点"),
    FORK("FORK","控制货叉上下移动");
    /**
     * 类型
     */
    private final String type;
    /**
     * 说明
     */
    private final String msg;

    public static CommandTypeEnum getCommandType(String type) {
        for (CommandTypeEnum item : CommandTypeEnum.values()) {
            if (item.getType().equals(type)) {
                return item;
            }
        }
        return null;
    }

}
