提交 | 用户 | 时间
|
149dd0
|
1 |
package com.iailab.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
/** |
|
4 |
* @author 251823 |
|
5 |
* @description 灯光模式 |
|
6 |
* @date 2023/05/23 09:40:10 |
|
7 |
*/ |
|
8 |
public enum EM_CFG_LC_MODE { |
|
9 |
/** |
|
10 |
* 未知 |
|
11 |
*/ |
|
12 |
EM_CFG_LC_MODE_UNKNOWN(0, "未知"), |
|
13 |
/** |
|
14 |
* 手动 |
|
15 |
*/ |
|
16 |
EM_CFG_LC_MODE_MANUAL(1, "手动"), |
|
17 |
/** |
|
18 |
* 倍率优先 |
|
19 |
*/ |
|
20 |
EM_CFG_LC_MODE_ZOOMPRIO(2, "倍率优先"), |
|
21 |
/** |
|
22 |
* 定时(废弃) |
|
23 |
*/ |
|
24 |
EM_CFG_LC_MODE_TIMING(3, "定时(废弃)"), |
|
25 |
/** |
|
26 |
* 自动 |
|
27 |
*/ |
|
28 |
EM_CFG_LC_MODE_AUTO(4, "自动"), |
|
29 |
/** |
|
30 |
* 关闭灯光 |
|
31 |
*/ |
|
32 |
EM_CFG_LC_MODE_OFF(5, "关闭灯光"), |
|
33 |
/** |
|
34 |
* 支持多种灯光(废弃) |
|
35 |
*/ |
|
36 |
EM_CFG_LC_MODE_EXCLUSIVEMANUAL(6, "支持多种灯光(废弃)"), |
|
37 |
/** |
|
38 |
* 智能灯光(废弃) |
|
39 |
*/ |
|
40 |
EM_CFG_LC_MODE_SMARTLIGHT(7, "智能灯光(废弃)"), |
|
41 |
/** |
|
42 |
* 事件联动(废弃) |
|
43 |
*/ |
|
44 |
EM_CFG_LC_MODE_LINKING(8, "事件联动(废弃)"), |
|
45 |
/** |
|
46 |
* 光敏 |
|
47 |
*/ |
|
48 |
EM_CFG_LC_MODE_DUSKTODAWN(9, "光敏"), |
|
49 |
/** |
|
50 |
* 强制打开灯光 |
|
51 |
*/ |
|
52 |
EM_CFG_LC_MODE_FORCEON(10, "强制打开灯光"); |
|
53 |
|
|
54 |
private int value; |
|
55 |
|
|
56 |
private String note; |
|
57 |
|
|
58 |
public String getNote() { |
|
59 |
return note; |
|
60 |
} |
|
61 |
|
|
62 |
public int getValue() { |
|
63 |
return value; |
|
64 |
} |
|
65 |
|
|
66 |
EM_CFG_LC_MODE(int givenValue, String note) { |
|
67 |
this.value = givenValue; |
|
68 |
this.note = note; |
|
69 |
} |
|
70 |
|
|
71 |
public static String getNoteByValue(int givenValue) { |
|
72 |
for (EM_CFG_LC_MODE enumType : EM_CFG_LC_MODE.values()) { |
|
73 |
if (givenValue == enumType.getValue()) { |
|
74 |
return enumType.getNote(); |
|
75 |
} |
|
76 |
} |
|
77 |
return null; |
|
78 |
} |
|
79 |
|
|
80 |
public static int getValueByNote(String givenNote) { |
|
81 |
for (EM_CFG_LC_MODE enumType : EM_CFG_LC_MODE.values()) { |
|
82 |
if (givenNote.equals(enumType.getNote())) { |
|
83 |
return enumType.getValue(); |
|
84 |
} |
|
85 |
} |
|
86 |
return -1; |
|
87 |
} |
|
88 |
} |