package me.zhengjie.modules.security.config.enums;

/**
 * PrintInfo 状态
 */
public enum PrintInfoStatusEnum {

    SDCP_PRINT_STATUS_DEFAULT(-1, "默认/断开"),
    SDCP_PRINT_STATUS_IDLE(0, "空闲"),
    SDCP_PRINT_STATUS_HOMING(1,"归零中"),
    SDCP_PRINT_STATUS_DROPPING(2,"下降中"),
    SDCP_PRINT_STATUS_EXPOSURING(3,"曝光中"),
    SDCP_PRINT_STATUS_LIFTING(4,"抬升中"),
    SDCP_PRINT_STATUS_PAUSING(5,"正在执行暂停动作中"),
    SDCP_PRINT_STATUS_PAUSED(6,"已暂停"),
    SDCP_PRINT_STATUS_STOPPING(7,"正在执行停止动作中"),
    SDCP_PRINT_STATUS_STOPED(8,"已停止"),
    SDCP_PRINT_STATUS_COMPLETE(9,"打印完成"),
    SDCP_PRINT_STATUS_FILE_CHECKING(10, "文件检测中"),
    SDCP_PRINT_STATUS_LIQUID(11, "加液中"),
    SDCP_PRINT_STATUS_SPADE(12, "铲件中"),
    ;

    private Integer code;
    private String text;

    PrintInfoStatusEnum(Integer code, String text) {
        this.code = code;
        this.text = text;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public static PrintInfoStatusEnum getEnumByNum(int value) {
        for (PrintInfoStatusEnum os : PrintInfoStatusEnum.values()) {
            if (value == os.getCode()) {
                return os;
            }
        }
        return null;
    }

}
