Class SDPLocation
java.lang.Object
uk.ac.manchester.spinnaker.messages.sdp.SDPLocation
- All Implemented Interfaces:
HasBMPLocation
,HasChipLocation
,HasCoreLocation
Represents a location in an SDP message. This could be a core location
or a BMP location. As such it can be interpreted as either.
-
Constructor Summary
ConstructorsConstructorDescriptionSDPLocation
(int major, int minor, int detail) Make an SDPLocation from components.Make an SDPLocation from a BMP location.SDPLocation
(HasCoreLocation core) Make an SDPLocation from a core location. -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface uk.ac.manchester.spinnaker.machine.HasChipLocation
getScampCore, onSameChipAs
Methods inherited from interface uk.ac.manchester.spinnaker.machine.HasCoreLocation
onSameCoreAs
-
Constructor Details
-
SDPLocation
Make an SDPLocation from a core location.- Parameters:
core
- The core location to use.
-
SDPLocation
Make an SDPLocation from a BMP location.- Parameters:
bmp
- The BMP location to use.
-
SDPLocation
public SDPLocation(int major, int minor, int detail) Make an SDPLocation from components.- Parameters:
major
- The first part of the location (x or cabinet).minor
- The second part of the location (y or frame).detail
- The third part of the location (p or board).
-
-
Method Details
-
getX
public int getX()- Specified by:
getX
in interfaceHasChipLocation
-
getY
public int getY()- Specified by:
getY
in interfaceHasChipLocation
-
getP
public int getP()- Specified by:
getP
in interfaceHasCoreLocation
-
getCabinet
public int getCabinet()- Specified by:
getCabinet
in interfaceHasBMPLocation
-
getFrame
public int getFrame()- Specified by:
getFrame
in interfaceHasBMPLocation
-
getBoard
public int getBoard()- Specified by:
getBoard
in interfaceHasBMPLocation
-
asChipLocation
- Specified by:
asChipLocation
in interfaceHasChipLocation
-
asCoreLocation
- Specified by:
asCoreLocation
in interfaceHasCoreLocation
-
asBMPLocation
- Specified by:
asBMPLocation
in interfaceHasBMPLocation
-
toString
-
hashCode
public int hashCode() -
equals
-