java.lang.Object
uk.ac.manchester.spinnaker.transceiver.Utils

public abstract class Utils extends Object
Support utilities.
  • Method Details

    • defaultBMPforMachine

      public static BMPConnectionData defaultBMPforMachine(InetAddress host, Integer numberOfBoards) throws UnknownHostException
      Work out the BMP connection IP address given the machine details. This is assumed to be the IP address of the machine, with 1 subtracted from the final part e.g. if the machine IP address is 192.168.0.5, the BMP IP address is assumed to be 192.168.0.4
      Parameters:
      host - the SpiNNaker machine main host
      numberOfBoards - the number of boards in the machine
      Returns:
      The BMP connection data
      Throws:
      UnknownHostException - If the IP address computations fail.
    • getVcpuAddress

      public static MemoryLocation getVcpuAddress(int p)
      Get the address of the vcpu_t structure for the given core.
      Parameters:
      p - The core number
      Returns:
      the address
    • getVcpuAddress

      public static MemoryLocation getVcpuAddress(HasCoreLocation core)
      Get the address of the vcpu_t structure for the given core.
      Parameters:
      core - The core
      Returns:
      the address
    • sendPortTriggerMessage

      @Deprecated(forRemoval=true) @InlineMe(replacement="connection.sendPortTriggerMessage(host)") public static void sendPortTriggerMessage(UDPConnection<?> connection, InetAddress host) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sends a port trigger message using a connection to (hopefully) open a port in a NAT and/or firewall to allow incoming packets to be received.
      Parameters:
      connection - The UDP connection down which the trigger message should be sent
      host - The address of the SpiNNaker board to which the message should be sent
      Throws:
      IOException - If anything goes wrong
    • newMessageBuffer

      public static ByteBuffer newMessageBuffer()
      Returns:
      Get a new little-endian buffer sized suitably for SpiNNaker messages.