Interface TransceiverInterface

All Superinterfaces:
AutoCloseable, BMPTransceiverInterface
All Known Implementing Classes:
Transceiver

public interface TransceiverInterface extends BMPTransceiverInterface
The interface supported by the Transceiver. Emulates a lot of default handling and variant-type handling by Python.

Note that operations on a BMP are always thread-unsafe.

Author:
Donal Fellows
  • Field Details

    • LAUNCH_DELAY

      static final int LAUNCH_DELAY
      Delay between starting a program on a core and checking to see if the core is ready for operational use. In milliseconds.
      See Also:
    • TIMEOUT_DISABLED

      static final Integer TIMEOUT_DISABLED
      A marker to indicate that no timeout applies.
    • DEFAULT_POLL_INTERVAL

      static final int DEFAULT_POLL_INTERVAL
      How often to poll by default.
      See Also:
    • DEFAULT_ERROR_STATES

      static final EnumSet<CPUState> DEFAULT_ERROR_STATES
      The set of states that indicate a core in a failure state.
    • DEFAULT_CHECK_INTERVAL

      static final int DEFAULT_CHECK_INTERVAL
      What proportion of checks are to be expensive full checks.
      See Also:
    • BOARD_BOOT_RETRIES

      static final int BOARD_BOOT_RETRIES
      How many times to try booting a board.
      See Also:
  • Method Details

    • getScampConnectionSelector

      @ParallelSafe ConnectionSelector<SCPConnection> getScampConnectionSelector()
      Returns:
      The connection selector to use for SCP messages.
    • sendSCPMessage

      @ParallelSafe void sendSCPMessage(@NotNull @NotNull SCPRequest<?> message, @NotNull @NotNull SCPConnection connection) throws IOException
      Sends an SCP message, without expecting a response.
      Parameters:
      message - The message to send
      connection - The connection to use (omit to pick a random one)
      Throws:
      IOException - If anything goes wrong with networking.
    • sendSDPMessage

      @ParallelSafe default void sendSDPMessage(@NotNull @NotNull SDPMessage message) throws IOException
      Sends an SDP message using one of the connections.
      Parameters:
      message - The message to send
      Throws:
      IOException - If anything goes wrong with networking.
    • sendSDPMessage

      @ParallelSafe void sendSDPMessage(@NotNull @NotNull SDPMessage message, SDPConnection connection) throws IOException
      Sends an SDP message using one of the connections.
      Parameters:
      message - The message to send
      connection - An optional connection to use
      Throws:
      IOException - If anything goes wrong with networking.
    • getMachineDimensions

      Get the maximum chip x-coordinate and maximum chip y-coordinate of the chips in the machine.

      WARNING! This operation is unsafe in a multi-threaded context unless previously called from a parallel-safe situation.

      Returns:
      The dimensions of the machine
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • getMachineDetails

      Get the details of the machine made up of chips on a board and how they are connected to each other.

      WARNING! This operation is unsafe in a multi-threaded context unless previously called from a parallel-safe situation.

      Returns:
      A machine description
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • isConnected

      @ParallelSafe default boolean isConnected()
      Determines if the board can be contacted.
      Returns:
      True if the board can be contacted, False otherwise
    • isConnected

      @ParallelSafe boolean isConnected(Connection connection)
      Determines if the board can be contacted.
      Parameters:
      connection - The connection which is to be tested. If null, all connections will be tested, and the board will be considered to be connected if any one connection works.
      Returns:
      True if the board can be contacted, False otherwise
    • getScampVersion

      Get the version of SCAMP which is running on the board.
      Returns:
      The version identifier
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • getScampVersion

      @ParallelSafe @CheckReturnValue default VersionInfo getScampVersion(@NotNull @NotNull ConnectionSelector<SCPConnection> connectionSelector) throws IOException, ProcessException, InterruptedException
      Get the version of SCAMP which is running on the board.
      Parameters:
      connectionSelector - the connection to send the SCAMP version or none (if none then a random SCAMP connection is used).
      Returns:
      The version identifier
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • getScampVersion

      Get the version of SCAMP which is running on the board.
      Parameters:
      chip - the coordinates of the chip to query for SCAMP version
      Returns:
      The version identifier
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • getScampVersion

      @ParallelSafe @CheckReturnValue VersionInfo getScampVersion(@Valid @Valid HasChipLocation chip, @NotNull @NotNull ConnectionSelector<SCPConnection> connectionSelector) throws IOException, ProcessException, InterruptedException
      Get the version of SCAMP which is running on the board.
      Parameters:
      connectionSelector - the connection to send the SCAMP version or none (if none then a random SCAMP connection is used).
      chip - the coordinates of the chip to query for SCAMP version
      Returns:
      The version identifier
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • bootBoard

      @ParallelUnsafe default void bootBoard() throws InterruptedException, IOException
      Attempt to boot the board. No check is performed to see if the board is already booted.

      WARNING! This operation is unsafe in a multi-threaded context.

      Throws:
      IOException - If anything goes wrong with networking.
      InterruptedException - If the thread is interrupted while waiting.
    • bootBoard

      Attempt to boot the board. No check is performed to see if the board is already booted.

      WARNING! This operation is unsafe in a multi-threaded context.

      Parameters:
      extraBootValues - extra values to set during boot
      Throws:
      IOException - If anything goes wrong with networking.
      InterruptedException - If the thread is interrupted while waiting.
    • ensureBoardIsReady

      Ensure that the board is ready to interact with this version of the transceiver. Boots the board if not already booted and verifies that the version of SCAMP running is compatible with this transceiver.

      WARNING! This operation is unsafe in a multi-threaded context.

      Returns:
      The version identifier
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the thread is interrupted while waiting.
    • ensureBoardIsReady

      Ensure that the board is ready to interact with this version of the transceiver. Boots the board if not already booted and verifies that the version of SCAMP running is compatible with this transceiver.

      WARNING! This operation is unsafe in a multi-threaded context.

      Parameters:
      extraBootValues - Any additional values to set during boot
      Returns:
      The version identifier
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the thread is interrupted while waiting.
    • ensureBoardIsReady

      @ParallelUnsafe default VersionInfo ensureBoardIsReady(@PositiveOrZero @jakarta.validation.constraints.PositiveOrZero int numRetries) throws IOException, ProcessException, InterruptedException
      Ensure that the board is ready to interact with this version of the transceiver. Boots the board if not already booted and verifies that the version of SCAMP running is compatible with this transceiver.

      WARNING! This operation is unsafe in a multi-threaded context.

      Parameters:
      numRetries - The number of times to retry booting
      Returns:
      The version identifier
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the thread is interrupted while waiting.
    • ensureBoardIsReady

      @ParallelUnsafe VersionInfo ensureBoardIsReady(@PositiveOrZero @jakarta.validation.constraints.PositiveOrZero int numRetries, Map<SystemVariableDefinition,Object> extraBootValues) throws IOException, ProcessException, InterruptedException
      Ensure that the board is ready to interact with this version of the transceiver. Boots the board if not already booted and verifies that the version of SCAMP running is compatible with this transceiver.

      WARNING! This operation is unsafe in a multi-threaded context.

      Parameters:
      numRetries - The number of times to retry booting
      extraBootValues - Any additional values to set during boot
      Returns:
      The version identifier
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the thread is interrupted while waiting.
    • getCPUInformation

      Get information about the processors on the board.

      WARNING! This operation is unsafe in a multi-threaded context.

      Returns:
      An iterable of the CPU information for all cores.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • getCPUInformation

      Get information about a specific processor on the board.
      Parameters:
      core - The coordinates of the core to get the information about
      Returns:
      The CPU information for the selected core
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • getCPUInformation

      Get information about some processors on the board.

      WARNING! This operation is unsafe in a multi-threaded context unless the coreSubsets only contains cores on a single board.

      Parameters:
      coreSubsets - A set of chips and cores from which to get the information. If null, the information from all of the cores on all of the chips on the board are obtained.
      Returns:
      An iterable of the CPU information for the selected cores, or all cores if coreSubsets is null.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • getFullChipInformation

      Get the full information about the chip. This is obtained by reading the full system variable block for the chip. This is an operation that takes a bit of time; the view is not guaranteed to be internally consistent though most values are very unlikely to change during the read.
      Parameters:
      chip - Which chip are we getting information about?
      Returns:
      A full description of the chip.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • getUser0RegisterAddress

      @ParallelSafe default MemoryLocation getUser0RegisterAddress(@Valid @Valid HasCoreLocation core)
      Get the address of user0 for a given processor on the board. This does not read from the processor.
      Parameters:
      core - the coordinates of the core to get the user0 address for
      Returns:
      The address for user0 register for this processor
    • getUser0RegisterAddress

      @ParallelSafe default MemoryLocation getUser0RegisterAddress(@ValidP @uk.ac.manchester.spinnaker.machine.ValidP int p)
      Get the address of user0 for a given processor on the board. This does not read from the processor.
      Parameters:
      p - the processor ID to get the user0 address for
      Returns:
      The address for user0 register for this processor
    • getUser0RegisterAddress

      @ParallelSafe default MemoryLocation getUser0RegisterAddress(@Valid @Valid Processor processor)
      Get the address of user0 for a given processor on the board. This does not read from the processor.
      Parameters:
      processor - the processor to get the user0 address for
      Returns:
      The address for user0 register for this processor
    • getUser1RegisterAddress

      @ParallelSafe default MemoryLocation getUser1RegisterAddress(@Valid @Valid HasCoreLocation core)
      Get the address of user1 for a given processor on the board. This does not read from the processor.
      Parameters:
      core - the coordinates of the core to get the user1 address for
      Returns:
      The address for user1 register for this processor
    • getUser1RegisterAddress

      @ParallelSafe default MemoryLocation getUser1RegisterAddress(@ValidP @uk.ac.manchester.spinnaker.machine.ValidP int p)
      Get the address of user1 for a given processor on the board. This does not read from the processor.
      Parameters:
      p - the processor ID to get the user1 address for
      Returns:
      The address for user1 register for this processor; this will be in System RAM and be accessible from any core of the chip.
    • getUser1RegisterAddress

      @ParallelSafe default MemoryLocation getUser1RegisterAddress(@Valid @Valid Processor processor)
      Get the address of user1 for a given processor on the board. This does not read from the processor.
      Parameters:
      processor - the processor to get the user1 address for
      Returns:
      The address for user1 register for this processor; this will be in System RAM and be accessible from any core of the chip.
    • getUser2RegisterAddress

      @ParallelSafe default MemoryLocation getUser2RegisterAddress(@Valid @Valid HasCoreLocation core)
      Get the address of user2 for a given processor on the board. This does not read from the processor.
      Parameters:
      core - the coordinates of the core to get the user2 address for
      Returns:
      The address for user2 register for this processor; this will be in System RAM and be accessible from any core of the chip.
    • getUser2RegisterAddress

      @ParallelSafe default MemoryLocation getUser2RegisterAddress(@ValidP @uk.ac.manchester.spinnaker.machine.ValidP int p)
      Get the address of user2 for a given processor on the board. This does not read from the processor.
      Parameters:
      p - the processor ID to get the user2 address for
      Returns:
      The address for user0 register for this processor
    • getUser2RegisterAddress

      @ParallelSafe default MemoryLocation getUser2RegisterAddress(@Valid @Valid Processor processor)
      Get the address of user2 for a given processor on the board. This does not read from the processor.
      Parameters:
      processor - the processor to get the user2 address for
      Returns:
      The address for user0 register for this processor
    • getIobuf

      Get the contents of the IOBUF buffer for all processors.
      Returns:
      An iterable of the buffers, order undetermined.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • getIobuf

      Get the contents of IOBUF for a given core.
      Parameters:
      core - The coordinates of the processor to get the IOBUF for
      Returns:
      An IOBUF buffer
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • getIobuf

      Get the contents of the IOBUF buffer for a collection of processors.
      Parameters:
      coreSubsets - A set of chips and cores from which to get the buffers.
      Returns:
      An iterable of the buffers, which may not be in the order of coreSubsets
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • clearIobuf

      Clear the contents of the IOBUF buffer for all processors.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • clearIobuf

      @ParallelSafe default void clearIobuf(@Valid @Valid HasCoreLocation core) throws IOException, ProcessException, InterruptedException
      Clear the contents of the IOBUF buffer for a given core.
      Parameters:
      core - The coordinates of the processor to clear the IOBUF on.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • clearIobuf

      @ParallelSafeWithCare void clearIobuf(@Valid @Valid CoreSubsets coreSubsets) throws IOException, ProcessException, InterruptedException
      Clear the contents of the IOBUF buffer for a collection of processors.
      Parameters:
      coreSubsets - A set of chips and cores on which to clear the buffers.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • setWatchDogTimeoutOnChip

      @ParallelSafe void setWatchDogTimeoutOnChip(@Valid @Valid HasChipLocation chip, int watchdog) throws IOException, ProcessException, InterruptedException
      Set the value of the watch dog timer on a specific chip.
      Parameters:
      chip - coordinates of the chip to write new watchdog parameter to
      watchdog - value to set the timer count to
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • enableWatchDogTimerOnChip

      @ParallelSafe void enableWatchDogTimerOnChip(@Valid @Valid HasChipLocation chip, boolean watchdog) throws IOException, ProcessException, InterruptedException
      Enable or disable the watch dog timer on a specific chip.
      Parameters:
      chip - coordinates of the chip to write new watchdog parameter to
      watchdog - whether to enable (True) or disable (False) the watchdog timer
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • setWatchDogTimeout

      @ParallelUnsafe default void setWatchDogTimeout(int watchdog) throws IOException, ProcessException, InterruptedException
      Set the value of the watch dog timer.
      Parameters:
      watchdog - value to set the timer count to.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • enableWatchDogTimer

      @ParallelUnsafe default void enableWatchDogTimer(boolean watchdog) throws IOException, ProcessException, InterruptedException
      Enable or disable the watch dog timer.
      Parameters:
      watchdog - whether to enable (True) or disable (False) the watch dog timer
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • getCoreStateCount

      @ParallelUnsafe @CheckReturnValue int getCoreStateCount(@NotNull @NotNull AppID appID, @NotNull @NotNull CPUState state) throws IOException, ProcessException, InterruptedException
      Get a count of the number of cores which have a given state.

      WARNING! This operation is unsafe in a multi-threaded context.

      Parameters:
      appID - The ID of the application from which to get the count.
      state - The state count to get
      Returns:
      A count of the cores with the given status
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • execute

      @ParallelSafe default void execute(@Valid @Valid HasCoreLocation core, @NotNull @NotNull InputStream executable, @Positive @jakarta.validation.constraints.Positive int numBytes, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedException
      Start an executable running on a single core.
      Parameters:
      core - The coordinates of the core on which to run the executable
      executable - The data that is to be executed.
      numBytes - The number of bytes to read from the input stream.
      appID - The ID of the application with which to associate the executable
      Throws:
      IOException - If anything goes wrong with networking or with reading from the input stream.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the thread is interrupted while waiting.
    • execute

      @ParallelSafe default void execute(@Valid @Valid HasChipLocation chip, Collection<@ValidP Integer> processors, @NotNull @NotNull InputStream executable, @Positive @jakarta.validation.constraints.Positive int numBytes, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedException
      Start an executable running on a single chip.
      Parameters:
      chip - The coordinates of the chip on which to run the executable
      processors - The cores on the chip on which to run the application
      executable - The data that is to be executed.
      numBytes - The number of bytes to read from the input stream.
      appID - The ID of the application with which to associate the executable
      Throws:
      IOException - If anything goes wrong with networking or with reading from the input stream.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the thread is interrupted while waiting.
    • execute

      @ParallelSafe default void execute(@Valid @Valid HasCoreLocation core, @NotNull @NotNull InputStream executable, @Positive @jakarta.validation.constraints.Positive int numBytes, @NotNull @NotNull AppID appID, boolean wait) throws IOException, ProcessException, InterruptedException
      Start an executable running on a single core.
      Parameters:
      core - The coordinates of the core on which to run the executable
      executable - The data that is to be executed.
      numBytes - The number of bytes to read from the input stream.
      appID - The ID of the application with which to associate the executable
      wait - True if the binary should enter a "wait" state on loading
      Throws:
      IOException - If anything goes wrong with networking or with reading from the input stream.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the thread is interrupted while waiting.
    • execute

      @ParallelSafe void execute(@Valid @Valid HasChipLocation chip, Collection<@ValidP Integer> processors, @NotNull @NotNull InputStream executable, @Positive @jakarta.validation.constraints.Positive int numBytes, @NotNull @NotNull AppID appID, boolean wait) throws IOException, ProcessException, InterruptedException
      Start an executable running on a single chip.
      Parameters:
      chip - The coordinates of the chip on which to run the executable
      processors - The cores on the chip on which to run the application
      executable - The data that is to be executed.
      numBytes - The number of bytes to read from the input stream.
      appID - The ID of the application with which to associate the executable
      wait - True if the binary should enter a "wait" state on loading
      Throws:
      IOException - If anything goes wrong with networking or with reading from the input stream.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the thread is interrupted while waiting.
    • execute

      @ParallelSafe default void execute(@Valid @Valid HasCoreLocation core, @NotNull @NotNull File executable, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedException
      Start an executable running on a single core.
      Parameters:
      core - The coordinates of the core on which to run the executable
      executable - The data that is to be executed.
      appID - The ID of the application with which to associate the executable
      Throws:
      IOException - If anything goes wrong with networking or with reading from the file.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the thread is interrupted while waiting.
    • execute

      @ParallelSafe default void execute(@Valid @Valid HasChipLocation chip, Collection<@ValidP Integer> processors, @NotNull @NotNull File executable, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedException
      Start an executable running on a single chip.
      Parameters:
      chip - The coordinates of the chip on which to run the executable
      processors - The cores on the chip on which to run the application
      executable - The data that is to be executed.
      appID - The ID of the application with which to associate the executable
      Throws:
      IOException - If anything goes wrong with networking or with reading from the file.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the thread is interrupted while waiting.
    • execute

      @ParallelSafe default void execute(@Valid @Valid HasCoreLocation core, @NotNull @NotNull File executable, @NotNull @NotNull AppID appID, boolean wait) throws IOException, ProcessException, InterruptedException
      Start an executable running on a single core.
      Parameters:
      core - The coordinates of the core on which to run the executable
      executable - The data that is to be executed.
      appID - The ID of the application with which to associate the executable
      wait - True if the binary should enter a "wait" state on loading
      Throws:
      IOException - If anything goes wrong with networking or with reading from the file.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the thread is interrupted while waiting.
    • execute

      @ParallelSafe void execute(@Valid @Valid HasChipLocation chip, Collection<@ValidP Integer> processors, @NotNull @NotNull File executable, @NotNull @NotNull AppID appID, boolean wait) throws IOException, ProcessException, InterruptedException
      Start an executable running on a single chip.
      Parameters:
      chip - The coordinates of the chip on which to run the executable
      processors - The cores on the chip on which to run the application
      executable - The data that is to be executed.
      appID - The ID of the application with which to associate the executable
      wait - True if the binary should enter a "wait" state on loading
      Throws:
      IOException - If anything goes wrong with networking or with reading from the file.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the thread is interrupted while waiting.
    • execute

      @ParallelSafe default void execute(@Valid @Valid HasCoreLocation core, @NotNull @NotNull ByteBuffer executable, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedException
      Start an executable running on a single core.
      Parameters:
      core - The coordinates of the core on which to run the executable
      executable - The data that is to be executed.
      appID - The ID of the application with which to associate the executable
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the thread is interrupted while waiting.
    • execute

      @ParallelSafe default void execute(@Valid @Valid HasChipLocation chip, Collection<@ValidP Integer> processors, @NotNull @NotNull ByteBuffer executable, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedException
      Start an executable running on a single chip.
      Parameters:
      chip - The coordinates of the chip on which to run the executable
      processors - The cores on the chip on which to run the application
      executable - The data that is to be executed.
      appID - The ID of the application with which to associate the executable
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the thread is interrupted while waiting.
    • execute

      @ParallelSafe default void execute(@Valid @Valid HasCoreLocation core, @NotNull @NotNull ByteBuffer executable, @NotNull @NotNull AppID appID, boolean wait) throws IOException, ProcessException, InterruptedException
      Start an executable running on a single core.
      Parameters:
      core - The coordinates of the core on which to run the executable
      executable - The data that is to be executed.
      appID - The ID of the application with which to associate the executable
      wait - True if the binary should enter a "wait" state on loading
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the thread is interrupted while waiting.
    • execute

      @ParallelSafe void execute(HasChipLocation chip, Collection<Integer> processors, ByteBuffer executable, AppID appID, boolean wait) throws IOException, ProcessException, InterruptedException
      Start an executable running on a single chip.
      Parameters:
      chip - The coordinates of the chip on which to run the executable
      processors - The cores on the chip on which to run the application
      executable - The data that is to be executed.
      appID - The ID of the application with which to associate the executable
      wait - True if the binary should enter a "wait" state on loading
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the thread is interrupted while waiting.
    • executeFlood

      @ParallelSafeWithCare default void executeFlood(@Valid @Valid CoreSubsets coreSubsets, @NotNull @NotNull InputStream executable, @Positive @jakarta.validation.constraints.Positive int numBytes, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedException
      Start an executable running on multiple places on the board. This will be optimised based on the selected cores, but it may still require a number of communications with the board to execute.

      WARNING! This operation is unsafe in a multi-threaded context.

      Parameters:
      coreSubsets - Which cores on which chips to start the executable
      executable - The data that is to be executed.
      numBytes - The size of the executable data in bytes.
      appID - The ID of the application with which to associate the executable
      Throws:
      IOException - If anything goes wrong with networking or with reading from the input stream.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the thread is interrupted while waiting.
    • executeFlood

      @ParallelSafeWithCare void executeFlood(@Valid @Valid CoreSubsets coreSubsets, @NotNull @NotNull InputStream executable, @Positive @jakarta.validation.constraints.Positive int numBytes, @NotNull @NotNull AppID appID, boolean wait) throws IOException, ProcessException, InterruptedException
      Start an executable running on multiple places on the board. This will be optimised based on the selected cores, but it may still require a number of communications with the board to execute.

      WARNING! This operation is unsafe in a multi-threaded context.

      Parameters:
      coreSubsets - Which cores on which chips to start the executable
      executable - The data that is to be executed.
      numBytes - The size of the executable data in bytes.
      appID - The ID of the application with which to associate the executable
      wait - True if the processors should enter a "wait" state on loading
      Throws:
      IOException - If anything goes wrong with networking or with reading from the input stream.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the thread is interrupted while waiting.
    • executeFlood

      @ParallelSafeWithCare default void executeFlood(@Valid @Valid CoreSubsets coreSubsets, @NotNull @NotNull File executable, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedException
      Start an executable running on multiple places on the board. This will be optimised based on the selected cores, but it may still require a number of communications with the board to execute.

      WARNING! This operation is unsafe in a multi-threaded context.

      Parameters:
      coreSubsets - Which cores on which chips to start the executable
      executable - The data that is to be executed.
      appID - The ID of the application with which to associate the executable
      Throws:
      IOException - If anything goes wrong with networking or with reading from the file.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the thread is interrupted while waiting.
    • executeFlood

      @ParallelSafeWithCare void executeFlood(@Valid @Valid CoreSubsets coreSubsets, @NotNull @NotNull File executable, @NotNull @NotNull AppID appID, boolean wait) throws IOException, ProcessException, InterruptedException
      Start an executable running on multiple places on the board. This will be optimised based on the selected cores, but it may still require a number of communications with the board to execute.

      WARNING! This operation is unsafe in a multi-threaded context.

      Parameters:
      coreSubsets - Which cores on which chips to start the executable
      executable - The data that is to be executed.
      appID - The ID of the application with which to associate the executable
      wait - True if the processors should enter a "wait" state on loading
      Throws:
      IOException - If anything goes wrong with networking or with reading from the file.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the thread is interrupted while waiting.
    • executeFlood

      @ParallelSafeWithCare default void executeFlood(@Valid @Valid CoreSubsets coreSubsets, @NotNull @NotNull ByteBuffer executable, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedException
      Start an executable running on multiple places on the board. This will be optimised based on the selected cores, but it may still require a number of communications with the board to execute.

      WARNING! This operation is unsafe in a multi-threaded context.

      Parameters:
      coreSubsets - Which cores on which chips to start the executable
      executable - The data that is to be executed.
      appID - The ID of the application with which to associate the executable
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the thread is interrupted while waiting.
    • executeFlood

      @ParallelSafeWithCare void executeFlood(@Valid @Valid CoreSubsets coreSubsets, @NotNull @NotNull ByteBuffer executable, @NotNull @NotNull AppID appID, boolean wait) throws IOException, ProcessException, InterruptedException
      Start an executable running on multiple places on the board. This will be optimised based on the selected cores, but it may still require a number of communications with the board to execute.

      WARNING! This operation is unsafe in a multi-threaded context.

      Parameters:
      coreSubsets - Which cores on which chips to start the executable
      executable - The data that is to be executed.
      appID - The ID of the application with which to associate the executable
      wait - True if the processors should enter a "wait" state on loading
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the thread is interrupted while waiting.
    • executeApplication

      @ParallelUnsafe default void executeApplication(@Valid @Valid ExecutableTargets executableTargets, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedException, SpinnmanException
      Execute a set of binaries that make up a complete application on specified cores, wait for them to be ready and then start all of the binaries. Note this will get the binaries into c_main() but will not signal the barrier.

      WARNING! This operation is unsafe in a multi-threaded context.

      Parameters:
      executableTargets - The binaries to be executed and the cores to execute them on
      appID - The application ID to give this application
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the thread is interrupted while waiting.
      SpinnmanException - If some cores enter an unexpected state.
    • updateRuntime

      @ParallelUnsafe default void updateRuntime(@PositiveOrZero @PositiveOrZero Integer runTimesteps, @PositiveOrZero @jakarta.validation.constraints.PositiveOrZero int currentTime, @PositiveOrZero @jakarta.validation.constraints.PositiveOrZero int syncTimesteps) throws IOException, ProcessException, InterruptedException
      Set the running time information for all processors.
      Parameters:
      runTimesteps - How many machine timesteps will the run last. null is used to indicate an infinite (unbounded until explicitly stopped) run.
      currentTime - The current simulation time.
      syncTimesteps - The number of timesteps before we pause to synchronise.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • updateRuntime

      @ParallelSafe default void updateRuntime(@PositiveOrZero @PositiveOrZero Integer runTimesteps, @PositiveOrZero @jakarta.validation.constraints.PositiveOrZero int currentTime, @PositiveOrZero @jakarta.validation.constraints.PositiveOrZero int syncTimesteps, @Valid @Valid HasCoreLocation core) throws IOException, ProcessException, InterruptedException
      Set the running time information for a given core.
      Parameters:
      runTimesteps - How many machine timesteps will the run last. null is used to indicate an infinite (unbounded until explicitly stopped) run.
      currentTime - The current simulation time.
      syncTimesteps - The number of timesteps before we pause to synchronise.
      core - The coordinates of the processor to clear the IOBUF on.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • updateRuntime

      @ParallelSafeWithCare void updateRuntime(@PositiveOrZero @PositiveOrZero Integer runTimesteps, @PositiveOrZero @jakarta.validation.constraints.PositiveOrZero int currentTime, @PositiveOrZero @jakarta.validation.constraints.PositiveOrZero int syncTimesteps, @Valid @Valid CoreSubsets coreSubsets) throws IOException, ProcessException, InterruptedException
      Set the running time information for a collection of processors.
      Parameters:
      runTimesteps - How many machine timesteps will the run last. null is used to indicate an infinite (unbounded until explicitly stopped) run.
      currentTime - The current simulation time.
      syncTimesteps - The number of timesteps before we pause to synchronise.
      coreSubsets - A set of chips and cores on which to set the running time.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • updateProvenanceAndExit

      @ParallelUnsafe default void updateProvenanceAndExit() throws IOException, ProcessException, InterruptedException
      Tell all running application cores to write their provenance data to a location where it can be read back, and then to go into the FINISHED state.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • updateProvenanceAndExit

      @ParallelSafe default void updateProvenanceAndExit(@Valid @Valid HasCoreLocation core) throws IOException, ProcessException, InterruptedException
      Tell a running application core to write its provenance data to a location where it can be read back, and then to go into the FINISHED state.
      Parameters:
      core - The core to tell to finish.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • updateProvenanceAndExit

      @ParallelSafeWithCare void updateProvenanceAndExit(@Valid @Valid CoreSubsets coreSubsets) throws IOException, ProcessException, InterruptedException
      Tell some running application cores to write their provenance data to a location where it can be read back, and then to go into their FINISHED state.
      Parameters:
      coreSubsets - A set of cores tell to finish.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeMemory

      @ParallelSafe default void writeMemory(@Valid @Valid HasChipLocation chip, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull InputStream dataStream, @Positive @jakarta.validation.constraints.Positive int numBytes) throws IOException, ProcessException, InterruptedException
      Write to the SDRAM on the board.
      Parameters:
      chip - The coordinates of the chip where the memory is that is to be written to
      baseAddress - The address in SDRAM where the region of memory is to be written
      dataStream - The stream of data that is to be written.
      numBytes - The amount of data to be written in bytes.
      Throws:
      IOException - If anything goes wrong with networking or reading from the input stream.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeMemory

      @ParallelSafe void writeMemory(@Valid @Valid HasCoreLocation core, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull InputStream dataStream, @Positive @jakarta.validation.constraints.Positive int numBytes) throws IOException, ProcessException, InterruptedException
      Write to the SDRAM on the board.
      Parameters:
      core - The coordinates of the core where the memory is that is to be written to
      baseAddress - The address in SDRAM where the region of memory is to be written
      dataStream - The stream of data that is to be written.
      numBytes - The amount of data to be written in bytes.
      Throws:
      IOException - If anything goes wrong with networking or reading from the input stream.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeMemory

      @ParallelSafe default void writeMemory(@Valid @Valid HasChipLocation chip, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull File dataFile) throws IOException, ProcessException, InterruptedException
      Write to the SDRAM on the board.
      Parameters:
      chip - The coordinates of the chip where the memory is that is to be written to
      baseAddress - The address in SDRAM where the region of memory is to be written
      dataFile - The file holding the data that is to be written.
      Throws:
      IOException - If anything goes wrong with networking or reading from the file.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeMemory

      @ParallelSafe void writeMemory(@Valid @Valid HasCoreLocation core, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull File dataFile) throws IOException, ProcessException, InterruptedException
      Write to the SDRAM on the board.
      Parameters:
      core - The coordinates of the core where the memory is that is to be written to
      baseAddress - The address in SDRAM where the region of memory is to be written
      dataFile - The file holding the data that is to be written.
      Throws:
      IOException - If anything goes wrong with networking or reading from the file.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeMemory

      @ParallelSafe default void writeMemory(@Valid @Valid HasChipLocation chip, @NotNull @NotNull MemoryLocation baseAddress, int dataWord) throws IOException, ProcessException, InterruptedException
      Write to the SDRAM on the board.
      Parameters:
      chip - The coordinates of the chip where the memory is that is to be written to
      baseAddress - The address in SDRAM where the region of memory is to be written
      dataWord - The word that is to be written (as 4 bytes).
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeMemory

      @ParallelSafe default void writeMemory(@Valid @Valid HasCoreLocation core, @NotNull @NotNull MemoryLocation baseAddress, int dataWord) throws IOException, ProcessException, InterruptedException
      Write to the SDRAM (or System RAM) on the board.
      Parameters:
      core - The coordinates of the core where the memory is that is to be written to
      baseAddress - The address in SDRAM where the region of memory is to be written
      dataWord - The word that is to be written (as 4 bytes).
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeMemory

      @ParallelSafe default void writeMemory(@Valid @Valid HasChipLocation chip, @NotNull @NotNull MemoryLocation baseAddress, @NotEmpty @jakarta.validation.constraints.NotEmpty byte[] data) throws IOException, ProcessException, InterruptedException
      Write to the SDRAM on the board.
      Parameters:
      chip - The coordinates of the core where the memory is that is to be written to
      baseAddress - The address in SDRAM where the region of memory is to be written
      data - The data that is to be written.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeMemory

      @ParallelSafe default void writeMemory(@Valid @Valid HasCoreLocation core, @NotNull @NotNull MemoryLocation baseAddress, @NotEmpty @jakarta.validation.constraints.NotEmpty byte[] data) throws IOException, ProcessException, InterruptedException
      Write to the SDRAM on the board.
      Parameters:
      core - The coordinates of the core where the memory is that is to be written to
      baseAddress - The address in SDRAM where the region of memory is to be written
      data - The data that is to be written.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeMemory

      @ParallelSafe default void writeMemory(@Valid @Valid HasChipLocation chip, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull ByteBuffer data) throws IOException, ProcessException, InterruptedException
      Write to the SDRAM on the board.
      Parameters:
      chip - The coordinates of the core where the memory is that is to be written to
      baseAddress - The address in SDRAM where the region of memory is to be written
      data - The data that is to be written. The data should be from the position to the limit.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeMemory

      @ParallelSafe void writeMemory(@Valid @Valid HasCoreLocation core, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull ByteBuffer data) throws IOException, ProcessException, InterruptedException
      Write to the SDRAM (or System RAM) on the board.
      Parameters:
      core - The coordinates of the core where the memory is that is to be written to
      baseAddress - The address in SDRAM where the region of memory is to be written
      data - The data that is to be written. The data should be from the position to the limit.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeUser0

      default void writeUser0(@Valid @Valid HasCoreLocation core, int value) throws ProcessException, IOException, InterruptedException
      Write to the user0 register of a core.
      Parameters:
      core - The coordinates of the core whose register is to be written to
      value - The word of data that is to be written.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeUser0

      default void writeUser0(@Valid @Valid HasCoreLocation core, @NotNull @NotNull MemoryLocation pointer) throws ProcessException, IOException, InterruptedException
      Write to the user0 register of a core.
      Parameters:
      core - The coordinates of the core whose register is to be written to
      pointer - The pointer/address that is to be written to the register.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeUser1

      default void writeUser1(@Valid @Valid HasCoreLocation core, int value) throws ProcessException, IOException, InterruptedException
      Write to the user1 register of a core.
      Parameters:
      core - The coordinates of the core whose register is to be written to
      value - The word of data that is to be written.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeUser1

      default void writeUser1(@Valid @Valid HasCoreLocation core, @NotNull @NotNull MemoryLocation pointer) throws ProcessException, IOException, InterruptedException
      Write to the user1 register of a core.
      Parameters:
      core - The coordinates of the core whose register is to be written to
      pointer - The pointer/address that is to be written to the register.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeUser2

      default void writeUser2(@Valid @Valid HasCoreLocation core, int value) throws ProcessException, IOException, InterruptedException
      Write to the user2 register of a core.
      Parameters:
      core - The coordinates of the core whose register is to be written to
      value - The word of data that is to be written.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeUser2

      default void writeUser2(@Valid @Valid HasCoreLocation core, @NotNull @NotNull MemoryLocation pointer) throws ProcessException, IOException, InterruptedException
      Write to the user2 register of a core.
      Parameters:
      core - The coordinates of the core whose register is to be written to
      pointer - The pointer/address that is to be written to the register.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeNeighbourMemory

      @ParallelSafeWithCare default void writeNeighbourMemory(@Valid @Valid HasChipLocation chip, @NotNull @NotNull Direction link, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull InputStream dataStream, @Positive @jakarta.validation.constraints.Positive int numBytes) throws IOException, ProcessException, InterruptedException
      Write to the memory of a neighbouring chip using a LINK_WRITE SCP command. If sent to a BMP, this command can be used to communicate with the FPGAs' debug registers; in that case, the link must be the direction with the same ID as the ID of the FPGA to communicate with.

      WARNING! This operation is unsafe in a multi-threaded context if the link leaves the current board.

      Parameters:
      chip - The coordinates of the chip whose neighbour is to be written to
      link - The link direction to send the request along
      baseAddress - The address in SDRAM where the region of memory is to be written
      dataStream - The stream of data that is to be written.
      numBytes - The amount of data to be written in bytes.
      Throws:
      IOException - If anything goes wrong with networking or with reading from the input stream.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeNeighbourMemory

      @ParallelSafeWithCare void writeNeighbourMemory(@Valid @Valid HasCoreLocation core, @NotNull @NotNull Direction link, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull InputStream dataStream, @Positive @jakarta.validation.constraints.Positive int numBytes) throws IOException, ProcessException, InterruptedException
      Write to the memory of a neighbouring chip using a LINK_WRITE SCP command. If sent to a BMP, this command can be used to communicate with the FPGAs' debug registers; in that case, the link must be the direction with the same ID as the ID of the FPGA to communicate with.

      WARNING! This operation is unsafe in a multi-threaded context if the link leaves the current board.

      Parameters:
      core - The coordinates of the core whose neighbour is to be written to; the CPU to use is typically 0 (or if a BMP, the slot number)
      link - The link direction to send the request along
      baseAddress - The address in SDRAM where the region of memory is to be written
      dataStream - The stream of data that is to be written.
      numBytes - The amount of data to be written in bytes.
      Throws:
      IOException - If anything goes wrong with networking or with reading from the input stream.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeNeighbourMemory

      @ParallelSafeWithCare default void writeNeighbourMemory(@Valid @Valid HasChipLocation chip, @NotNull @NotNull Direction link, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull File dataFile) throws IOException, ProcessException, InterruptedException
      Write to the memory of a neighbouring chip using a LINK_WRITE SCP command. If sent to a BMP, this command can be used to communicate with the FPGAs' debug registers; in that case, the link must be the direction with the same ID as the ID of the FPGA to communicate with.

      WARNING! This operation is unsafe in a multi-threaded context if the link leaves the current board.

      Parameters:
      chip - The coordinates of the chip whose neighbour is to be written to
      link - The link direction to send the request along
      baseAddress - The address in SDRAM where the region of memory is to be written
      dataFile - The file holding the data that is to be written.
      Throws:
      IOException - If anything goes wrong with networking or with reading from the file.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeNeighbourMemory

      @ParallelSafeWithCare void writeNeighbourMemory(@Valid @Valid HasCoreLocation core, @NotNull @NotNull Direction link, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull File dataFile) throws IOException, ProcessException, InterruptedException
      Write to the memory of a neighbouring chip using a LINK_WRITE SCP command. If sent to a BMP, this command can be used to communicate with the FPGAs' debug registers; in that case, the link must be the direction with the same ID as the ID of the FPGA to communicate with.

      WARNING! This operation is unsafe in a multi-threaded context if the link leaves the current board.

      Parameters:
      core - The coordinates of the core whose neighbour is to be written to; the CPU to use is typically 0 (or if a BMP, the slot number)
      link - The link direction to send the request along
      baseAddress - The address in SDRAM where the region of memory is to be written
      dataFile - The name of the file holding the data that is to be written.
      Throws:
      IOException - If anything goes wrong with networking or with reading from the file.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeNeighbourMemory

      @ParallelSafeWithCare default void writeNeighbourMemory(@Valid @Valid HasChipLocation chip, @NotNull @NotNull Direction link, @NotNull @NotNull MemoryLocation baseAddress, int dataWord) throws IOException, ProcessException, InterruptedException
      Write to the memory of a neighbouring chip using a LINK_WRITE SCP command. If sent to a BMP, this command can be used to communicate with the FPGAs' debug registers; in that case, the link must be the direction with the same ID as the ID of the FPGA to communicate with.

      WARNING! This operation is unsafe in a multi-threaded context if the link leaves the current board.

      Parameters:
      chip - The coordinates of the chip whose neighbour is to be written to
      link - The link direction to send the request along
      baseAddress - The address in SDRAM where the region of memory is to be written
      dataWord - The word that is to be written.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeNeighbourMemory

      @ParallelSafeWithCare default void writeNeighbourMemory(@Valid @Valid HasCoreLocation core, @NotNull @NotNull Direction link, @NotNull @NotNull MemoryLocation baseAddress, int dataWord) throws IOException, ProcessException, InterruptedException
      Write to the memory of a neighbouring chip using a LINK_WRITE SCP command. If sent to a BMP, this command can be used to communicate with the FPGAs' debug registers; in that case, the link must be the direction with the same ID as the ID of the FPGA to communicate with.

      WARNING! This operation is unsafe in a multi-threaded context if the link leaves the current board.

      Parameters:
      core - The coordinates of the core whose neighbour is to be written to; the CPU to use is typically 0 (or if a BMP, the slot number)
      link - The link direction to send the request along
      baseAddress - The address in SDRAM where the region of memory is to be written
      dataWord - The word that is to be written.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeNeighbourMemory

      @ParallelSafeWithCare default void writeNeighbourMemory(@Valid @Valid HasChipLocation chip, @NotNull @NotNull Direction link, @NotNull @NotNull MemoryLocation baseAddress, @NotEmpty @jakarta.validation.constraints.NotEmpty byte[] data) throws IOException, ProcessException, InterruptedException
      Write to the memory of a neighbouring chip using a LINK_WRITE SCP command. If sent to a BMP, this command can be used to communicate with the FPGAs' debug registers; in that case, the link must be the direction with the same ID as the ID of the FPGA to communicate with.

      WARNING! This operation is unsafe in a multi-threaded context if the link leaves the current board.

      Parameters:
      chip - The coordinates of the chip whose neighbour is to be written to
      link - The link direction to send the request along
      baseAddress - The address in SDRAM where the region of memory is to be written
      data - The data that is to be written.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeNeighbourMemory

      @ParallelSafeWithCare default void writeNeighbourMemory(@Valid @Valid HasCoreLocation core, @NotNull @NotNull Direction link, @NotNull @NotNull MemoryLocation baseAddress, @NotEmpty @jakarta.validation.constraints.NotEmpty byte[] data) throws IOException, ProcessException, InterruptedException
      Write to the memory of a neighbouring chip using a LINK_WRITE SCP command. If sent to a BMP, this command can be used to communicate with the FPGAs' debug registers; in that case, the link must be the direction with the same ID as the ID of the FPGA to communicate with.

      WARNING! This operation is unsafe in a multi-threaded context if the link leaves the current board.

      Parameters:
      core - The coordinates of the core whose neighbour is to be written to; the CPU to use is typically 0 (or if a BMP, the slot number)
      link - The link direction to send the request along
      baseAddress - The address in SDRAM where the region of memory is to be written
      data - The data that is to be written.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeNeighbourMemory

      @ParallelSafeWithCare default void writeNeighbourMemory(@Valid @Valid HasChipLocation chip, @NotNull @NotNull Direction link, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull ByteBuffer data) throws IOException, ProcessException, InterruptedException
      Write to the memory of a neighbouring chip using a LINK_WRITE SCP command. If sent to a BMP, this command can be used to communicate with the FPGAs' debug registers; in that case, the link must be the direction with the same ID as the ID of the FPGA to communicate with.

      WARNING! This operation is unsafe in a multi-threaded context if the link leaves the current board.

      Parameters:
      chip - The coordinates of the chip whose neighbour is to be written to
      link - The link direction to send the request along
      baseAddress - The address in SDRAM where the region of memory is to be written
      data - The data that is to be written. The data should be from the position to the limit.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeNeighbourMemory

      @ParallelSafeWithCare void writeNeighbourMemory(@Valid @Valid HasCoreLocation core, @NotNull @NotNull Direction link, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull ByteBuffer data) throws IOException, ProcessException, InterruptedException
      Write to the memory of a neighbouring chip using a LINK_WRITE SCP command. If sent to a BMP, this command can be used to communicate with the FPGAs' debug registers; in that case, the link must be the direction with the same ID as the ID of the FPGA to communicate with.

      WARNING! This operation is unsafe in a multi-threaded context if the link leaves the current board.

      Parameters:
      core - The coordinates of the core whose neighbour is to be written to; the CPU to use is typically 0 (or if a BMP, the slot number)
      link - The link direction to send the request along
      baseAddress - The address in SDRAM where the region of memory is to be written
      data - The data that is to be written. The data should be from the position to the limit.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeMemoryFlood

      @ParallelUnsafe void writeMemoryFlood(@NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull InputStream dataStream, @Positive @jakarta.validation.constraints.Positive int numBytes) throws IOException, ProcessException, InterruptedException
      Write to the SDRAM of all chips.

      WARNING! This operation is unsafe in a multi-threaded context. It has interlocking, but you should not rely on it.

      Parameters:
      baseAddress - The address in SDRAM where the region of memory is to be written
      dataStream - The stream of data that is to be written.
      numBytes - The amount of data to be written in bytes.
      Throws:
      IOException - If anything goes wrong with networking or with reading from the input stream.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeMemoryFlood

      @ParallelUnsafe void writeMemoryFlood(@NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull File dataFile) throws IOException, ProcessException, InterruptedException
      Write to the SDRAM of all chips.

      WARNING! This operation is unsafe in a multi-threaded context. It has interlocking, but you should not rely on it.

      Parameters:
      baseAddress - The address in SDRAM where the region of memory is to be written
      dataFile - The name of the file holding the data that is to be written.
      Throws:
      IOException - If anything goes wrong with networking or with reading from the file.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeMemoryFlood

      @ParallelUnsafe default void writeMemoryFlood(@NotNull @NotNull MemoryLocation baseAddress, int dataWord) throws IOException, ProcessException, InterruptedException
      Write to the SDRAM of all chips.

      WARNING! This operation is unsafe in a multi-threaded context. It has interlocking, but you should not rely on it.

      Parameters:
      baseAddress - The address in SDRAM where the region of memory is to be written
      dataWord - The word that is to be written.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeMemoryFlood

      @ParallelUnsafe default void writeMemoryFlood(@NotNull @NotNull MemoryLocation baseAddress, @NotEmpty @jakarta.validation.constraints.NotEmpty byte[] data) throws IOException, ProcessException, InterruptedException
      Write to the SDRAM of all chips.

      WARNING! This operation is unsafe in a multi-threaded context. It has interlocking, but you should not rely on it.

      Parameters:
      baseAddress - The address in SDRAM where the region of memory is to be written
      data - The data that is to be written.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • writeMemoryFlood

      @ParallelUnsafe void writeMemoryFlood(@NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull ByteBuffer data) throws IOException, ProcessException, InterruptedException
      Write to the SDRAM of all chips.

      WARNING! This operation is unsafe in a multi-threaded context. It has interlocking, but you should not rely on it.

      Parameters:
      baseAddress - The address in SDRAM where the region of memory is to be written
      data - The data that is to be written. The data should be from the position to the limit.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • readMemory

      @ParallelSafe @CheckReturnValue default ByteBuffer readMemory(@Valid @Valid HasChipLocation chip, @NotNull @NotNull MemoryLocation baseAddress, @Positive @jakarta.validation.constraints.Positive int length) throws IOException, ProcessException, InterruptedException
      Read some areas of SDRAM from the board.
      Parameters:
      chip - The coordinates of the chip where the memory is to be read from
      baseAddress - The address in SDRAM where the region of memory to be read starts
      length - The length of the data to be read in bytes
      Returns:
      A little-endian buffer of data read, positioned at the start of the data
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • readMemory

      @ParallelSafe @CheckReturnValue ByteBuffer readMemory(@Valid @Valid HasCoreLocation core, @NotNull @NotNull MemoryLocation baseAddress, @Positive @jakarta.validation.constraints.Positive int length) throws IOException, ProcessException, InterruptedException
      Read some areas of SDRAM (or System RAM) from the board.
      Parameters:
      core - The coordinates of the core where the memory is to be read from
      baseAddress - The address in SDRAM where the region of memory to be read starts
      length - The length of the data to be read in bytes
      Returns:
      A little-endian buffer of data read, positioned at the start of the data
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • readMemory

      @ParallelSafe @CheckReturnValue default ByteBuffer readMemory(@Valid @Valid HasCoreLocation core, @NotNull @NotNull HeapElement element) throws IOException, ProcessException, InterruptedException
      Read the contents of an allocated block on the heap from the board. The SDRAM heap can be read from any core of that chip; the DTCM heap can only be read from one particular core.
      Parameters:
      core - The coordinates of the core where the memory is to be read from
      element - The heap element to read the contents of
      Returns:
      A little-endian buffer of data read, positioned at the start of the data, or null if the heap element is free.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • readRegion

      Read an area associated with a recording region from SDRAM from a core of a chip on the board.
      Parameters:
      region - The recording region that is being read. Describes which core produced the data, what DSE index the data came from, and where in memory to actually read.
      storage - The database to write to.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      StorageException - If anything goes wrong with access to the database.
      InterruptedException - If the communications were interrupted.
    • readUser0

      @CheckReturnValue default int readUser0(@Valid @Valid HasCoreLocation core) throws ProcessException, IOException, InterruptedException
      Read the user0 register of a core.
      Parameters:
      core - The coordinates of the core to read the register of
      Returns:
      The contents of the register
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • readUser1

      @CheckReturnValue default int readUser1(@Valid @Valid HasCoreLocation core) throws ProcessException, IOException, InterruptedException
      Read the user1 register of a core.
      Parameters:
      core - The coordinates of the core to read the register of
      Returns:
      The contents of the register
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • readUser2

      @CheckReturnValue default int readUser2(@Valid @Valid HasCoreLocation core) throws ProcessException, IOException, InterruptedException
      Read the user2 register of a core.
      Parameters:
      core - The coordinates of the core to read the register of
      Returns:
      The contents of the register
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • readNeighbourMemory

      @ParallelSafeWithCare default ByteBuffer readNeighbourMemory(@Valid @Valid HasChipLocation chip, @NotNull @NotNull Direction link, @NotNull @NotNull MemoryLocation baseAddress, @Positive @jakarta.validation.constraints.Positive int length) throws IOException, ProcessException, InterruptedException
      Read some areas of memory on a neighbouring chip using a LINK_READ SCP command. If sent to a BMP, this command can be used to communicate with the FPGAs' debug registers; in that case, the link must be the direction with the same ID as the ID of the FPGA to communicate with.

      WARNING! This operation is unsafe in a multi-threaded context if the link leaves the current board.

      Parameters:
      chip - The coordinates of the chip whose neighbour is to be read from
      link - The link direction to send the request along
      baseAddress - The address in SDRAM where the region of memory to be read starts
      length - The length of the data to be read in bytes
      Returns:
      A little-endian buffer of data that has been read, positioned at the start of the data
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • readNeighbourMemory

      @ParallelSafeWithCare ByteBuffer readNeighbourMemory(@Valid @Valid HasCoreLocation core, @NotNull @NotNull Direction link, @NotNull @NotNull MemoryLocation baseAddress, @Positive @jakarta.validation.constraints.Positive int length) throws IOException, ProcessException, InterruptedException
      Read some areas of memory on a neighbouring chip using a LINK_READ SCP command. If sent to a BMP, this command can be used to communicate with the FPGAs' debug registers; in that case, the link must be the direction with the same ID as the ID of the FPGA to communicate with.

      WARNING! This operation is unsafe in a multi-threaded context if the link leaves the current board.

      Parameters:
      core - The coordinates of the chip whose neighbour is to be read from, plus the CPU to use (typically 0, or if a BMP, the slot number)
      link - The link direction to send the request along
      baseAddress - The address in SDRAM where the region of memory to be read starts
      length - The length of the data to be read in bytes
      Returns:
      A little-endian buffer of data that has been read, positioned at the start of the data
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • stopApplication

      @ParallelUnsafe void stopApplication(@NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedException
      Sends a stop request for an application ID.

      WARNING! This operation is unsafe in a multi-threaded context.

      Parameters:
      appID - The ID of the application to send to
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • waitForCoresToBeInState

      @ParallelSafeWithCare default void waitForCoresToBeInState(@Valid @Valid CoreSubsets coreSubsets, @NotNull @NotNull AppID appID, EnumSet<@NotNull CPUState> cpuStates) throws IOException, InterruptedException, SpinnmanException
      Waits for the specified cores running the given application to be in some target state or states. Handles failures.

      WARNING! This operation is unsafe in a multi-threaded context if the cores are over more than a single board.

      Parameters:
      coreSubsets - the cores to check are in a given sync state
      appID - the application ID that being used by the simulation
      cpuStates - The expected states once the applications are ready; success is when each application is in one of these states
      Throws:
      IOException - If anything goes wrong with networking.
      InterruptedException - If the thread is interrupted while waiting.
      SpinnmanException - If some cores enter an error state or SpiNNaker rejects a message.
    • waitForCoresToBeInState

      @ParallelSafeWithCare void waitForCoresToBeInState(@Valid @Valid CoreSubsets allCoreSubsets, @NotNull @NotNull AppID appID, EnumSet<@NotNull CPUState> cpuStates, @PositiveOrZero @PositiveOrZero Integer timeout, @Positive @jakarta.validation.constraints.Positive int timeBetweenPolls, EnumSet<@NotNull CPUState> errorStates, @Positive @jakarta.validation.constraints.Positive int countsBetweenFullCheck) throws IOException, InterruptedException, SpinnmanException
      Waits for the specified cores running the given application to be in some target state or states. Handles failures.

      WARNING! This operation is unsafe in a multi-threaded context if the cores are over more than a single board.

      Parameters:
      allCoreSubsets - the cores to check are in a given sync state
      appID - the application ID that being used by the simulation
      cpuStates - The expected states once the applications are ready; success is when each application is in one of these states
      timeout - The amount of time to wait in milliseconds for the cores to reach one of the states, or null to wait for an unbounded amount of time.
      timeBetweenPolls - Time between checking the state, in milliseconds
      errorStates - Set of states that the application can be in that indicate an error, and so should raise an exception
      countsBetweenFullCheck - The number of times to use the count signal before instead using the full CPU state check
      Throws:
      IOException - If anything goes wrong with networking.
      InterruptedException - If the thread is interrupted while waiting.
      SpinnmanException - If some cores enter an error state or SpiNNaker rejects a message.
    • getCoresInState

      @ParallelSafeWithCare @CheckReturnValue default CoreSubsets getCoresInState(@Valid @Valid CoreSubsets allCoreSubsets, @NotNull @NotNull CPUState state) throws IOException, ProcessException, InterruptedException
      Get all cores that are in a given state.

      WARNING! This operation is unsafe in a multi-threaded context unless the allCoreSubsets only contains cores on a single board.

      Parameters:
      allCoreSubsets - The cores to filter
      state - The states to filter on
      Returns:
      Core subsets object containing cores in the given state
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • getCoresInState

      @ParallelSafeWithCare @CheckReturnValue default CoreSubsets getCoresInState(@Valid @Valid CoreSubsets allCoreSubsets, EnumSet<@NotNull CPUState> states) throws IOException, ProcessException, InterruptedException
      Get all cores that are in a given set of states.

      WARNING! This operation is unsafe in a multi-threaded context unless the allCoreSubsets only contains cores on a single board.

      Parameters:
      allCoreSubsets - The cores to filter
      states - The states to filter on
      Returns:
      Core subsets object containing cores in the given states
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • getCoresNotInState

      @ParallelSafeWithCare @CheckReturnValue default Map<CoreLocation,CPUInfo> getCoresNotInState(@Valid @Valid CoreSubsets allCoreSubsets, @NotNull @NotNull CPUState state) throws IOException, ProcessException, InterruptedException
      Get all cores that are not in a given state.

      WARNING! This operation is unsafe in a multi-threaded context unless the allCoreSubsets only contains cores on a single board.

      Parameters:
      allCoreSubsets - The cores to filter
      state - The state to filter on
      Returns:
      Core subsets object containing cores not in the given state
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • getCoresNotInState

      @ParallelSafeWithCare @CheckReturnValue default Map<CoreLocation,CPUInfo> getCoresNotInState(@Valid @Valid CoreSubsets allCoreSubsets, EnumSet<@NotNull CPUState> states) throws IOException, ProcessException, InterruptedException
      Get all cores that are not in a given set of states.

      WARNING! This operation is unsafe in a multi-threaded context unless the allCoreSubsets only contains cores on a single board.

      Parameters:
      allCoreSubsets - The cores to filter
      states - The states to filter on
      Returns:
      Core subsets object containing cores not in the given states
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • sendSignal

      @ParallelUnsafe void sendSignal(@NotNull @NotNull AppID appID, @NotNull @NotNull Signal signal) throws IOException, ProcessException, InterruptedException
      Send a signal to an application.

      WARNING! This operation is unsafe in a multi-threaded context.

      Parameters:
      appID - The ID of the application to send to
      signal - The signal to send
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • setLEDs

      @ParallelSafe default void setLEDs(@Valid @Valid HasChipLocation chip, Map<Integer,LEDAction> ledStates) throws IOException, ProcessException, InterruptedException
      Set LED states.
      Parameters:
      chip - The coordinates of the chip on which to set the LEDs
      ledStates - A map from LED index to state with 0 being off, 1 on and 2 inverted.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • setLEDs

      @ParallelSafe void setLEDs(@Valid @Valid HasCoreLocation core, Map<Integer,LEDAction> ledStates) throws IOException, ProcessException, InterruptedException
      Set LED states.
      Parameters:
      core - The coordinates of the core on which to set the LEDs
      ledStates - A map from LED index to state with 0 being off, 1 on and 2 inverted.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • locateSpinnakerConnection

      @ParallelSafe SCPConnection locateSpinnakerConnection(@NotNull @NotNull InetAddress boardAddress)
      Find a connection that matches the given board IP address.
      Parameters:
      boardAddress - The IP address of the Ethernet connection on the board
      Returns:
      A connection for the given IP address, or null if no such connection exists
    • setIPTag

      Set up an IP tag.
      Parameters:
      tag - The tag to set up; note its board address can be null, in which case, the tag will be assigned to all boards.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • setIPTag

      @ParallelSafeWithCare void setIPTag(@Valid @Valid IPTag tag, @NotNull @NotNull SDPConnection connection) throws IOException, ProcessException, InterruptedException
      Set up an IP tag to deliver messages to a particular connection.
      Parameters:
      tag - The tag to set up.
      connection - The connection to deliver messages to, which must already be set up to talk to the correct board.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • setReverseIPTag

      @ParallelSafe void setReverseIPTag(@Valid @Valid ReverseIPTag tag) throws IOException, ProcessException, InterruptedException
      Set up a reverse IP tag.
      Parameters:
      tag - The reverse tag to set up; note its board address can be null, in which case, the tag will be assigned to all boards
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • clearIPTag

      @ParallelSafe default void clearIPTag(@Valid @Valid Tag tag) throws IOException, ProcessException, InterruptedException
      Clear the setting of an IP tag.
      Parameters:
      tag - The tag
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • clearIPTag

      @ParallelUnsafe default void clearIPTag(@TagID @uk.ac.manchester.spinnaker.machine.tags.TagID int tag) throws IOException, ProcessException, InterruptedException
      Clear the setting of an IP tag.

      WARNING! This operation is unsafe in a multi-threaded context.

      Parameters:
      tag - The tag ID
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • clearIPTag

      @ParallelSafe void clearIPTag(@TagID @uk.ac.manchester.spinnaker.machine.tags.TagID int tag, InetAddress boardAddress) throws IOException, ProcessException, InterruptedException
      Clear the setting of an IP tag.
      Parameters:
      tag - The tag ID
      boardAddress - Board address where the tag should be cleared. If null, all SCPSender connections will send the message to clear the tag
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • getTags

      Get the current set of tags that have been set on the board using all SCPSender connections.

      WARNING! This operation is unsafe in a multi-threaded context.

      Returns:
      An iterable of tags
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • getTags

      Get the current set of tags that have been set on the board.
      Parameters:
      connection - Connection from which the tags should be received.
      Returns:
      An iterable of tags
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • getTagUsage

      Get the number of times each tag has had a message sent via it using all SCPSender connections.

      WARNING! This operation is unsafe in a multi-threaded context.

      Returns:
      A map from the tags to their usage.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • getTagUsage

      Get the number of times each tag has had a message sent via it for a connection.
      Parameters:
      connection - Connection from which the tag usage should be retrieved.
      Returns:
      A map from the tags to their usage.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • mallocSDRAM

      @ParallelSafe @CheckReturnValue default MemoryLocation mallocSDRAM(@Valid @Valid HasChipLocation chip, @Positive @jakarta.validation.constraints.Positive int size) throws IOException, ProcessException, InterruptedException
      Allocates a chunk of SDRAM on a chip on the machine.
      Parameters:
      chip - The coordinates of the chip onto which to allocate memory
      size - The amount of memory to allocate in bytes
      Returns:
      the base address of the allocated memory
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • mallocSDRAM

      @ParallelSafe @CheckReturnValue default MemoryLocation mallocSDRAM(@Valid @Valid HasChipLocation chip, @Positive @jakarta.validation.constraints.Positive int size, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedException
      Allocates a chunk of SDRAM on a chip on the machine.
      Parameters:
      chip - The coordinates of the chip onto which to allocate memory
      size - The amount of memory to allocate in bytes
      appID - The ID of the application with which to associate the routes.
      Returns:
      the base address of the allocated memory
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • mallocSDRAM

      @ParallelSafe MemoryLocation mallocSDRAM(@Valid @Valid HasChipLocation chip, @Positive @jakarta.validation.constraints.Positive int size, @NotNull @NotNull AppID appID, int tag) throws IOException, ProcessException, InterruptedException
      Allocates a chunk of SDRAM on a chip on the machine.
      Parameters:
      chip - The coordinates of the chip onto which to allocate memory
      size - The amount of memory to allocate in bytes
      appID - The ID of the application with which to associate the routes.
      tag - The tag for the SDRAM, a 8-bit (chip-wide) tag that can be looked up by a SpiNNaker application to discover the address of the allocated block.
      Returns:
      the base address of the allocated memory
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • freeSDRAM

      @ParallelSafe void freeSDRAM(@Valid @Valid HasChipLocation chip, @NotNull @NotNull MemoryLocation baseAddress) throws IOException, ProcessException, InterruptedException
      Free allocated SDRAM.
      Parameters:
      chip - The coordinates of the chip onto which to free memory
      baseAddress - The base address of the allocated memory
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • freeSDRAM

      @ParallelSafe int freeSDRAM(@Valid @Valid HasChipLocation chip, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedException
      Free all SDRAM allocated to a given application ID.
      Parameters:
      chip - The coordinates of the chip onto which to free memory
      appID - The app ID of the owner of the allocated memory
      Returns:
      The number of blocks freed
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • loadMulticastRoutes

      @ParallelSafe default void loadMulticastRoutes(@Valid @Valid HasChipLocation chip, Collection<@NotNull MulticastRoutingEntry> routes) throws IOException, ProcessException, InterruptedException
      Load a set of multicast routes on to a chip associated with the default application ID.
      Parameters:
      chip - The coordinates of the chip onto which to load the routes
      routes - An iterable of multicast routes to load
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • loadMulticastRoutes

      @ParallelSafe void loadMulticastRoutes(@Valid @Valid HasChipLocation chip, Collection<@NotNull MulticastRoutingEntry> routes, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedException
      Load a set of multicast routes on to a chip.
      Parameters:
      chip - The coordinates of the chip onto which to load the routes
      routes - An iterable of multicast routes to load
      appID - The ID of the application with which to associate the routes.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • loadFixedRoute

      @ParallelSafe default void loadFixedRoute(@Valid @Valid HasChipLocation chip, @Valid @Valid RoutingEntry fixedRoute) throws IOException, ProcessException, InterruptedException
      Loads a fixed route routing table entry onto a chip's router.
      Parameters:
      chip - The coordinates of the chip onto which to load the route
      fixedRoute - the route for the fixed route entry on this chip
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • loadFixedRoute

      @ParallelSafe void loadFixedRoute(@Valid @Valid HasChipLocation chip, @Valid @Valid RoutingEntry fixedRoute, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedException
      Loads a fixed route routing table entry onto a chip's router.
      Parameters:
      chip - The coordinates of the chip onto which to load the route
      fixedRoute - the route for the fixed route entry on this chip
      appID - The ID of the application with which to associate the route.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • readFixedRoute

      Reads a fixed route routing table entry from a chip's router.
      Parameters:
      chip - The coordinate of the chip from which to read the route.
      Returns:
      the route as a fixed route entry
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • readFixedRoute

      @ParallelSafe @CheckReturnValue RoutingEntry readFixedRoute(@Valid @Valid HasChipLocation chip, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedException
      Reads a fixed route routing table entry from a chip's router.
      Parameters:
      chip - The coordinate of the chip from which to read the route.
      appID - The ID of the application associated the route.
      Returns:
      the route as a fixed route entry
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • getMulticastRoutes

      Get the current multicast routes set up on a chip.
      Parameters:
      chip - The coordinates of the chip from which to get the routes
      Returns:
      An iterable of multicast routes
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • getMulticastRoutes

      Get the current multicast routes set up on a chip.
      Parameters:
      chip - The coordinates of the chip from which to get the routes
      appID - The ID of the application to filter the routes for. null means "don't filter".
      Returns:
      An iterable of multicast routes
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • clearMulticastRoutes

      @ParallelSafe void clearMulticastRoutes(@Valid @Valid HasChipLocation chip) throws IOException, ProcessException, InterruptedException
      Remove all the multicast routes on a chip.
      Parameters:
      chip - The coordinates of the chip on which to clear the routes
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • getRouterDiagnostics

      Get router diagnostic information from a chip.
      Parameters:
      chip - The coordinates of the chip from which to get the information
      Returns:
      The router diagnostic information
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • setRouterDiagnosticFilter

      @ParallelSafe void setRouterDiagnosticFilter(@Valid @Valid HasChipLocation chip, int position, @NotNull @NotNull DiagnosticFilter diagnosticFilter) throws IOException, ProcessException, InterruptedException
      Sets a router diagnostic filter in a router.
      Parameters:
      chip - the address of the router in which this filter is being set
      position - the position in the list of filters where this filter is to be added, between 0 and 15 (note that positions 0 to 11 are used by the default filters, and setting these positions will result in a warning).
      diagnosticFilter - the diagnostic filter being set in the position.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • getRouterDiagnosticFilter

      @ParallelSafe @CheckReturnValue DiagnosticFilter getRouterDiagnosticFilter(@Valid @Valid HasChipLocation chip, @PositiveOrZero @jakarta.validation.constraints.PositiveOrZero int position) throws IOException, ProcessException, InterruptedException
      Gets a router diagnostic filter from a router.
      Parameters:
      chip - the address of the router from which this filter is being retrieved
      position - the position in the list of filters where this filter is to be read from
      Returns:
      The diagnostic filter read
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • clearRouterDiagnosticCounters

      @ParallelSafe default void clearRouterDiagnosticCounters(@Valid @Valid HasChipLocation chip) throws IOException, ProcessException, InterruptedException
      Clear router diagnostic information on a chip. Resets and enables all diagnostic counters.
      Parameters:
      chip - The coordinates of the chip
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • clearRouterDiagnosticCounters

      @ParallelSafe default void clearRouterDiagnosticCounters(@Valid @Valid HasChipLocation chip, boolean enable) throws IOException, ProcessException, InterruptedException
      Clear router diagnostic information on a chip. Resets all diagnostic counters.
      Parameters:
      chip - The coordinates of the chip
      enable - True (default) if the counters should be enabled
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • clearRouterDiagnosticCounters

      @ParallelSafe default void clearRouterDiagnosticCounters(@Valid @Valid HasChipLocation chip, Iterable<@NotNull Integer> counterIDs) throws IOException, ProcessException, InterruptedException
      Clear router diagnostic information on a chip. Resets and enables all the numbered counters.
      Parameters:
      chip - The coordinates of the chip
      counterIDs - The IDs of the counters to reset and enable; each must be between 0 and 15
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • clearRouterDiagnosticCounters

      @ParallelSafe void clearRouterDiagnosticCounters(@Valid @Valid HasChipLocation chip, boolean enable, Iterable<@NotNull Integer> counterIDs) throws IOException, ProcessException, InterruptedException
      Clear router diagnostic information on a chip.
      Parameters:
      chip - The coordinates of the chip
      enable - True (default) if the counters should be enabled
      counterIDs - The IDs of the counters to reset and enable if enable is True; each must be between 0 and 15
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • getHeap

      Get the contents of the SDRAM heap on a given chip.
      Parameters:
      chip - The coordinates of the chip
      Returns:
      the list of chunks in the heap
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • getHeap

      Get the contents of the given heap on a given chip.
      Parameters:
      chip - The coordinates of the chip
      heap - The SystemVariableDefinition which is the heap to read
      Returns:
      the list of chunks in the heap
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • fillMemory

      @ParallelSafe default void fillMemory(@Valid @Valid HasChipLocation chip, @NotNull @NotNull MemoryLocation baseAddress, int repeatValue, @Positive @jakarta.validation.constraints.Positive int size) throws ProcessException, IOException, InterruptedException
      Fill some memory with repeated data.
      Parameters:
      chip - The coordinates of the chip
      baseAddress - The address at which to start the fill
      repeatValue - The data to repeat
      size - The number of bytes to fill. Must be compatible with the data type i.e. if the data type is WORD, the number of bytes must be divisible by 4
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • fillMemory

      @ParallelSafe void fillMemory(@Valid @Valid HasChipLocation chip, @NotNull @NotNull MemoryLocation baseAddress, int repeatValue, @Positive @jakarta.validation.constraints.Positive int size, @NotNull @NotNull FillDataType dataType) throws ProcessException, IOException, InterruptedException
      Fill some memory with repeated data.
      Parameters:
      chip - The coordinates of the chip
      baseAddress - The address at which to start the fill
      repeatValue - The data to repeat
      size - The number of bytes to fill. Must be compatible with the data type i.e. if the data type is WORD, the number of bytes must be divisible by 4
      dataType - The type of data to fill.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • clearReinjectionQueues

      @ParallelSafe void clearReinjectionQueues(@Valid @Valid HasCoreLocation monitorCore) throws IOException, ProcessException, InterruptedException
      Clear the packet reinjection queues in a monitor process.
      Parameters:
      monitorCore - The coordinates of the monitor core.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • clearReinjectionQueues

      @ParallelSafe void clearReinjectionQueues(@Valid @Valid CoreSubsets monitorCores) throws IOException, ProcessException, InterruptedException
      Clear the packet reinjection queues in some monitor processes.
      Parameters:
      monitorCores - The coordinates of the monitor cores.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • getReinjectionStatus

      Get the packet reinjection status of a monitor process.
      Parameters:
      monitorCore - The coordinates of the monitor core.
      Returns:
      The reinjection status.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • getReinjectionStatus

      Get the packet reinjection status of some monitor processes.
      Parameters:
      monitorCores - The coordinates of the monitor cores.
      Returns:
      The reinjection statuses of the cores.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • resetReinjectionCounters

      @ParallelSafe void resetReinjectionCounters(@Valid @Valid HasCoreLocation monitorCore) throws IOException, ProcessException, InterruptedException
      Reset the packet reinjection counters of a monitor process.
      Parameters:
      monitorCore - The coordinates of the monitor core.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • resetReinjectionCounters

      @ParallelSafeWithCare void resetReinjectionCounters(@Valid @Valid CoreSubsets monitorCores) throws IOException, ProcessException, InterruptedException
      Reset the packet reinjection counters of some monitor processes.
      Parameters:
      monitorCores - The coordinates of the monitor cores.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • setReinjection

      @ParallelSafe default void setReinjection(@Valid @Valid HasCoreLocation monitorCore, boolean reinject) throws IOException, ProcessException, InterruptedException
      Set whether packets (of all types) are to be reinjected.
      Parameters:
      monitorCore - The coordinates of the monitor core.
      reinject - True if all packets are to be reinjected.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
      InterruptedException - If the communications were interrupted.
    • setReinjection

      @ParallelSafe default void setReinjection(@Valid @Valid CoreSubsets monitorCores, boolean reinject) throws IOException, ProcessException, InterruptedException
      Set whether packets (of all types) are to be reinjected.
      Parameters:
      monitorCores - The coordinates of some monitor cores.
      reinject - True if all packets are to be reinjected.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • setReinjection

      @ParallelSafe default void setReinjection(@Valid @Valid HasCoreLocation monitorCore, @NotNull @NotNull ReinjectionStatus status) throws IOException, ProcessException, InterruptedException
      Restore whether packets are to be reinjected to a previously saved state.
      Parameters:
      monitorCore - The coordinates of the monitor core.
      status - The saved reinjection status to restore.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • setReinjection

      @ParallelSafe default void setReinjection(@Valid @Valid CoreSubsets monitorCores, @NotNull @NotNull ReinjectionStatus status) throws IOException, ProcessException, InterruptedException
      Restore whether packets are to be reinjected to a previously saved state.
      Parameters:
      monitorCores - The coordinates of some monitor cores.
      status - The saved reinjection status to restore.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • setReinjectionTypes

      @ParallelSafe void setReinjectionTypes(@Valid @Valid HasCoreLocation monitorCore, boolean multicast, boolean pointToPoint, boolean fixedRoute, boolean nearestNeighbour) throws IOException, ProcessException, InterruptedException
      Set what types of packets are to be reinjected.
      Parameters:
      monitorCore - The coordinates of the monitor core.
      multicast - True if multicast packets are to be reinjected.
      pointToPoint - True if point-to-point packets are to be reinjected.
      fixedRoute - True if fixed-route packets are to be reinjected.
      nearestNeighbour - True if nearest-neighbour packets are to be reinjected.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • setReinjectionTypes

      @ParallelSafeWithCare void setReinjectionTypes(@Valid @Valid CoreSubsets monitorCores, boolean multicast, boolean pointToPoint, boolean fixedRoute, boolean nearestNeighbour) throws IOException, ProcessException, InterruptedException
      Set what types of packets are to be reinjected.
      Parameters:
      monitorCores - The coordinates of some monitor cores.
      multicast - True if multicast packets are to be reinjected.
      pointToPoint - True if point-to-point packets are to be reinjected.
      fixedRoute - True if fixed-route packets are to be reinjected.
      nearestNeighbour - True if nearest-neighbour packets are to be reinjected.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • setReinjectionEmergencyTimeout

      @ParallelSafe void setReinjectionEmergencyTimeout(@Valid @Valid HasCoreLocation monitorCore, int timeoutMantissa, int timeoutExponent) throws IOException, ProcessException, InterruptedException
      Set the emergency packet reinjection timeout.
      Parameters:
      monitorCore - The coordinates of the monitor core.
      timeoutMantissa - The mantissa of the timeout value, between 0 and 15.
      timeoutExponent - The exponent of the timeout value, between 0 and 15.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • setReinjectionEmergencyTimeout

      @ParallelSafe default void setReinjectionEmergencyTimeout(@Valid @Valid HasCoreLocation monitorCore, @NotNull @NotNull RouterTimeout timeout) throws IOException, ProcessException, InterruptedException
      Set the emergency packet reinjection timeout.
      Parameters:
      monitorCore - The coordinates of the monitor core.
      timeout - The timeout value.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • setReinjectionEmergencyTimeout

      @ParallelSafeWithCare void setReinjectionEmergencyTimeout(@Valid @Valid CoreSubsets monitorCores, int timeoutMantissa, int timeoutExponent) throws IOException, ProcessException, InterruptedException
      Set the emergency packet reinjection timeout.
      Parameters:
      monitorCores - The coordinates of some monitor cores.
      timeoutMantissa - The mantissa of the timeout value, between 0 and 15.
      timeoutExponent - The exponent of the timeout value, between 0 and 15.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • setReinjectionEmergencyTimeout

      @ParallelSafeWithCare default void setReinjectionEmergencyTimeout(@Valid @Valid CoreSubsets monitorCores, @NotNull @NotNull RouterTimeout timeout) throws IOException, ProcessException, InterruptedException
      Set the emergency packet reinjection timeout.
      Parameters:
      monitorCores - The coordinates of some monitor cores.
      timeout - The timeout value.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • setReinjectionEmergencyTimeout

      @ParallelSafeWithCare default void setReinjectionEmergencyTimeout(@Valid @Valid CoreSubsets monitorCores, @NotNull @NotNull ReinjectionStatus status) throws IOException, ProcessException, InterruptedException
      Set the emergency packet reinjection timeout.
      Parameters:
      monitorCores - The coordinates of some monitor cores.
      status - The saved core status.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • setReinjectionTimeout

      @ParallelSafe void setReinjectionTimeout(@Valid @Valid HasCoreLocation monitorCore, int timeoutMantissa, int timeoutExponent) throws IOException, ProcessException, InterruptedException
      Set the packet reinjection timeout.
      Parameters:
      monitorCore - The coordinates of the monitor core.
      timeoutMantissa - The mantissa of the timeout value, between 0 and 15.
      timeoutExponent - The exponent of the timeout value, between 0 and 15.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • setReinjectionTimeout

      @ParallelSafe default void setReinjectionTimeout(@Valid @Valid HasCoreLocation monitorCore, @NotNull @NotNull RouterTimeout timeout) throws IOException, ProcessException, InterruptedException
      Set the packet reinjection timeout.
      Parameters:
      monitorCore - The coordinates of the monitor core.
      timeout - The timeout value.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • setReinjectionTimeout

      @ParallelSafeWithCare void setReinjectionTimeout(@Valid @Valid CoreSubsets monitorCores, int timeoutMantissa, int timeoutExponent) throws IOException, ProcessException, InterruptedException
      Set the packet reinjection timeout.
      Parameters:
      monitorCores - The coordinates of some monitor cores.
      timeoutMantissa - The mantissa of the timeout value, between 0 and 15.
      timeoutExponent - The exponent of the timeout value, between 0 and 15.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • setReinjectionTimeout

      @ParallelSafeWithCare default void setReinjectionTimeout(@Valid @Valid CoreSubsets monitorCores, @NotNull @NotNull RouterTimeout timeout) throws IOException, ProcessException, InterruptedException
      Set the packet reinjection timeout.
      Parameters:
      monitorCores - The coordinates of some monitor cores.
      timeout - The timeout value.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • setReinjectionTimeout

      @ParallelSafeWithCare default void setReinjectionTimeout(@Valid @Valid CoreSubsets monitorCores, @NotNull @NotNull ReinjectionStatus status) throws IOException, ProcessException, InterruptedException
      Set the packet reinjection timeout.
      Parameters:
      monitorCores - The coordinates of some monitor cores.
      status - The saved core status.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • saveApplicationRouterTables

      @ParallelSafeWithCare void saveApplicationRouterTables(@Valid @Valid CoreSubsets monitorCores) throws IOException, ProcessException, InterruptedException
      Save the application's multicast router tables.
      Parameters:
      monitorCores - The coordinates of some monitor cores; the routers on those chips will have their (current) multicast router tables saved.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • loadApplicationRouterTables

      @ParallelSafeWithCare void loadApplicationRouterTables(@Valid @Valid CoreSubsets monitorCores) throws IOException, ProcessException, InterruptedException
      Load the (previously saved) application's multicast router tables. The router tables must have been previously saved.
      Parameters:
      monitorCores - The coordinates of some monitor cores; the routers on those chips will have their multicast router tables loaded.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • loadSystemRouterTables

      @ParallelSafeWithCare void loadSystemRouterTables(@Valid @Valid CoreSubsets monitorCores) throws IOException, ProcessException, InterruptedException
      Load the (previously configured) system multicast router tables. The application's router tables must have been previously saved.
      Parameters:
      monitorCores - The coordinates of some monitor cores; the routers on those chips will have their multicast router tables loaded.
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.
    • createScpConnection

      Create a connection to a particular instance of SCAMP. Note that this connection is a new connection; it is not a previously existing connection.
      Parameters:
      chip - The location of the chip on the board with this remoteHost
      addr - The IP address of the SpiNNaker board to send messages to.
      Returns:
      The SCP connection to use. It is up to the caller to arrange for this to be closed at the right time.
      Throws:
      IOException - If anything goes wrong with socket setup.
    • resetRouting

      void resetRouting(Map<Integer,DiagnosticFilter> customFilters) throws ProcessException, IOException, InterruptedException
      Clear the router tables, reset diagnostic counters and put in optional custom filters.
      Parameters:
      customFilters - a map of filter position to custom filter, or null
      Throws:
      IOException - If anything goes wrong with networking.
      ProcessException - If SpiNNaker rejects a message.
      InterruptedException - If the communications were interrupted.