Class BoardCoords

java.lang.Object
uk.ac.manchester.spinnaker.alloc.model.BoardCoords

@Immutable
public final class BoardCoords
extends Object
Basic coordinates of a board. The result of a DB query.
Author:
Donal Fellows
  • Constructor Details

    • BoardCoords

      public BoardCoords​(int x, int y, int z, int cabinet, int frame, Integer board, String address)
      Make an instance from raw results. Uncommon.
      Parameters:
      x - Logical triad X coordinate
      y - Logical triad Y coordinate
      z - Logical triad Z coordinate
      cabinet - Physical cabinet number
      frame - Physical frame number
      board - Physical board number, or null
      address - IP address of ethernet chip, or null
    • BoardCoords

      public BoardCoords​(Row row, boolean shroudAddress)
      Construct a set of board coordinates from a database row that describes them. The common constructor.
      Parameters:
      row - Database row
      shroudAddress - Whether the address should be shrouded.
  • Method Details

    • getX

      public int getX()
      Returns:
      Logical triad X coordinate.
    • getY

      public int getY()
      Returns:
      Logical triad Y coordinate.
    • getZ

      public int getZ()
      Returns:
      Logical triad Z coordinate.
    • getCabinet

      public int getCabinet()
      Returns:
      Physical cabinet number.
    • getFrame

      public int getFrame()
      Returns:
      Physical frame number.
    • getBoard

      public Integer getBoard()
      Returns:
      Physical board number. May be null if the board is dead (e.g., because it is outright absent from the machine).
    • getAddress

      public String getAddress()
      Returns:
      IP address of ethernet chip. May be null if the current user doesn't have permission to see the board address at this point, or the board is dead (e.g., because it is outright absent from the machine).
    • 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