Class IPAddressConnection
java.lang.Object
uk.ac.manchester.spinnaker.connections.UDPConnection<InetAddress>
uk.ac.manchester.spinnaker.connections.IPAddressConnection
- All Implemented Interfaces:
Closeable,AutoCloseable,Connection
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class uk.ac.manchester.spinnaker.connections.UDPConnection
UDPConnection.TrafficClass -
Constructor Summary
ConstructorsConstructorDescriptionCreate a connection listening on the default SpiNNaker pre-boot broadcast port.IPAddressConnection(InetAddress localHost) Create a connection listening on the default SpiNNaker pre-boot broadcast port.IPAddressConnection(InetAddress localHost, int localPort) Create a connection. -
Method Summary
Modifier and TypeMethodDescriptionfinal InetAddressReceives a SpiNNaker message from this connection.receiveMessage(int timeout) Receives a SpiNNaker message from this connection.Methods inherited from class uk.ac.manchester.spinnaker.connections.UDPConnection
close, doReceive, doReceiveWithAddress, doSend, doSendTo, getLocalAddress, getLocalIPAddress, getLocalPort, getRemoteAddress, getRemoteIPAddress, getRemotePort, isClosed, isConnected, receive, receive, receiveWithAddress, send, send, sendPortTriggerMessage, sendTo, sendTo, sendTo, setInUse, setNotInUse, setReceivePacketSize, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface uk.ac.manchester.spinnaker.connections.model.Connection
convertTimeout
-
Constructor Details
-
IPAddressConnection
Create a connection listening on the default SpiNNaker pre-boot broadcast port.- Throws:
IOException- If setting up the network fails.
-
IPAddressConnection
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
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
Description copied from class:UDPConnectionReceives a SpiNNaker message from this connection. Blocks until a message has been received.- Overrides:
receiveMessagein classUDPConnection<InetAddress>- Returns:
- The IP address, or
nullif none was forthcoming.
-
receiveMessage
Description copied from class:UDPConnectionReceives a SpiNNaker message from this connection. Blocks until a message has been received, or a timeout occurs.- Specified by:
receiveMessagein classUDPConnection<InetAddress>- Parameters:
timeout- How long to wait for an IP address;nullfor forever.- Returns:
- The IP address, or
nullif none was forthcoming.
-