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