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 Summary
Modifier and Type Method Description ChipCoordinates
getChipCoordinates(SpinnakerMachine machine, int x, int y)
Find a chip on a machine.List<SpinnakerMachine>
getMachines()
Gets the machines that this manager allocates from.SpinnakerMachine
getNextAvailableMachine(int nBoards, String owner, int jobId)
Get the next available machine of a given size.boolean
isMachineAvailable(SpinnakerMachine machine)
Test if a specific machine is available.void
releaseMachine(SpinnakerMachine machine)
Release an allocated machine.void
setMachinePower(SpinnakerMachine machine, boolean powerOn)
Turn a machine on or off.boolean
waitForMachineStateChange(SpinnakerMachine machine, int waitTime)
Wait for the machine's availability to change.
-
Method Details
-
getMachines
Gets the machines that this manager allocates from.- Returns:
- collection of machines
- Throws:
IOException
- if there is communication error.
-
getNextAvailableMachine
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
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
Wait for the machine's availability to change.- Parameters:
machine
- The machine handlewaitTime
- Maximum wait time (in milliseconds)- Returns:
- Whether the machine state has changed.
- Throws:
IOException
- if there is communication error.
-
releaseMachine
Release an allocated machine.- Parameters:
machine
- The machine handle- Throws:
IOException
- if there is communication error.
-
setMachinePower
Turn a machine on or off.- Parameters:
machine
- The machine handlepowerOn
- True to power a machine on, false to turn it off.- Throws:
IOException
- if there is communication error.
-
getChipCoordinates
Find a chip on a machine.- Parameters:
machine
- The machine handlex
- The virtual X coordinate of the chipy
- The virtual Y coordinate of the chip- Returns:
- The chip location description
- Throws:
IOException
- if there is communication error.
-