提交 | 用户 | 时间
|
ce910c
|
1 |
package com.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
/** |
|
4 |
* @author 291189 |
|
5 |
* @description 区域防区操作方式 |
|
6 |
* @date 2022/07/19 10:09:08 |
|
7 |
*/ |
|
8 |
public enum EM_AREAARM_TRIGGERMODE { |
|
9 |
/** |
|
10 |
* 未知 |
|
11 |
*/ |
|
12 |
EM_AREAARM_TRIGGERMODE_UNKNOWN(0, "未知"), |
|
13 |
/** |
|
14 |
* 键盘 |
|
15 |
*/ |
|
16 |
EM_AREAARM_TRIGGERMODE_KEYPAD(1, "键盘"), |
|
17 |
/** |
|
18 |
* 遥控器 |
|
19 |
*/ |
|
20 |
EM_AREAARM_TRIGGERMODE_REMOTECONTROL(2, "遥控器"), |
|
21 |
/** |
|
22 |
* 用户操作 |
|
23 |
*/ |
|
24 |
EM_AREAARM_TRIGGERMODE_USER(3, "用户操作"), |
|
25 |
/** |
|
26 |
* 本地 |
|
27 |
*/ |
|
28 |
EM_AREAARM_TRIGGERMODE_LOCAL(4, "本地"), |
|
29 |
/** |
|
30 |
* 定时器 |
|
31 |
*/ |
|
32 |
EM_AREAARM_TRIGGERMODE_TIMER(5, "定时器"), |
|
33 |
/** |
|
34 |
* Key类型防区 |
|
35 |
*/ |
|
36 |
EM_AREAARM_TRIGGERMODE_KEY(6, "Key类型防区"), |
|
37 |
/** |
|
38 |
* 远程操作(电话反控、短信反控、手机App、平台客户端等) |
|
39 |
*/ |
|
40 |
EM_AREAARM_TRIGGERMODE_REMOTE(7, "远程操作(电话反控、短信反控、手机App、平台客户端等)"), |
|
41 |
/** |
|
42 |
* DSS平台客户端 |
|
43 |
*/ |
|
44 |
EM_AREAARM_TRIGGERMODE_DSS(8, "DSS平台客户端"), |
|
45 |
/** |
|
46 |
* DSSPro平台客户端 |
|
47 |
*/ |
|
48 |
EM_AREAARM_TRIGGERMODE_DSSPRO(9, "DSSPro平台客户端"), |
|
49 |
/** |
|
50 |
* 手机客户端 |
|
51 |
*/ |
|
52 |
EM_AREAARM_TRIGGERMODE_DMSS(10, "手机客户端"), |
|
53 |
/** |
|
54 |
* Smart pss、ICC平台 |
|
55 |
*/ |
|
56 |
EM_AREAARM_TRIGGERMODE_PLATFORM(11, "Smart pss、ICC平台"); |
|
57 |
|
|
58 |
private int value; |
|
59 |
|
|
60 |
private String note; |
|
61 |
|
|
62 |
public String getNote() { |
|
63 |
return note; |
|
64 |
} |
|
65 |
|
|
66 |
public int getValue() { |
|
67 |
return value; |
|
68 |
} |
|
69 |
|
|
70 |
EM_AREAARM_TRIGGERMODE(int givenValue, String note) { |
|
71 |
this.value = givenValue; |
|
72 |
this.note = note; |
|
73 |
} |
|
74 |
|
|
75 |
public static String getNoteByValue(int givenValue) { |
|
76 |
for (EM_AREAARM_TRIGGERMODE enumType : EM_AREAARM_TRIGGERMODE.values()) { |
|
77 |
if (givenValue == enumType.getValue()) { |
|
78 |
return enumType.getNote(); |
|
79 |
} |
|
80 |
} |
|
81 |
return null; |
|
82 |
} |
|
83 |
|
|
84 |
public static int getValueByNote(String givenNote) { |
|
85 |
for (EM_AREAARM_TRIGGERMODE enumType : EM_AREAARM_TRIGGERMODE.values()) { |
|
86 |
if (givenNote.equals(enumType.getNote())) { |
|
87 |
return enumType.getValue(); |
|
88 |
} |
|
89 |
} |
|
90 |
return -1; |
|
91 |
} |
|
92 |
|
|
93 |
public static EM_AREAARM_TRIGGERMODE getEnum(int value) { |
|
94 |
for (EM_AREAARM_TRIGGERMODE e : EM_AREAARM_TRIGGERMODE.values()) { |
|
95 |
if (e.getValue() == value) |
|
96 |
return e; |
|
97 |
} |
|
98 |
return EM_AREAARM_TRIGGERMODE.EM_AREAARM_TRIGGERMODE_UNKNOWN; |
|
99 |
} |
|
100 |
|
|
101 |
} |