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