Class PayloadedResponse<T, E extends Exception>
java.lang.Object
uk.ac.manchester.spinnaker.messages.scp.SCPResponse
uk.ac.manchester.spinnaker.messages.scp.CheckOKResponse
uk.ac.manchester.spinnaker.messages.scp.PayloadedResponse<T,E>
- Type Parameters:
T- The type of parsed payload value.E- The type of exception thrown by the payload parser.
- All Implemented Interfaces:
Supplier<T>
- Direct Known Subclasses:
CountState.Response, FixedRouteRead.Response, GetChipInfo.Response, GetReinjectionStatus.Response, GetVersion.Response, IPTagGet.Response, IPTagGetInfo.Response, IPTagSetTTO.Response, ReadLink.Response, ReadMemory.Response, RouterAlloc.Response, SDRAMAlloc.Response, SDRAMDeAlloc.Response
public abstract class PayloadedResponse<T, E extends Exception>
extends CheckOKResponse
implements Supplier<T>
A response that holds a payload.
- Author:
- Donal Fellows
-
Field Summary
Fields inherited from class SCPResponse
result, sdpHeader, sequence -
Method Summary
Modifier and TypeMethodDescriptionfinal Tget()protected abstract Tparse(ByteBuffer buffer) Parse the payload of a response.Methods inherited from class SCPResponse
throwIfNotOK
-
Method Details
-
get
-
parse
Parse the payload of a response. The buffer will be positioned after the checked header.- Parameters:
buffer- The buffer to parse. Little-endian.- Returns:
- The parsed value.
- Throws:
E- If parsing fails.
-