提交 | 用户 | 时间
|
ce910c
|
1 |
package com.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
/** |
|
4 |
* @author 47081 |
|
5 |
* @version 1.0 |
|
6 |
* @description 门禁卡操作数据错误码 |
|
7 |
* @date 2021/2/8 |
|
8 |
*/ |
|
9 |
public enum NET_ACCESS_ERRORCODE { |
|
10 |
/** |
|
11 |
* 未知错误 |
|
12 |
*/ |
|
13 |
NET_ACCESS_ERRORCODE_UNKNOWN(0,"未知错误"), |
|
14 |
/** |
|
15 |
* 不支持该数据类型 |
|
16 |
*/ |
|
17 |
NET_ACCESS_ERRORCODE_NOTSUPPORT(1,"不支持该数据类型"), |
|
18 |
/** |
|
19 |
* 数据类型已存满 |
|
20 |
*/ |
|
21 |
NET_ACCESS_ERRORCODE_FULLDATA(2,"数据类型已满"), |
|
22 |
/** |
|
23 |
* 不支持下发操作 |
|
24 |
*/ |
|
25 |
NET_ACCESS_ERRORCODE_NOTSUPPORTISSUED(3,"不支持下发操作"); |
|
26 |
private int code; |
|
27 |
private String desc; |
|
28 |
|
|
29 |
NET_ACCESS_ERRORCODE(int code, String desc) { |
|
30 |
this.code = code; |
|
31 |
this.desc = desc; |
|
32 |
} |
|
33 |
|
|
34 |
public int getCode() { |
|
35 |
return code; |
|
36 |
} |
|
37 |
|
|
38 |
public String getDesc() { |
|
39 |
return desc; |
|
40 |
} |
|
41 |
public static NET_ACCESS_ERRORCODE getNetAccessErrorCode(int code){ |
|
42 |
for (NET_ACCESS_ERRORCODE errorCode :NET_ACCESS_ERRORCODE.values() ) { |
|
43 |
if(errorCode.code==code){ |
|
44 |
return errorCode; |
|
45 |
} |
|
46 |
} |
|
47 |
return NET_ACCESS_ERRORCODE_UNKNOWN; |
|
48 |
} |
|
49 |
|
|
50 |
} |