Jay
2024-11-08 02722a3f9eca857ce7fffea352e9f7ee692a1b71
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
package com.iailab.netsdk.lib.enumeration;
 
/**
 * @author 251823
 * @description 无线设备认证方式
 * @date 2023/03/16 11:15:26
 */
public enum EM_CFG_WIRELESS_AUTHENTICATION {
    /**
     * UnKnown
     */
    EM_CFG_WIRELESS_AUTHENTICATION_UNKNOWN(0, "UnKnown"),
    /**
     * OPEN
     */
    EM_CFG_WIRELESS_AUTHENTICATION_OPEN(1, "OPEN"),
    /**
     * SHARED
     */
    EM_CFG_WIRELESS_AUTHENTICATION_SHARED(2, "SHARED"),
    /**
     * WPA
     */
    EM_CFG_WIRELESS_AUTHENTICATION_WPA(3, "WPA"),
    /**
     * WPA-PSK
     */
    EM_CFG_WIRELESS_AUTHENTICATION_WPAPSK(4, "WPA-PSK"),
    /**
     * WPA2
     */
    EM_CFG_WIRELESS_AUTHENTICATION_WPA2(5, "WPA2"),
    /**
     * WPA2-PSK
     */
    EM_CFG_WIRELESS_AUTHENTICATION_WPA2PSK(6, "WPA2-PSK"),
    /**
     * WPA-NONE
     */
    EM_CFG_WIRELESS_AUTHENTICATION_WPANONE(7, "WPA-NONE"),
    /**
     * WPA-PSK|WPA2-PSK
     */
    EM_CFG_WIRELESS_AUTHENTICATION_WPAPSK_WPA2PSK(8, "WPA-PSK|WPA2-PSK"),
    /**
     * WPA|WPA2
     */
    EM_CFG_WIRELESS_AUTHENTICATION_WPA_WPA2(9, "WPA|WPA2"),
    /**
     * WPA | WPA-PSK
     */
    EM_CFG_WIRELESS_AUTHENTICATION_WPA_WPAPSK(10, "WPA | WPA-PSK"),
    /**
     * WPA2|WPA2-PSK
     */
    EM_CFG_WIRELESS_AUTHENTICATION_WPA2_WPA2PSK(11, "WPA2|WPA2-PSK"),
    /**
     * WPA|WPA-PSK|WPA2|WPA2-PSK
     */
    EM_CFG_WIRELESS_AUTHENTICATION_WPA_WPAPSK_WPA2_WPA2PSK(12, "WPA|WPA-PSK|WPA2|WPA2-PSK");
 
    private int value;
 
    private String note;
 
    public String getNote() {
        return note;
    }
 
    public int getValue() {
        return value;
    }
 
    EM_CFG_WIRELESS_AUTHENTICATION(int givenValue, String note) {
        this.value = givenValue;
        this.note = note;
    }
 
    public static String getNoteByValue(int givenValue) {
        for (EM_CFG_WIRELESS_AUTHENTICATION enumType : EM_CFG_WIRELESS_AUTHENTICATION.values()) {
            if (givenValue == enumType.getValue()) {
                return enumType.getNote();
            }
        }
        return null;
    }
 
    public static int getValueByNote(String givenNote) {
        for (EM_CFG_WIRELESS_AUTHENTICATION enumType : EM_CFG_WIRELESS_AUTHENTICATION.values()) {
            if (givenNote.equals(enumType.getNote())) {
                return enumType.getValue();
            }
        }
        return -1;
    }
 
}