Class SystemVariableBootValues

java.lang.Object
uk.ac.manchester.spinnaker.messages.boot.SystemVariableBootValues
All Implemented Interfaces:
SerializableMessage

public class SystemVariableBootValues
extends Object
implements SerializableMessage
Default values of the system variables that get passed to SpiNNaker during boot.
  • Constructor Details

    • SystemVariableBootValues

      public SystemVariableBootValues()
      Create a set of boot values using all the defaults.
    • SystemVariableBootValues

      public SystemVariableBootValues​(SystemVariableBootValues original)
      Create a set of boot values that is a copy of an existing set of boot values. This new set will be modifiable.
      Parameters:
      original - The set of boot values to copy from.
  • Method Details

    • setValue

      public void setValue​(SystemVariableDefinition systemVariable, Object value)
      Set a particular boot value.
      Parameters:
      systemVariable - The variable to set.
      value - The value to set it to. The type depends on the type of the variable being set.
      Throws:
      UnsupportedOperationException - If the boot values are not writable.
      IllegalArgumentException - If the variable type doesn't match.
    • get

      public static SystemVariableBootValues get​(int boardVersion)
      Get the default values of the system variables that get passed to SpiNNaker during boot for a particular version of SpiNNaker board. This set of defaults will be unmodifiable and must be copied (with the appropriate constructor) to be changed.
      Parameters:
      boardVersion - Which sort of SpiNN board is being booted.
      Returns:
      The defaults for the specific board.
      Throws:
      IllegalArgumentException - if an unsupported board version is used
    • get

      public static SystemVariableBootValues get​(MachineVersion boardVersion)
      Get the default values of the system variables that get passed to SpiNNaker during boot for a particular version of SpiNNaker board. This set of defaults will be unmodifiable and must be copied (with the appropriate constructor) to be changed.
      Parameters:
      boardVersion - Which sort of SpiNN board is being booted.
      Returns:
      The defaults for the specific board.
      Throws:
      IllegalArgumentException - if an unsupported board version is used
    • addToBuffer

      public void addToBuffer​(ByteBuffer buffer)
      Description copied from interface: SerializableMessage
      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 little-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.

      Calling this method should not update the internal state of the message. It should be possible to add the message to multiple buffers without special precautions by the caller.

      Specified by:
      addToBuffer in interface SerializableMessage
      Parameters:
      buffer - The buffer to write into.