Class SDPConnection

java.lang.Object
uk.ac.manchester.spinnaker.connections.UDPConnection<SDPMessage>
uk.ac.manchester.spinnaker.connections.SDPConnection
All Implemented Interfaces:
Closeable, AutoCloseable, Connection
Direct Known Subclasses:
SCPConnection

public class SDPConnection
extends UDPConnection<SDPMessage>
A UDP socket connection that talks SDP (SpiNNaker Datagram Protocol) to SpiNNaker. An inbound SDP packet can be routed from the initially receiving SC&MP core to any core, and an outbound SDP packet can be routed from any core to the outside world (provided an IPTag or ReverseIPTag is configured to handle routing of the message on an Ethernet-equipped chip).

Note that, unlike with an SCPConnection, SDP is essentially a collection of one-way messages, though replies might be expected to some of them. As such, this class makes no attempt to handle demultiplexing of messages received on multiple threads; great care must be taken when using this class from more than one thread at a time.

  • Constructor Details

    • SDPConnection

      public SDPConnection​(HasChipLocation remoteChip, InetAddress localHost, Integer localPort, InetAddress remoteHost, Integer remotePort) throws IOException
      Parameters:
      remoteChip - Which chip are we talking to? This is not necessarily the chip that is connected to the Ethernet connector on the SpiNNaker board, or even on the same board.
      localHost - The local host address to bind to, or null to bind to all relevant local addresses.
      localPort - The local port to bind to, or null to pick a random free port.
      remoteHost - The address of the SpiNNaker board to route UDP packets to.
      remotePort - The UDP port on the SpiNNaker board to use.
      Throws:
      IOException - If anything goes wrong with the setup (e.g., if the local port is specified and already bound).
  • Method Details