Enum SCPResult
- All Implemented Interfaces:
Serializable
,Comparable<SCPResult>
public enum SCPResult extends Enum<SCPResult>
The SCP Result codes.
-
Enum Constant Summary
Enum Constants Enum Constant Description RC_ARG
Invalid arguments.RC_BUF
No free shared memory buffers.RC_CMD
Bad/invalid command.RC_CPU
Bad CPU number.RC_DEAD
SHM destination dead.RC_LEN
Bad packet length.RC_OK
Command completed successfully.RC_P2P_BUSY
Destination busy.RC_P2P_NOREPLY
No reply to open.RC_P2P_REJECT
Message was rejected.RC_P2P_TIMEOUT
Destination did not respond.RC_PKT_TX
Packet transmission failed.RC_PORT
Bad port number.RC_ROUTE
No P2P route.RC_SUM
Bad checksum.RC_TIMEOUT
Timeout. -
Field Summary
Fields Modifier and Type Field Description short
value
The encoded result value. -
Method Summary
Modifier and Type Method Description static SCPResult
get(short value)
Decode a result.static SCPResult
valueOf(String name)
Returns the enum constant of this type with the specified name.static SCPResult[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
RC_OK
Command completed successfully. -
RC_LEN
Bad packet length. -
RC_SUM
Bad checksum. -
RC_CMD
Bad/invalid command. -
RC_ARG
Invalid arguments. -
RC_PORT
Bad port number. -
RC_TIMEOUT
Timeout. -
RC_ROUTE
No P2P route. -
RC_CPU
Bad CPU number. -
RC_DEAD
SHM destination dead. -
RC_BUF
No free shared memory buffers. -
RC_P2P_NOREPLY
No reply to open. -
RC_P2P_REJECT
Message was rejected. -
RC_P2P_BUSY
Destination busy. -
RC_P2P_TIMEOUT
Destination did not respond. -
RC_PKT_TX
Packet transmission failed.
-
-
Field Details
-
value
public final short valueThe encoded result value.
-
-
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
Decode a result.- Parameters:
value
- The value to decode- Returns:
- The decoded value, or
null
if unrecognised.
-