提交 | 用户 | 时间
|
149dd0
|
1 |
package com.iailab.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
/** |
|
4 |
* @author 47081 |
|
5 |
* @version 1.0 |
|
6 |
* @description 闸机进出语音方向 |
|
7 |
* @date 2021/2/7 |
|
8 |
*/ |
|
9 |
public enum CFG_EM_ASG_VOICE_DIRECTION { |
|
10 |
CFG_EM_ASG_VOICE_DIRECTION_UNKNOWN(0, "未知"), |
|
11 |
CFG_EM_ASG_VOICE_DIRECTION_ENTER(1, "进入"), |
|
12 |
CFG_EM_ASG_VOICE_DIRECTION_LEAVE(2, "离开"); |
|
13 |
private int direction; |
|
14 |
private String desc; |
|
15 |
|
|
16 |
CFG_EM_ASG_VOICE_DIRECTION(int direction, String desc) { |
|
17 |
this.direction = direction; |
|
18 |
this.desc = desc; |
|
19 |
} |
|
20 |
|
|
21 |
public static CFG_EM_ASG_VOICE_DIRECTION getVoiceDirection(int direction) { |
|
22 |
for (CFG_EM_ASG_VOICE_DIRECTION voiceDirection : CFG_EM_ASG_VOICE_DIRECTION.values()) { |
|
23 |
if (voiceDirection.direction == direction) { |
|
24 |
return voiceDirection; |
|
25 |
} |
|
26 |
} |
|
27 |
return CFG_EM_ASG_VOICE_DIRECTION_UNKNOWN; |
|
28 |
} |
|
29 |
|
|
30 |
public int getDirection() { |
|
31 |
return direction; |
|
32 |
} |
|
33 |
|
|
34 |
public void setDirection(int direction) { |
|
35 |
this.direction = direction; |
|
36 |
} |
|
37 |
|
|
38 |
public String getDesc() { |
|
39 |
return desc; |
|
40 |
} |
|
41 |
|
|
42 |
public void setDesc(String desc) { |
|
43 |
this.desc = desc; |
|
44 |
} |
|
45 |
} |