Interface MachineManager

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
FixedMachineManagerImpl, SpallocJavaMachineManagerImpl, SpallocMachineManagerImpl

public interface MachineManager
extends AutoCloseable
A service for managing SpiNNaker boards in a machine.
  • Method Details

    • getMachines

      List<SpinnakerMachine> getMachines() throws IOException
      Gets the machines that this manager allocates from.
      Returns:
      collection of machines
      Throws:
      IOException - if there is communication error.
    • getNextAvailableMachine

      SpinnakerMachine getNextAvailableMachine​(int nBoards, String owner, int jobId) throws IOException
      Get the next available machine of a given size.
      Parameters:
      nBoards - The (minimum) number of boards that the machine needs to have.
      owner - The owner of the job.
      jobId - The ID of the NMPI job.
      Returns:
      a machine.
      Throws:
      IOException - if there is communication error.
    • isMachineAvailable

      boolean isMachineAvailable​(SpinnakerMachine machine) throws IOException
      Test if a specific machine is available.
      Parameters:
      machine - The machine handle
      Returns:
      true if the machine is available.
      Throws:
      IOException - if there is communication error.
    • waitForMachineStateChange

      boolean waitForMachineStateChange​(SpinnakerMachine machine, int waitTime) throws IOException
      Wait for the machine's availability to change.
      Parameters:
      machine - The machine handle
      waitTime - Maximum wait time (in milliseconds)
      Returns:
      Whether the machine state has changed.
      Throws:
      IOException - if there is communication error.
    • releaseMachine

      void releaseMachine​(SpinnakerMachine machine) throws IOException
      Release an allocated machine.
      Parameters:
      machine - The machine handle
      Throws:
      IOException - if there is communication error.
    • setMachinePower

      void setMachinePower​(SpinnakerMachine machine, boolean powerOn) throws IOException
      Turn a machine on or off.
      Parameters:
      machine - The machine handle
      powerOn - True to power a machine on, false to turn it off.
      Throws:
      IOException - if there is communication error.
    • getChipCoordinates

      ChipCoordinates getChipCoordinates​(SpinnakerMachine machine, int x, int y) throws IOException
      Find a chip on a machine.
      Parameters:
      machine - The machine handle
      x - The virtual X coordinate of the chip
      y - The virtual Y coordinate of the chip
      Returns:
      The chip location description
      Throws:
      IOException - if there is communication error.