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 SummaryConstructorsConstructorDescriptionCreates an empty machine.SpinnakerMachine(String machineName, String version, int width, int height, int numBoards, String bmpDetails) Creates a new SpiNNaker Machine description.
- 
Method SummaryModifier 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- 
SpinnakerMachinepublic SpinnakerMachine()Creates an empty machine.
- 
SpinnakerMachinepublic 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 machine
- version- The version of the machine
- width- The width of the machine, in chips
- height- The width of the machine, in chips
- numBoards- The number of boards in the machine
- bmpDetails- How to contact the machine's Board Management Processor
 
 
- 
- 
Method Details- 
parseCreates 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 format
- NumberFormatException- if one of the parts that should be numeric isn't
 
- 
toStringGet a string version of the machine.
- 
getMachineNameGets the name of the machine.- Returns:
- The name of the machine
 
- 
setMachineNameSets the name of the machine.- Parameters:
- machineName- The name of the machine
 
- 
getVersionGets the version of the machine.- Returns:
- The version of the machine
 
- 
setVersionSets the version of the machine.- Parameters:
- version- The version of the machine
 
- 
getWidthpublic int getWidth()Gets the width of the machine in chips.- Returns:
- The width of the machine
 
- 
setWidthpublic void setWidth(int width) Sets the width of the machine in chips.- Parameters:
- width- The width of the machine
 
- 
getHeightpublic int getHeight()Gets the height of the machine in chips.- Returns:
- The height of the machine
 
- 
setHeightpublic void setHeight(int height) Sets the height of the machine in chips.- Parameters:
- height- The height of the machine
 
- 
getAreapublic int getArea()- Returns:
- width × height
 
- 
getnBoardspublic int getnBoards()Gets the number of boards in the machine.- Returns:
- The number of boards in the machine
 
- 
setnBoardspublic void setnBoards(int nBoards) Sets the number of boards in the machine.- Parameters:
- nBoards- The number of boards in the machine
 
- 
getBmpDetailsGets the BMP details of the machine.- Returns:
- The BMP details of the machine
 
- 
setBmpDetailsSets the BMP details of the machine.- Parameters:
- bmpDetails- The BMP details of the machine
 
- 
equalsCheck for equality with another machine.
- 
compareToCompare to another machine; order by name then by version.- Specified by:
- compareToin interface- Comparable<SpinnakerMachine>
 
- 
hashCodepublic int hashCode()Generate a hash code based on name and version.
 
-