Interface SpallocAPI.Machine

All Superinterfaces:
SpallocAPI.Waitable
Enclosing interface:
SpallocAPI

public static interface SpallocAPI.Machine
extends SpallocAPI.Waitable
Describes a particular machine known to the allocator. Must implement equality by ID or name (both are unique).
Author:
Donal Fellows
  • Method Details

    • getId

      int getId()
      Returns:
      The ID of the machine. Unique.
    • getName

      String getName()
      Returns:
      The name of the machine. Unique.
    • getTags

      Set<String> getTags()
      Returns:
      The tags associated with the machine.
    • getWidth

      int getWidth()
      Returns:
      The width of the machine.
    • getHeight

      int getHeight()
      Returns:
      The height of the machine.
    • isHorizonallyWrapped

      boolean isHorizonallyWrapped()
      Returns:
      Whether the machine wraps in the horizontal direction.
    • isVerticallyWrapped

      boolean isVerticallyWrapped()
      Returns:
      Whether the machine wraps in the vertical direction.
    • isInService

      boolean isInService()
      Returns:
      Whether this machine is currently in service.
    • getDeadBoards

      List<BoardCoords> getDeadBoards()
      The IDs of boards marked as dead or otherwise taken out of service.
      Returns:
      A list of boards. Not modifiable.
    • getDownLinks

      List<DownLink> getDownLinks()
      The links within the machine that are marked as dead or otherwise taken out of service. Note that this does not include links that lead out of the machine.
      Returns:
      A list of links. Not modifiable.
    • getBoardByChip

      Optional<SpallocAPI.BoardLocation> getBoardByChip​(@Valid @NotNull @Valid @NotNull uk.ac.manchester.spinnaker.machine.HasChipLocation chipLocation)
      Get a description of the location of a board given the global coordinates of a chip on it.
      Parameters:
      chipLocation - Global chip coordinates.
      Returns:
      Board location description
    • getBoardByPhysicalCoords

      Optional<SpallocAPI.BoardLocation> getBoardByPhysicalCoords​(@Valid @NotNull @Valid @NotNull uk.ac.manchester.spinnaker.machine.board.PhysicalCoords coords)
      Get a description of the location of a board given the physical coordinates of the board.
      Parameters:
      coords - PhysicalCoordinates
      Returns:
      Board location description
    • getBoardByLogicalCoords

      Optional<SpallocAPI.BoardLocation> getBoardByLogicalCoords​(@Valid @NotNull @Valid @NotNull uk.ac.manchester.spinnaker.machine.board.TriadCoords coords)
      Get a description of the location of a board given the triad coordinates of the board.
      Parameters:
      coords - Triad coordinates.
      Returns:
      Board location description
    • getBoardByIPAddress

      Optional<SpallocAPI.BoardLocation> getBoardByIPAddress​(@IPAddress @IPAddress String address)
      Get a description of the location of a board given the address of its ethernet chip.
      Parameters:
      address - IP address of the board (in 0.0.0.0 form; will be matched exactly by the values in the DB).
      Returns:
      Board location description
    • getRootBoardBMPAddress

      String getRootBoardBMPAddress()
      Returns:
      The IP address of the BMP of the root board of the machine.
    • getBoardNumbers

      List<Integer> getBoardNumbers()
      Returns:
      The boards supported by the machine.
    • getAvailableBoards

      List<Integer> getAvailableBoards()
      Returns:
      The IDs of boards currently available to be allocated.
    • getBMPAddress

      String getBMPAddress​(@Valid @Valid uk.ac.manchester.spinnaker.machine.board.BMPCoords bmp)
      Get the address of a particular BMP of a machine.
      Parameters:
      bmp - The BMP coordinates (cabinet, frame).
      Returns:
      The IP address of the BMP.
    • getBoardNumbers

      List<Integer> getBoardNumbers​(@Valid @Valid uk.ac.manchester.spinnaker.machine.board.BMPCoords bmp)
      Get the board numbers managed by a particular BMP of a machine.
      Parameters:
      bmp - The BMP coordinates( cabinet, frame).
      Returns:
      The board numbers managed by that BMP.