Class WriteMemory
java.lang.Object
uk.ac.manchester.spinnaker.messages.sdp.SpinnakerRequest
uk.ac.manchester.spinnaker.messages.scp.SCPRequest<EmptyResponse>
uk.ac.manchester.spinnaker.messages.scp.WriteMemory
- All Implemented Interfaces:
SerializableMessage
public class WriteMemory extends SCPRequest<EmptyResponse>
A request to write memory on a chip. There is no response payload.
Calls sark_cmd_write()
in sark_base.c
.
-
Field Summary
Fields inherited from class uk.ac.manchester.spinnaker.messages.scp.SCPRequest
argument1, argument2, argument3, BOOT_CHIP, BOOT_MONITOR_CORE, data, NO_DATA, scpRequestHeader
-
Constructor Summary
Constructors Constructor Description WriteMemory(HasChipLocation chip, MemoryLocation baseAddress, ByteBuffer data)
WriteMemory(HasCoreLocation core, MemoryLocation baseAddress, ByteBuffer data)
-
Method Summary
Modifier and Type Method Description EmptyResponse
getSCPResponse(ByteBuffer buffer)
Parse the response to this message.Methods inherited from class uk.ac.manchester.spinnaker.messages.sdp.SpinnakerRequest
getMessageData
-
Constructor Details
-
WriteMemory
- Parameters:
core
- the core to write viabaseAddress
- The positive base address to start the write atdata
- Between 1 and 256 bytes to write; the position of the buffer must be the point where the data starts. The position and limit of the buffer will not be updated by this constructor.
-
WriteMemory
- Parameters:
chip
- the chip to write viabaseAddress
- The positive base address to start the read fromdata
- Between 1 and 256 bytes to write; the position of the buffer must be the point where the data starts. The position and limit of the buffer will not be updated by this constructor.
-
-
Method Details
-
getSCPResponse
Description copied from class:SCPRequest
Parse the response to this message.- Specified by:
getSCPResponse
in classSCPRequest<EmptyResponse>
- Parameters:
buffer
- The buffer to parse.- Returns:
- The message response.
- Throws:
UnexpectedResponseCodeException
-