Class IPAddressConnection

java.lang.Object
uk.ac.manchester.spinnaker.connections.UDPConnection<InetAddress>
uk.ac.manchester.spinnaker.connections.IPAddressConnection
All Implemented Interfaces:
Closeable, AutoCloseable, Connection

public class IPAddressConnection extends UDPConnection<InetAddress>
A connection that detects any UDP packet that is transmitted by SpiNNaker boards prior to boot. Note that pre-boot messages contain no useful payload.
  • Constructor Details

    • IPAddressConnection

      public IPAddressConnection() throws IOException
      Create a connection listening on the default SpiNNaker pre-boot broadcast port.
      Throws:
      IOException - If setting up the network fails.
    • IPAddressConnection

      public IPAddressConnection(InetAddress localHost) throws IOException
      Create a connection listening on the default SpiNNaker pre-boot broadcast port.
      Parameters:
      localHost - Local hostname to bind to.
      Throws:
      IOException - If setting up the network fails.
    • IPAddressConnection

      public IPAddressConnection(InetAddress localHost, int localPort) throws IOException
      Create a connection.
      Parameters:
      localHost - Local hostname to bind to.
      localPort - Local port to bind to.
      Throws:
      IOException - If setting up the network fails.
  • Method Details

    • receiveMessage

      public final InetAddress receiveMessage()
      Description copied from class: UDPConnection
      Receives a SpiNNaker message from this connection. Blocks until a message has been received.
      Overrides:
      receiveMessage in class UDPConnection<InetAddress>
      Returns:
      The IP address, or null if none was forthcoming.
    • receiveMessage

      public InetAddress receiveMessage(int timeout)
      Description copied from class: UDPConnection
      Receives a SpiNNaker message from this connection. Blocks until a message has been received, or a timeout occurs.
      Specified by:
      receiveMessage in class UDPConnection<InetAddress>
      Parameters:
      timeout - How long to wait for an IP address; null for forever.
      Returns:
      The IP address, or null if none was forthcoming.