public enum CODAState extends java.lang.Enum<CODAState> implements CODAStateIF
CODATransition
.
This is the only class that implements the CODAStateIF
interface.
*****************
* State Machine *
*****************
____________________________________________________
INTERMEDIATE | | INTERMEDIATE
STATE | STATE | STATE
________________|_________________|_________________
(if reset from ERROR or BOOTED)
<- BOOTED <-----------------------------,
| |
CONFIGURING | |
| <------------------------|
'-> CONFIGURED ->----------------------->|
<- ^
| |
DOWNLOADING | |
| |
'-> DOWNLOADED ->----------------------->|
<- <-,<----------, ^
| ^ ^ |
| | | |
PRESTARTING | | ENDING | ENDING | reset
| | | |
'-> PAUSED -----> -----------|---------->|
<- | ^
| | |
GOING | | |
| | |
'-> ACTIVE --------------->'---------->'
__________________________________________________________________
NOTE: DOWNLOADED can always do a download,
CONFIGURED can always do a configure, and
RESET goes from any state to CONFIGURED (to BOOTED if in ERROR or BOOTED state)
Enum Constant and Description |
---|
ACTIVATING
Activating state - in the process of becoming active.
|
ACTIVE
ACTIVE state.
|
BOOTED
BOOTED state.
|
CONFIGURED
CONFIGURED state.
|
CONFIGURING
Configuring state - in the process of configuring.
|
DOWNLOADED
DOWNLOADED state (same as ENDED).
|
DOWNLOADING
Downloading state - in the process of downloading.
|
ENDING
Ending state - got END command but no END event yet.
|
ERROR
ERROR state.
|
PAUSED
PAUSED state (same as PRESTARTED).
|
PRESTARTING
Prestarting state - in the process of prestarting.
|
RESETTING
Resetting emu - got RESET command.
|
Modifier and Type | Method and Description |
---|---|
java.util.EnumSet<CODATransition> |
allowed()
Get the set of allowed transitions from this state.
|
static CODAState |
get(java.lang.String s)
Map from CODAState name to a particular enum.
|
java.lang.String |
getDescription()
Get the description of this state.
|
static CODAState |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static CODAState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
name
public static final CODAState BOOTED
public static final CODAState CONFIGURED
public static final CODAState DOWNLOADED
public static final CODAState PAUSED
public static final CODAState ACTIVE
public static final CODAState CONFIGURING
public static final CODAState DOWNLOADING
public static final CODAState PRESTARTING
public static final CODAState ACTIVATING
public static final CODAState ENDING
public static final CODAState RESETTING
public static final CODAState ERROR
public static CODAState[] values()
for (CODAState c : CODAState.values()) System.out.println(c);
public static CODAState valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static CODAState get(java.lang.String s)
s
- name of CODAState.public java.lang.String getDescription()
getDescription
in interface CODAStateIF
public java.util.EnumSet<CODATransition> allowed()
allowed
in interface CODAStateIF