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