Class SpinnakerMachine
java.lang.Object
uk.ac.manchester.spinnaker.nmpi.model.machine.SpinnakerMachine
- All Implemented Interfaces:
Serializable,Comparable<SpinnakerMachine>
Represents a SpiNNaker machine on which jobs can be executed.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty machine.SpinnakerMachine(String machineName, String version, int width, int height, int numBoards, String bmpDetails) Creates a new SpiNNaker Machine description. -
Method Summary
Modifier and TypeMethodDescriptionintCompare to another machine; order by name then by version.booleanCheck for equality with another machine.intgetArea()Gets the BMP details of the machine.intGets the height of the machine in chips.Gets the name of the machine.intGets the number of boards in the machine.Gets the version of the machine.intgetWidth()Gets the width of the machine in chips.inthashCode()Generate a hash code based on name and version.static SpinnakerMachineCreates a new Spinnaker Machine by parsing the name of a machine.voidsetBmpDetails(String bmpDetails) Sets the BMP details of the machine.voidsetHeight(int height) Sets the height of the machine in chips.voidsetMachineName(String machineName) Sets the name of the machine.voidsetnBoards(int nBoards) Sets the number of boards in the machine.voidsetVersion(String version) Sets the version of the machine.voidsetWidth(int width) Sets the width of the machine in chips.toString()Get a string version of the machine.
-
Constructor Details
-
SpinnakerMachine
public SpinnakerMachine()Creates an empty machine. -
SpinnakerMachine
public SpinnakerMachine(String machineName, String version, int width, int height, int numBoards, String bmpDetails) Creates a new SpiNNaker Machine description.- Parameters:
machineName- The name of the machineversion- The version of the machinewidth- The width of the machine, in chipsheight- The width of the machine, in chipsnumBoards- The number of boards in the machinebmpDetails- How to contact the machine's Board Management Processor
-
-
Method Details
-
parse
Creates a new Spinnaker Machine by parsing the name of a machine.- Parameters:
value- The name of the machine to parse.- Returns:
- The parsed machine descriptor.
- Throws:
IllegalArgumentException- if the description has the wrong overall formatNumberFormatException- if one of the parts that should be numeric isn't
-
toString
Get a string version of the machine. -
getMachineName
Gets the name of the machine.- Returns:
- The name of the machine
-
setMachineName
Sets the name of the machine.- Parameters:
machineName- The name of the machine
-
getVersion
Gets the version of the machine.- Returns:
- The version of the machine
-
setVersion
Sets the version of the machine.- Parameters:
version- The version of the machine
-
getWidth
public int getWidth()Gets the width of the machine in chips.- Returns:
- The width of the machine
-
setWidth
public void setWidth(int width) Sets the width of the machine in chips.- Parameters:
width- The width of the machine
-
getHeight
public int getHeight()Gets the height of the machine in chips.- Returns:
- The height of the machine
-
setHeight
public void setHeight(int height) Sets the height of the machine in chips.- Parameters:
height- The height of the machine
-
getArea
public int getArea()- Returns:
- width × height
-
getnBoards
public int getnBoards()Gets the number of boards in the machine.- Returns:
- The number of boards in the machine
-
setnBoards
public void setnBoards(int nBoards) Sets the number of boards in the machine.- Parameters:
nBoards- The number of boards in the machine
-
getBmpDetails
Gets the BMP details of the machine.- Returns:
- The BMP details of the machine
-
setBmpDetails
Sets the BMP details of the machine.- Parameters:
bmpDetails- The BMP details of the machine
-
equals
Check for equality with another machine. -
compareTo
Compare to another machine; order by name then by version.- Specified by:
compareToin interfaceComparable<SpinnakerMachine>
-
hashCode
public int hashCode()Generate a hash code based on name and version.
-