提交 | 用户 | 时间
|
ce910c
|
1 |
package com.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
/** |
|
4 |
* @author 47081 |
|
5 |
* @version 1.0 |
|
6 |
* @description 启动模式 |
|
7 |
* @date 2021/2/7 |
|
8 |
*/ |
|
9 |
public enum EM_STARTUP_MODE { |
|
10 |
/** 未知 */ |
|
11 |
EM_STARTUP_MODE_UNKNOWN(-1, "未知"), |
|
12 |
/** 正常启动模式 */ |
|
13 |
EM_STARTUP_MODE_NORMAL(0, "正常启动模式"), |
|
14 |
/** 零位设置启动模式 */ |
|
15 |
EM_STARTUP_MODE_ZERO_SETTING(1, "零位设置启动模式"), |
|
16 |
/** 老化测试启动模式 */ |
|
17 |
EM_STARTUP_MODE_AGING_TEST(2, "老化测试启动模式"); |
|
18 |
|
|
19 |
private int mode; |
|
20 |
private String desc; |
|
21 |
|
|
22 |
EM_STARTUP_MODE(int mode, String desc) { |
|
23 |
this.mode = mode; |
|
24 |
this.desc = desc; |
|
25 |
} |
|
26 |
|
|
27 |
public static EM_STARTUP_MODE getStartupMode(int mode) { |
|
28 |
for (EM_STARTUP_MODE startMode : EM_STARTUP_MODE.values()) { |
|
29 |
if (startMode.mode == mode) { |
|
30 |
return startMode; |
|
31 |
} |
|
32 |
} |
|
33 |
return EM_STARTUP_MODE_UNKNOWN; |
|
34 |
} |
|
35 |
|
|
36 |
public int getMode() { |
|
37 |
return mode; |
|
38 |
} |
|
39 |
|
|
40 |
public void setMode(int mode) { |
|
41 |
this.mode = mode; |
|
42 |
} |
|
43 |
|
|
44 |
public String getDesc() { |
|
45 |
return desc; |
|
46 |
} |
|
47 |
|
|
48 |
public void setDesc(String desc) { |
|
49 |
this.desc = desc; |
|
50 |
} |
|
51 |
} |