java.lang.Object
uk.ac.manchester.spinnaker.messages.model.P2PTable

public class P2PTable
extends Object
Represents a P2P routing table read from the machine.
  • Field Details

    • width

      @ValidMachineWidth public final @uk.ac.manchester.spinnaker.machine.ValidMachineWidth int width
      The width of the machine that this table represents.
    • height

      @ValidMachineHeight public final @uk.ac.manchester.spinnaker.machine.ValidMachineHeight int height
      The height of the machine that this table represents.
  • Constructor Details

  • Method Details

    • getNumColumnBytes

      public static int getNumColumnBytes​(int height)
      Get the number of bytes to be read for each column of the table.
      Parameters:
      height - The height of the machine
      Returns:
      The number of bytes for the column
    • getColumnOffset

      public static int getColumnOffset​(int column)
      Get the offset of the next column in the table from the P2P base address.
      Parameters:
      column - The column to be read
      Returns:
      Where the column is located within the table.
    • getChips

      public Set<ChipLocation> getChips()
      Returns:
      The coordinates of chips in the table.
    • isRoute

      public boolean isRoute​(HasChipLocation chip)
      Determines if there is a route in the P2P table to the given chip.
      Parameters:
      chip - The coordinates of the chip to look up.
      Returns:
      True if anything in the table routes to the chip.
    • getRoute

      public P2PTableRoute getRoute​(HasChipLocation chip)
      Get the route to follow from this chip to the given chip.
      Parameters:
      chip - The coordinates of the chip to find the route to
      Returns:
      Get the route descriptor for a chip.