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
package com.netsdk.lib.enumeration;
 
/**
 * @author 47081
 * @version 1.0
 * @description 闸机进出语音方向
 * @date 2021/2/7
 */
public enum CFG_EM_ASG_VOICE_DIRECTION {
  CFG_EM_ASG_VOICE_DIRECTION_UNKNOWN(0, "未知"),
  CFG_EM_ASG_VOICE_DIRECTION_ENTER(1, "进入"),
  CFG_EM_ASG_VOICE_DIRECTION_LEAVE(2, "离开");
  private int direction;
  private String desc;
 
  CFG_EM_ASG_VOICE_DIRECTION(int direction, String desc) {
    this.direction = direction;
    this.desc = desc;
  }
 
  public static CFG_EM_ASG_VOICE_DIRECTION getVoiceDirection(int direction) {
    for (CFG_EM_ASG_VOICE_DIRECTION voiceDirection : CFG_EM_ASG_VOICE_DIRECTION.values()) {
      if (voiceDirection.direction == direction) {
        return voiceDirection;
      }
    }
    return CFG_EM_ASG_VOICE_DIRECTION_UNKNOWN;
  }
 
  public int getDirection() {
    return direction;
  }
 
  public void setDirection(int direction) {
    this.direction = direction;
  }
 
  public String getDesc() {
    return desc;
  }
 
  public void setDesc(String desc) {
    this.desc = desc;
  }
}