自动化立体仓库 - WCS系统
Junjie
2023-03-24 a2c563572181cf54946020db619b6867f11f088a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package com.zy.core.enums;
 
/**
 * 四向穿梭车
 * Wm207  PLC输入状态
 */
public enum ShuttlePlcInputStatusType {
 
    LIFT_STATUS(Byte.parseByte("6"), "托盘顶部传感器状态")
    ;
 
    public byte id;
    public String desc;
 
    ShuttlePlcInputStatusType(byte id, String desc) {
        this.id = id;
        this.desc = desc;
    }
 
    public static ShuttlePlcInputStatusType get(byte id) {
        for (ShuttlePlcInputStatusType type : ShuttlePlcInputStatusType.values()) {
            if (type.id == id) {
                return type;
            }
        }
        return null;
    }
 
    public static ShuttlePlcInputStatusType get(ShuttlePlcInputStatusType type) {
        if (null == type) {
            return null;
        }
        for (ShuttlePlcInputStatusType shuttlePlcInputStatusType : ShuttlePlcInputStatusType.values()) {
            if (shuttlePlcInputStatusType == type) {
                return shuttlePlcInputStatusType;
            }
        }
        return null;
    }
 
}