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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
package com.iailab.netsdk.lib.enumeration;
 
 
/**
 * @author 260611
 * @description 雷达操作类型
 * @date 2022/08/04 10:13:33
 */
public enum EM_RADAR_OPERATE_TYPE {
    /**
     * 雷达开始升级通知,入参:NET_IN_RADAR_STARTUPGRADE,出参:NET_OUT_RADAR_STARTUPGRADE
     */
    EM_RADAR_OPERATE_TYPE_STARTUPGRADE(0, "雷达开始升级通知,入参:NET_IN_RADAR_STARTUPGRADE,出参:NET_OUT_RADAR_STARTUPGRADE"),
    /**
     * 获取雷达能力,入参:NET_IN_RADAR_GETCAPS,出参:NET_OUT_RADAR_GETCAPS
     */
    EM_RADAR_OPERATE_TYPE_GETCAPS(1, "获取雷达能力,入参:NET_IN_RADAR_GETCAPS,出参:NET_OUT_RADAR_GETCAPS"),
    /**
     * 获取雷达状态,入参:NET_IN_RADAR_GETSTATUS,出参:NET_OUT_RADAR_GETSTATUS
     */
    EM_RADAR_OPERATE_TYPE_GETSTATUS(2, "获取雷达状态,入参:NET_IN_RADAR_GETSTATUS,出参:NET_OUT_RADAR_GETSTATUS"),
    /**
     * 计算图片对应的地图实际长度,入参:NET_IN_RADAR_CALCULATEREALSIZE,出参:NET_OUT_RADAR_CALCULATEREALSIZE
     */
    EM_RADAR_OPERATE_TYPE_CALCULATEREALSIZE(3, "计算图片对应的地图实际长度,入参:NET_IN_RADAR_CALCULATEREALSIZE,出参:NET_OUT_RADAR_CALCULATEREALSIZE"),
    /**
     * 雷球校准配置下发,入参:NET_IN_RADAR_SETCALIBRATION,出参:NET_OUT_RADAR_SETCALIBRATION
     */
    EM_RADAR_OPERATE_TYPE_SETCALIBRATION(4, "雷球校准配置下发,入参:NET_IN_RADAR_SETCALIBRATION,出参:NET_OUT_RADAR_SETCALIBRATION");
 
    private int value;
 
    private String note;
 
    public String getNote() {
        return note;
    }
 
    public int getValue() {
        return value;
    }
 
    EM_RADAR_OPERATE_TYPE(int givenValue, String note) {
        this.value = givenValue;
        this.note = note;
    }
 
    public static String getNoteByValue(int givenValue) {
        for (EM_RADAR_OPERATE_TYPE enumType : EM_RADAR_OPERATE_TYPE.values()) {
            if (givenValue == enumType.getValue()) {
                return enumType.getNote();
            }
        }
        return null;
    }
 
    public static int getValueByNote(String givenNote) {
        for (EM_RADAR_OPERATE_TYPE enumType : EM_RADAR_OPERATE_TYPE.values()) {
            if (givenNote.equals(enumType.getNote())) {
                return enumType.getValue();
            }
        }
        return -1;
    }
 
    public static EM_RADAR_OPERATE_TYPE getEnum(int value) {
        for (EM_RADAR_OPERATE_TYPE e : EM_RADAR_OPERATE_TYPE.values()) {
            if (e.getValue() == value)
                return e;
        }
        return EM_RADAR_OPERATE_TYPE.EM_RADAR_OPERATE_TYPE_STARTUPGRADE;
    }
 
}