Class BMPConnection
java.lang.Object
uk.ac.manchester.spinnaker.connections.UDPConnection<SDPMessage>
uk.ac.manchester.spinnaker.connections.BMPConnection
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- Connection,- SCPSenderReceiver
A connection for talking to one or more Board Management Processors (BMPs). A
 particular connection can only talk to the BMPs of a single frame of a single
 cabinet.
- 
Nested Class SummaryNested classes/interfaces inherited from class uk.ac.manchester.spinnaker.connections.UDPConnectionUDPConnection.TrafficClass
- 
Field SummaryFieldsModifier and TypeFieldDescriptionfinal Collection<BMPBoard>The IDs of the specific set of boards managed by the BMPs we can talk to.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetChip()Defined to satisfy theSCPSenderReceiverinterface.receiveMessage(int timeout) Receives a SpiNNaker message from this connection.receiveSCPResponse(int timeout) Receives an SCP response from this connection.final voidsend(ByteBuffer data, int seq) Send a request that expects a response to be appropriately directed to the thread that is calling this method.voidsend(BMPRequest<?> scpRequest) Send a request on this connection.final voidsend(SCPRequest<?> scpRequest) Sends an SCP request down this connection.Methods inherited from class uk.ac.manchester.spinnaker.connections.UDPConnectionclose, doReceive, doReceiveWithAddress, doSend, doSendTo, getLocalAddress, getLocalIPAddress, getLocalPort, getRemoteAddress, getRemoteIPAddress, getRemotePort, isClosed, isConnected, receive, receive, receiveMessage, receiveWithAddress, send, send, sendPortTriggerMessage, sendTo, sendTo, sendTo, setInUse, setNotInUse, setReceivePacketSize, toStringMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface uk.ac.manchester.spinnaker.connections.model.ConnectionconvertTimeout, getLocalIPAddress, getLocalPort, getRemoteIPAddress, getRemotePort, isClosed, isConnected, receive, receiveWithAddress, send, sendToMethods inherited from interface uk.ac.manchester.spinnaker.connections.model.SCPSenderReceivergetSCPData, receiveSCPResponse
- 
Field Details- 
boardsThe IDs of the specific set of boards managed by the BMPs we can talk to. Immutable.
 
- 
- 
Constructor Details- 
BMPConnection- Parameters:
- connectionData- Description of which BMP(s) to talk to.
- Throws:
- IOException- If socket creation fails.
 
 
- 
- 
Method Details- 
sendDescription copied from interface:SCPSenderReceiverSends an SCP request down this connection.Messages must have the following properties: - sourcePort is nullor 7
- sourceCpu is nullor 31
- sourceChipX is nullor 0
- sourceChipY is nullor 0
 sequence in the message is optional; if not set, (sequence number last assigned + 1) % 65536 will be used - Specified by:
- sendin interface- SCPSenderReceiver
- Parameters:
- scpRequest- message packet to send
- Throws:
- IOException- If there is an error sending the message
 
- sourcePort is 
- 
sendDescription copied from interface:SCPSenderReceiverSend a request that expects a response to be appropriately directed to the thread that is calling this method.- Specified by:
- sendin interface- SCPSenderReceiver
- Parameters:
- data- The message data to send.
- seq- The sequence number to come in the response.
- See Also:
 
- 
sendSend a request on this connection.- Parameters:
- scpRequest- The request to send.
- Throws:
- IOException- If the request can't be sent.
 
- 
getChipDefined to satisfy theSCPSenderReceiverinterface. Always 0,0 for a BMP.- Specified by:
- getChipin interface- SCPSenderReceiver
- Returns:
- The chip at which messages sent down this connection will arrive at first.
 
- 
receiveSCPResponseDescription copied from interface:SCPSenderReceiverReceives an SCP response from this connection. Blocks until a message has been received, or a timeout occurs.- Specified by:
- receiveSCPResponsein interface- SCPSenderReceiver
- Parameters:
- timeout- The time in milliseconds to wait for the message to arrive, or until the connection is closed.
- Returns:
- The SCP result, the sequence number, and the data of the response. The buffer pointer will be positioned at the point where the payload starts.
- Throws:
- IOException- If there is an error receiving the message
- SocketTimeoutException- If there is a timeout before a message is received
- InterruptedException- If communications are interrupted.
 
- 
receiveMessageDescription copied from class:UDPConnectionReceives a SpiNNaker message from this connection. Blocks until a message has been received, or a timeout occurs.- Specified by:
- receiveMessagein class- UDPConnection<SDPMessage>
- Parameters:
- timeout- The time in seconds to wait for the message to arrive, or until the connection is closed.
- Returns:
- the received message
- Throws:
- IOException- If there is an error receiving the message
- SocketTimeoutException- If there is a timeout during receiving
- InterruptedException- If communications are interrupted.
 
- 
getCoords- Returns:
- The coordinates of the BMP that this connection talks to.
 
 
-