001/* 002 * Copyright (C) Cross The Road Electronics. All rights reserved. 003 * License information can be found in CTRE_LICENSE.txt 004 * For support and suggestions contact support@ctr-electronics.com or file 005 * an issue tracker at https://github.com/CrossTheRoadElec/Phoenix-Releases 006 */ 007package com.ctre.phoenixpro.signals; 008 009import java.util.HashMap; 010 011/** 012 * System state of the device 013 * 014 * @deprecated Classes in the phoenixpro package will be removed in 2024. 015 * Users should instead use classes from the phoenix6 package. 016 */ 017@Deprecated(forRemoval = true) 018public enum System_StateValue 019{ 020 Bootup_0(0), 021 Bootup_1(1), 022 Bootup_2(2), 023 Bootup_3(3), 024 Bootup_4(4), 025 Bootup_5(5), 026 Bootup_6(6), 027 Bootup_7(7), 028 BootBeep(8), 029 ControlDisabled(9), 030 ControlEnabled(10), 031 Fault(11), 032 Recover(12), 033 NotLicensed(13),; 034 035 public final int value; 036 037 System_StateValue(int initValue) 038 { 039 this.value = initValue; 040 } 041 042 private static HashMap<Integer, System_StateValue> _map = null; 043 static 044 { 045 _map = new HashMap<Integer, System_StateValue>(); 046 for (System_StateValue type : System_StateValue.values()) 047 { 048 _map.put(type.value, type); 049 } 050 } 051 052 /** 053 * Gets System_StateValue from specified value 054 * @param value Value of System_StateValue 055 * @return System_StateValue of specified value 056 */ 057 public static System_StateValue valueOf(int value) 058 { 059 System_StateValue retval = _map.get(value); 060 if(retval != null) return retval; 061 return System_StateValue.values()[0]; 062 } 063}