提交 | 用户 | 时间
|
149dd0
|
1 |
package com.iailab.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
/** |
|
4 |
* @author 251823 |
|
5 |
* @description 工作模式选择 |
|
6 |
* @date 2023/03/16 14:23:46 |
|
7 |
*/ |
|
8 |
public enum EM_CFG_WORKMODE { |
|
9 |
/** |
|
10 |
|
|
11 |
*/ |
|
12 |
EM_WORKMODE_UNKNOWN(-1, ""), |
|
13 |
/** |
|
14 |
* CDMA1x |
|
15 |
*/ |
|
16 |
EM_WORKMODE_CDMA1X(0, " CDMA1x "), |
|
17 |
/** |
|
18 |
* EVDO |
|
19 |
*/ |
|
20 |
EM_WORKMODE_EVDO(1, " EVDO "), |
|
21 |
/** |
|
22 |
* TD-SCDMA |
|
23 |
*/ |
|
24 |
EM_WORKMODE_TDSCDMA(2, " TD-SCDMA "), |
|
25 |
/** |
|
26 |
* WCDMA |
|
27 |
*/ |
|
28 |
EM_WORKMODE_WCDMA(3, " WCDMA "), |
|
29 |
/** |
|
30 |
* EDGE |
|
31 |
*/ |
|
32 |
EM_WORKMODE_EDGE(4, " EDGE "), |
|
33 |
/** |
|
34 |
* TDD-LTE |
|
35 |
*/ |
|
36 |
EM_WORKMODE_TDDLTE(5, " TDD-LTE "), |
|
37 |
/** |
|
38 |
* FDD-LTE |
|
39 |
*/ |
|
40 |
EM_WORKMODE_FDDLTE(6, " FDD-LTE "), |
|
41 |
/** |
|
42 |
* TD-LTE |
|
43 |
*/ |
|
44 |
EM_WORKMODE_TDLTE(7, " TD-LTE "), |
|
45 |
/** |
|
46 |
* Auto |
|
47 |
*/ |
|
48 |
EM_WORKMODE_AUTO(8, " Auto "); |
|
49 |
|
|
50 |
private int value; |
|
51 |
|
|
52 |
private String note; |
|
53 |
|
|
54 |
public String getNote() { |
|
55 |
return note; |
|
56 |
} |
|
57 |
|
|
58 |
public int getValue() { |
|
59 |
return value; |
|
60 |
} |
|
61 |
|
|
62 |
EM_CFG_WORKMODE(int givenValue, String note) { |
|
63 |
this.value = givenValue; |
|
64 |
this.note = note; |
|
65 |
} |
|
66 |
|
|
67 |
public static String getNoteByValue(int givenValue) { |
|
68 |
for (EM_CFG_WORKMODE enumType : EM_CFG_WORKMODE.values()) { |
|
69 |
if (givenValue == enumType.getValue()) { |
|
70 |
return enumType.getNote(); |
|
71 |
} |
|
72 |
} |
|
73 |
return null; |
|
74 |
} |
|
75 |
|
|
76 |
public static int getValueByNote(String givenNote) { |
|
77 |
for (EM_CFG_WORKMODE enumType : EM_CFG_WORKMODE.values()) { |
|
78 |
if (givenNote.equals(enumType.getNote())) { |
|
79 |
return enumType.getValue(); |
|
80 |
} |
|
81 |
} |
|
82 |
return -2; |
|
83 |
} |
|
84 |
} |