Enum Signal
- All Implemented Interfaces:
Serializable
,Comparable<Signal>
public enum Signal extends Enum<Signal>
SCP Signals.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Signal.Type
The type of signal, determined by how it is transmitted. -
Enum Constant Summary
Enum Constants Enum Constant Description CONTINUE
Tells apps to continue from pause.EXIT
Tells apps to exit.INITIALISE
The system is initialising after boot.PAUSE
Tells apps to pause.POWER_DOWN
The system is powering down.START
Tells apps to start.STOP
The system is ceasing to run user apps.SYNC0
Tells apps to advance from the SYNC0 state.SYNC1
Tells apps to advance from the SYNC1 state.TIMER
Used for clock synchronisation?USER_0
For application use.USER_1
For application use.USER_2
For application use.USER_3
For application use. -
Field Summary
Fields Modifier and Type Field Description Signal.Type
type
The "type" of the signal.byte
value
The value used for the signal. -
Method Summary
Modifier and Type Method Description static Signal
get(byte value)
Convert a byte to a signal value.static Signal
valueOf(String name)
Returns the enum constant of this type with the specified name.static Signal[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
INITIALISE
The system is initialising after boot. -
POWER_DOWN
The system is powering down. -
STOP
The system is ceasing to run user apps. -
START
Tells apps to start. -
SYNC0
Tells apps to advance from the SYNC0 state. -
SYNC1
Tells apps to advance from the SYNC1 state. -
PAUSE
Tells apps to pause. -
CONTINUE
Tells apps to continue from pause. -
EXIT
Tells apps to exit. -
TIMER
Used for clock synchronisation? -
USER_0
For application use. -
USER_1
For application use. -
USER_2
For application use. -
USER_3
For application use.
-
-
Field Details
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
get
Convert a byte to a signal value.- Parameters:
value
- The value to decode.- Returns:
- The decoded value.
- Throws:
NullPointerException
- If the value is unknown.
-