Class BootMessage
java.lang.Object
uk.ac.manchester.spinnaker.messages.boot.BootMessage
- All Implemented Interfaces:
SerializableMessage
public class BootMessage extends Object implements SerializableMessage
A message used for booting the board. Note that boot messages are big endian,
unlike the rest of SpiNNaker.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description BootMessage(ByteBuffer buffer)
Deserialise a boot message from a received message.BootMessage(uk.ac.manchester.spinnaker.messages.boot.BootOpCode opcode, int operand1, int operand2, int operand3)
Create a boot message.BootMessage(uk.ac.manchester.spinnaker.messages.boot.BootOpCode opcode, int operand1, int operand2, int operand3, ByteBuffer buffer)
Create a boot message. -
Method Summary
Modifier and Type Method Description void
addToBuffer(ByteBuffer buffer)
Writes this message into the given buffer as a contiguous range of bytes.
-
Field Details
-
data
The payload data (ornull
if there is none). -
opcode
public final uk.ac.manchester.spinnaker.messages.boot.BootOpCode opcodeThe operation of this packet. -
operand1
public final int operand1The first operand. -
operand2
public final int operand2The second operand. -
operand3
public final int operand3The third operand.
-
-
Constructor Details
-
BootMessage
public BootMessage(uk.ac.manchester.spinnaker.messages.boot.BootOpCode opcode, int operand1, int operand2, int operand3)Create a boot message.- Parameters:
opcode
- The boot opcodeoperand1
- The first argoperand2
- The second argoperand3
- The third arg
-
BootMessage
public BootMessage(uk.ac.manchester.spinnaker.messages.boot.BootOpCode opcode, int operand1, int operand2, int operand3, ByteBuffer buffer)Create a boot message.- Parameters:
opcode
- The boot opcodeoperand1
- The first argoperand2
- The second argoperand3
- The third argbuffer
- The payload- Throws:
IllegalArgumentException
- if the payload is too large for the message
-
BootMessage
Deserialise a boot message from a received message.- Parameters:
buffer
- the buffer to read out of.
-
-
Method Details
-
addToBuffer
Writes this message into the given buffer as a contiguous range of bytes. This is so that a message can be sent. Implementors may assume that the buffer has been configured to be big-endian and that its position is at the point where they should begin writing. Once it has finished, the position should be immediately after the last byte written by this method.- Specified by:
addToBuffer
in interfaceSerializableMessage
- Parameters:
buffer
- The buffer to write into.
-