001package jmri.jmrix.ipocs.protocol.enums;
002
003/**
004 * @author Fredrik Elestedt Copyright (C) 2020
005 * @since 4.21.2
006 */
007public enum RqLevelCrossingCommand {
008    OpenNow(1),
009    OpenAfterPassage(2),
010    Close(3),
011    ActivateReducedAutomation(4),
012    DeactiveReducedAutomation(5);
013
014    public final byte value;
015
016    private RqLevelCrossingCommand(int value) {
017      this.value = (byte)value;
018    }
019  
020    public static RqLevelCrossingCommand valueOf(byte value) {
021      for (RqLevelCrossingCommand e : values()) {
022        if (e.value == value) {
023          return e;
024        }
025      }
026      return null;
027    }
028}