Class SCPResponse
java.lang.Object
uk.ac.manchester.spinnaker.messages.scp.SCPResponse
- Direct Known Subclasses:
BMPRequest.BMPResponse
,CheckOKResponse
,NoResponse
Represents an abstract SCP response.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
SCPResponse
(ByteBuffer buffer) Reads a packet from a bytestring of data. -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
throwIfNotOK
(String operation, Enum<?> command) Throw an exception if the response is not an OK.
-
Field Details
-
sdpHeader
The SDP header from the response. -
result
The result of the SCP response. -
sequence
public final int sequenceThe sequence number of the SCP response, between 0 and 65535.
-
-
Constructor Details
-
SCPResponse
Reads a packet from a bytestring of data. Subclasses must also deserialize any payload after calling this constructor.- Parameters:
buffer
- the buffer to deserialise from
-
-
Method Details
-
throwIfNotOK
protected final void throwIfNotOK(String operation, Enum<?> command) throws UnexpectedResponseCodeException Throw an exception if the response is not an OK.- Parameters:
operation
- The overall operation that was being done.command
- The particular command that this is a response to.- Throws:
UnexpectedResponseCodeException
- If the response was a failure.UnroutableMessageException
- If the response was specifically that the message couldn't be routed.
-