提交 | 用户 | 时间
|
149dd0
|
1 |
package com.iailab.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
/** |
|
4 |
* @author 47081 |
|
5 |
* @version 1.0 |
|
6 |
* @description 设备锁状态 |
|
7 |
* @date 2021/2/22 |
|
8 |
*/ |
|
9 |
public enum EM_TAMPERALTERSTATUS_TYPE { |
|
10 |
/** 未知 */ |
|
11 |
EM_TAMPERALTERSTATUS_UNKNOWN(-1, "未知"), |
|
12 |
/** 关闭 */ |
|
13 |
EM_TAMPERALTERSTATUS_CLOSE(0, "关闭"), |
|
14 |
/** 开启 */ |
|
15 |
EM_TAMPERALTERSTATUS_OPEN(1, "开启"); |
|
16 |
private int type; |
|
17 |
private String desc; |
|
18 |
|
|
19 |
EM_TAMPERALTERSTATUS_TYPE(int type, String desc) { |
|
20 |
this.type = type; |
|
21 |
this.desc = desc; |
|
22 |
} |
|
23 |
|
|
24 |
public int getType() { |
|
25 |
return type; |
|
26 |
} |
|
27 |
|
|
28 |
public String getDesc() { |
|
29 |
return desc; |
|
30 |
} |
|
31 |
|
|
32 |
public static EM_TAMPERALTERSTATUS_TYPE getTamperaltersStatus(int type) { |
|
33 |
for (EM_TAMPERALTERSTATUS_TYPE statusType : EM_TAMPERALTERSTATUS_TYPE.values()) { |
|
34 |
if (statusType.type == type) { |
|
35 |
return statusType; |
|
36 |
} |
|
37 |
} |
|
38 |
return EM_TAMPERALTERSTATUS_UNKNOWN; |
|
39 |
} |
|
40 |
} |