Class BoardPhysicalCoordinates

java.lang.Object
uk.ac.manchester.spinnaker.spalloc.messages.BoardPhysicalCoordinates

@Immutable public class BoardPhysicalCoordinates extends Object
The physical coordinates of a board. This would be PhysicalCoords except it has a different serialization form for backward-compatibility.
  • Constructor Details

    • BoardPhysicalCoordinates

      public BoardPhysicalCoordinates(int cabinet, int frame, Integer board)
      Create with given coordinates.
      Parameters:
      cabinet - the cabinet ID
      frame - the frame ID within the cabinet
      board - the board ID within the frame
    • BoardPhysicalCoordinates

      public BoardPhysicalCoordinates(PhysicalCoords coords)
      Create with given coordinates.
      Parameters:
      coords - the coordinates in standard form.
  • Method Details

    • getCabinet

      public int getCabinet()
      Returns:
      the cabinet ID
    • getFrame

      public int getFrame()
      Returns:
      the frame ID within the cabinet
    • getBoard

      public Integer getBoard()
      Returns:
      the board ID within the frame
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toStandardCoords

      public PhysicalCoords toStandardCoords()
      Convert to the standard coordinate scheme. Assumes that the board field is defined.
      Returns:
      the coordinates