提交 | 用户 | 时间
|
ce910c
|
1 |
package com.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
|
|
4 |
/** |
|
5 |
* @author 291189 |
|
6 |
* @description 传感器感应方式枚举类型 |
|
7 |
* @date 2022/08/31 14:44:16 |
|
8 |
*/ |
|
9 |
public enum NET_SENSE_METHOD { |
|
10 |
/** |
|
11 |
未知类型 |
|
12 |
*/ |
|
13 |
NET_SENSE_UNKNOWN(-1,"未知类型"), |
|
14 |
/** |
|
15 |
门磁 |
|
16 |
*/ |
|
17 |
NET_SENSE_DOOR(0,"门磁"), |
|
18 |
/** |
|
19 |
被动红外 |
|
20 |
*/ |
|
21 |
NET_SENSE_PASSIVEINFRA(1,"被动红外"), |
|
22 |
/** |
|
23 |
气感 |
|
24 |
*/ |
|
25 |
NET_SENSE_GAS(2,"气感"), |
|
26 |
/** |
|
27 |
烟感 |
|
28 |
*/ |
|
29 |
NET_SENSE_SMOKING(3,"烟感"), |
|
30 |
/** |
|
31 |
水感 |
|
32 |
*/ |
|
33 |
NET_SENSE_WATER(4,"水感"), |
|
34 |
/** |
|
35 |
主动红外 |
|
36 |
*/ |
|
37 |
NET_SENSE_ACTIVEFRA(5,"主动红外"), |
|
38 |
/** |
|
39 |
玻璃破碎 |
|
40 |
*/ |
|
41 |
NET_SENSE_GLASS(6,"玻璃破碎"), |
|
42 |
/** |
|
43 |
紧急开关 |
|
44 |
*/ |
|
45 |
NET_SENSE_EMERGENCYSWITCH(7,"紧急开关"), |
|
46 |
/** |
|
47 |
震动 |
|
48 |
*/ |
|
49 |
NET_SENSE_SHOCK(8,"震动"), |
|
50 |
/** |
|
51 |
双鉴(红外+微波) |
|
52 |
*/ |
|
53 |
NET_SENSE_DOUBLEMETHOD(9,"双鉴(红外+微波)"), |
|
54 |
/** |
|
55 |
三技术 |
|
56 |
*/ |
|
57 |
NET_SENSE_THREEMETHOD(10,"三技术"), |
|
58 |
/** |
|
59 |
温度 |
|
60 |
*/ |
|
61 |
NET_SENSE_TEMP(11,"温度"), |
|
62 |
/** |
|
63 |
湿度 |
|
64 |
*/ |
|
65 |
NET_SENSE_HUMIDITY(12,"湿度"), |
|
66 |
/** |
|
67 |
风速 |
|
68 |
*/ |
|
69 |
NET_SENSE_WIND(13,"风速"), |
|
70 |
/** |
|
71 |
呼叫按钮 |
|
72 |
*/ |
|
73 |
NET_SENSE_CALLBUTTON(14,"呼叫按钮"), |
|
74 |
/** |
|
75 |
气体压力 |
|
76 |
*/ |
|
77 |
NET_SENSE_GASPRESSURE(15,"气体压力"), |
|
78 |
/** |
|
79 |
燃气浓度 |
|
80 |
*/ |
|
81 |
NET_SENSE_GASCONCENTRATION(16,"燃气浓度"), |
|
82 |
/** |
|
83 |
气体流量 |
|
84 |
*/ |
|
85 |
NET_SENSE_GASFLOW(17,"气体流量"), |
|
86 |
/** |
|
87 |
其他 |
|
88 |
*/ |
|
89 |
NET_SENSE_OTHER(18,"其他"), |
|
90 |
/** |
|
91 |
油量检测,汽油、柴油等车辆用油检测 |
|
92 |
*/ |
|
93 |
NET_SENSE_OIL(19,"油量检测,汽油、柴油等车辆用油检测"), |
|
94 |
/** |
|
95 |
里程数检测 |
|
96 |
*/ |
|
97 |
NET_SENSE_MILEAGE(20,"里程数检测"), |
|
98 |
/** |
|
99 |
紧急按钮 |
|
100 |
*/ |
|
101 |
NET_SENSE_URGENCYBUTTON(21,"紧急按钮"), |
|
102 |
/** |
|
103 |
盗窃 |
|
104 |
*/ |
|
105 |
NET_SENSE_STEAL(22,"盗窃"), |
|
106 |
/** |
|
107 |
周界 |
|
108 |
*/ |
|
109 |
NET_SENSE_PERIMETER(23,"周界"), |
|
110 |
/** |
|
111 |
防拆 |
|
112 |
*/ |
|
113 |
NET_SENSE_PREVENTREMOVE(24,"防拆"), |
|
114 |
/** |
|
115 |
门铃 |
|
116 |
*/ |
|
117 |
NET_SENSE_DOORBELL(25,"门铃"), |
|
118 |
/** |
|
119 |
交流电压传感器 |
|
120 |
*/ |
|
121 |
NET_SENSE_ALTERVOLT(26,"交流电压传感器"), |
|
122 |
/** |
|
123 |
直流电压传感器 |
|
124 |
*/ |
|
125 |
NET_SENSE_DIRECTVOLT(27,"直流电压传感器"), |
|
126 |
/** |
|
127 |
交流电流传感器 |
|
128 |
*/ |
|
129 |
NET_SENSE_ALTERCUR(28,"交流电流传感器"), |
|
130 |
/** |
|
131 |
直流电流传感器 |
|
132 |
*/ |
|
133 |
NET_SENSE_DIRECTCUR(29,"直流电流传感器"), |
|
134 |
/** |
|
135 |
高新兴通用模拟量 4~20mA或0~5V |
|
136 |
*/ |
|
137 |
NET_SENSE_RSUGENERAL(30,"高新兴通用模拟量 4~20mA或0~5V"), |
|
138 |
/** |
|
139 |
高新兴门禁感应 |
|
140 |
*/ |
|
141 |
NET_SENSE_RSUDOOR(31,"高新兴门禁感应"), |
|
142 |
/** |
|
143 |
高新兴断电感应 |
|
144 |
*/ |
|
145 |
NET_SENSE_RSUPOWEROFF(32,"高新兴断电感应"), |
|
146 |
/** |
|
147 |
1500温度传感器 |
|
148 |
*/ |
|
149 |
NET_SENSE_TEMP1500(33,"1500温度传感器"), |
|
150 |
/** |
|
151 |
DS18B20温度传感器 |
|
152 |
*/ |
|
153 |
NET_SENSE_TEMPDS18B20(34,"DS18B20温度传感器"), |
|
154 |
/** |
|
155 |
1500湿度传感器 |
|
156 |
*/ |
|
157 |
NET_SENSE_HUMIDITY1500(35,"1500湿度传感器"), |
|
158 |
/** |
|
159 |
红外报警 |
|
160 |
*/ |
|
161 |
NET_SENSE_INFRARED(36,"红外报警"), |
|
162 |
/** |
|
163 |
火警 |
|
164 |
*/ |
|
165 |
NET_SENSE_FIREALARM(37,"火警"), |
|
166 |
/** |
|
167 |
CO2浓度检测,典型值:0~5000ppm |
|
168 |
*/ |
|
169 |
NET_SENSE_CO2(38,"CO2浓度检测,典型值:0~5000ppm"), |
|
170 |
/** |
|
171 |
噪音检测,典型值:30~130dB |
|
172 |
*/ |
|
173 |
NET_SNESE_SOUND(39,"噪音检测,典型值:30~130dB"), |
|
174 |
/** |
|
175 |
PM2.5检测,典型值:0~1000ug/m3 |
|
176 |
*/ |
|
177 |
NET_SENSE_PM25(40,"PM2.5检测,典型值:0~1000ug/m3"), |
|
178 |
/** |
|
179 |
SF6浓度检测,典型值:0~3000ppm |
|
180 |
*/ |
|
181 |
NET_SENSE_SF6(41,"SF6浓度检测,典型值:0~3000ppm"), |
|
182 |
/** |
|
183 |
臭氧浓度检测,典型值:0~100ppm |
|
184 |
*/ |
|
185 |
NET_SENSE_O3(42,"臭氧浓度检测,典型值:0~100ppm"), |
|
186 |
/** |
|
187 |
环境光照检测,典型值:0~20000Lux |
|
188 |
*/ |
|
189 |
NET_SENSE_AMBIENTLIGHT(43,"环境光照检测,典型值:0~20000Lux"), |
|
190 |
/** |
|
191 |
签入按钮 |
|
192 |
*/ |
|
193 |
NET_SENSE_SIGNINBUTTON(44,"签入按钮"), |
|
194 |
/** |
|
195 |
液位 |
|
196 |
*/ |
|
197 |
NET_SENSE_LIQUIDLEVEL(45,"液位"), |
|
198 |
/** |
|
199 |
测距 |
|
200 |
*/ |
|
201 |
NET_SENSE_DISTANCE(46,"测距"), |
|
202 |
/** |
|
203 |
水流量 |
|
204 |
*/ |
|
205 |
NET_SENSE_WATERFLOW(47,"水流量"), |
|
206 |
/** |
|
207 |
按键传感器 |
|
208 |
*/ |
|
209 |
NET_SENSE_KEYPRESSS(48,"按键传感器"), |
|
210 |
/** |
|
211 |
SM7820B温湿度传感器 |
|
212 |
*/ |
|
213 |
NET_SENSE_TEMP_AND_HUMI_SM7820B(49,"SM7820B温湿度传感器"), |
|
214 |
/** |
|
215 |
DSU666单相电子式电能表D |
|
216 |
*/ |
|
217 |
NET_SENSE_WATT_HUR_DDSU666(50,"DSU666单相电子式电能表D"), |
|
218 |
/** |
|
219 |
幕帘传感器 |
|
220 |
*/ |
|
221 |
NET_SENSE_CURTAIN_SENSOR(51,"幕帘传感器"), |
|
222 |
/** |
|
223 |
机壳防拆 |
|
224 |
*/ |
|
225 |
NET_SENSE_CASEPREVENTREMOVE(52,"机壳防拆"), |
|
226 |
/** |
|
227 |
枚举类型总数 |
|
228 |
*/ |
|
229 |
NET_SENSE_NU(53,"枚举类型总数"); |
|
230 |
|
|
231 |
private int value; |
|
232 |
|
|
233 |
private String note; |
|
234 |
|
|
235 |
public String getNote() { |
|
236 |
return note; |
|
237 |
} |
|
238 |
|
|
239 |
public int getValue() { |
|
240 |
return value; |
|
241 |
} |
|
242 |
|
|
243 |
NET_SENSE_METHOD(int givenValue, String note) { |
|
244 |
this.value = givenValue; |
|
245 |
this.note = note; |
|
246 |
} |
|
247 |
|
|
248 |
public static String getNoteByValue(int givenValue) { |
|
249 |
for (NET_SENSE_METHOD enumType : NET_SENSE_METHOD.values()) { |
|
250 |
if (givenValue == enumType.getValue()) { |
|
251 |
return enumType.getNote(); |
|
252 |
} |
|
253 |
} |
|
254 |
return null; |
|
255 |
} |
|
256 |
|
|
257 |
public static int getValueByNote(String givenNote) { |
|
258 |
for (NET_SENSE_METHOD enumType : NET_SENSE_METHOD.values()) { |
|
259 |
if (givenNote.equals(enumType.getNote())) { |
|
260 |
return enumType.getValue(); |
|
261 |
} |
|
262 |
} |
|
263 |
return -2; |
|
264 |
} |
|
265 |
|
|
266 |
public static NET_SENSE_METHOD getEnum(int value) { |
|
267 |
for (NET_SENSE_METHOD e : NET_SENSE_METHOD.values()) { |
|
268 |
if (e.getValue() == value) |
|
269 |
return e; |
|
270 |
} |
|
271 |
return NET_SENSE_METHOD.NET_SENSE_UNKNOWN; |
|
272 |
} |
|
273 |
|
|
274 |
} |