Class SDPLocation
java.lang.Object
uk.ac.manchester.spinnaker.messages.sdp.SDPLocation
- All Implemented Interfaces:
HasBMPLocation
,HasChipLocation
,HasCoreLocation
public class SDPLocation extends Object implements HasCoreLocation, HasBMPLocation
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
Constructors Constructor Description SDPLocation(int major, int minor, int detail)
Make an SDPLocation from components.SDPLocation(HasBMPLocation bmp)
Make an SDPLocation from a BMP location.SDPLocation(HasCoreLocation core)
Make an SDPLocation from a core location. -
Method Summary
Modifier and Type Method Description BMPLocation
asBMPLocation()
ChipLocation
asChipLocation()
CoreLocation
asCoreLocation()
boolean
equals(Object obj)
int
getBoard()
int
getCabinet()
int
getFrame()
int
getP()
int
getX()
int
getY()
int
hashCode()
String
toString()
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
-
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
-