dengzedong
2024-12-19 85b2001c0ec2f1adc598db3bf47ad457dcca7074
提交 | 用户 | 时间
149dd0 1 package com.iailab.netsdk.lib.enumeration;
H 2
3
4 /**
5  * @author 260611
6  * @description 雷达操作类型
7  * @date 2022/08/04 10:13:33
8  */
9 public enum EM_RADAR_OPERATE_TYPE {
10     /**
11      * 雷达开始升级通知,入参:NET_IN_RADAR_STARTUPGRADE,出参:NET_OUT_RADAR_STARTUPGRADE
12      */
13     EM_RADAR_OPERATE_TYPE_STARTUPGRADE(0, "雷达开始升级通知,入参:NET_IN_RADAR_STARTUPGRADE,出参:NET_OUT_RADAR_STARTUPGRADE"),
14     /**
15      * 获取雷达能力,入参:NET_IN_RADAR_GETCAPS,出参:NET_OUT_RADAR_GETCAPS
16      */
17     EM_RADAR_OPERATE_TYPE_GETCAPS(1, "获取雷达能力,入参:NET_IN_RADAR_GETCAPS,出参:NET_OUT_RADAR_GETCAPS"),
18     /**
19      * 获取雷达状态,入参:NET_IN_RADAR_GETSTATUS,出参:NET_OUT_RADAR_GETSTATUS
20      */
21     EM_RADAR_OPERATE_TYPE_GETSTATUS(2, "获取雷达状态,入参:NET_IN_RADAR_GETSTATUS,出参:NET_OUT_RADAR_GETSTATUS"),
22     /**
23      * 计算图片对应的地图实际长度,入参:NET_IN_RADAR_CALCULATEREALSIZE,出参:NET_OUT_RADAR_CALCULATEREALSIZE
24      */
25     EM_RADAR_OPERATE_TYPE_CALCULATEREALSIZE(3, "计算图片对应的地图实际长度,入参:NET_IN_RADAR_CALCULATEREALSIZE,出参:NET_OUT_RADAR_CALCULATEREALSIZE"),
26     /**
27      * 雷球校准配置下发,入参:NET_IN_RADAR_SETCALIBRATION,出参:NET_OUT_RADAR_SETCALIBRATION
28      */
29     EM_RADAR_OPERATE_TYPE_SETCALIBRATION(4, "雷球校准配置下发,入参:NET_IN_RADAR_SETCALIBRATION,出参:NET_OUT_RADAR_SETCALIBRATION");
30
31     private int value;
32
33     private String note;
34
35     public String getNote() {
36         return note;
37     }
38
39     public int getValue() {
40         return value;
41     }
42
43     EM_RADAR_OPERATE_TYPE(int givenValue, String note) {
44         this.value = givenValue;
45         this.note = note;
46     }
47
48     public static String getNoteByValue(int givenValue) {
49         for (EM_RADAR_OPERATE_TYPE enumType : EM_RADAR_OPERATE_TYPE.values()) {
50             if (givenValue == enumType.getValue()) {
51                 return enumType.getNote();
52             }
53         }
54         return null;
55     }
56
57     public static int getValueByNote(String givenNote) {
58         for (EM_RADAR_OPERATE_TYPE enumType : EM_RADAR_OPERATE_TYPE.values()) {
59             if (givenNote.equals(enumType.getNote())) {
60                 return enumType.getValue();
61             }
62         }
63         return -1;
64     }
65
66     public static EM_RADAR_OPERATE_TYPE getEnum(int value) {
67         for (EM_RADAR_OPERATE_TYPE e : EM_RADAR_OPERATE_TYPE.values()) {
68             if (e.getValue() == value)
69                 return e;
70         }
71         return EM_RADAR_OPERATE_TYPE.EM_RADAR_OPERATE_TYPE_STARTUPGRADE;
72     }
73
74 }