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

    Fields
    Modifier and Type
    Field
    Description
    The payload data (or null if there is none).
    final uk.ac.manchester.spinnaker.messages.boot.BootOpCode
    The operation of this packet.
    final int
    The first operand.
    final int
    The second operand.
    final int
    The third operand.
  • Constructor Summary

    Constructors
    Constructor
    Description
    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
    Writes this message into the given buffer as a contiguous range of bytes.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • data

      public final ByteBuffer data
      The payload data (or null if there is none).
    • opcode

      public final uk.ac.manchester.spinnaker.messages.boot.BootOpCode opcode
      The operation of this packet.
    • operand1

      public final int operand1
      The first operand.
    • operand2

      public final int operand2
      The second operand.
    • operand3

      public final int operand3
      The 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 opcode
      operand1 - The first arg
      operand2 - The second arg
      operand3 - 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 opcode
      operand1 - The first arg
      operand2 - The second arg
      operand3 - The third arg
      buffer - The payload
      Throws:
      IllegalArgumentException - if the payload is too large for the message
    • BootMessage

      public BootMessage(ByteBuffer buffer)
      Deserialise a boot message from a received message.
      Parameters:
      buffer - the buffer to read out of.
  • Method Details

    • addToBuffer

      public void addToBuffer(ByteBuffer buffer)
      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 interface SerializableMessage
      Parameters:
      buffer - The buffer to write into.