Interface BMPTransceiverInterface
- All Superinterfaces:
AutoCloseable
- All Known Subinterfaces:
TransceiverInterface
- All Known Implementing Classes:
Transceiver
,UnimplementedBMPTransceiver
public interface BMPTransceiverInterface extends AutoCloseable
The interface supported by the
Transceiver
for talking to a BMP.
Emulates a lot of default handling and variant-type handling by Python.
Note that operations on a particular BMP (i.e., with the same
BMPCoords
) are always thread-unsafe.
- Author:
- Donal Fellows
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
BMPTransceiverInterface.FPGAResetType
The type of reset to perform. -
Method Summary
Modifier and Type Method Description default MappableIterable<BMPBoard>
availableBoards()
List which boards are actually available to be manipulated by the current bound BMP.MappableIterable<BMPBoard>
availableBoards(@Valid BMPCoords bmp)
List which boards are actually available to be manipulated by a particular BMP.void
bind(@Valid BMPCoords bmp)
Set the default BMP coordinates, at least for cabinet and frame.void
close()
BMPCoords
getBoundBMP()
default boolean
getResetStatus(@Valid BMPBoard board)
Get the FPGA reset status.boolean
getResetStatus(@Valid BMPCoords bmp, @Valid BMPBoard board)
Get the FPGA reset status.default MemoryLocation
getSerialFlashBuffer(@Valid BMPBoard board)
Get the address of the serial flash buffer.MemoryLocation
getSerialFlashBuffer(@Valid BMPCoords bmp, @Valid BMPBoard board)
Get the address of the serial flash buffer.void
power(@NotNull PowerCommand powerCommand, @Valid BMPCoords bmp, Collection<@Valid BMPBoard> boards)
Send a power request to the machine.default void
powerOff(@Valid BMPBoard board)
Power off a board in the machine.default void
powerOff(Collection<@Valid BMPBoard> boards)
Power off some boards in the machine.void
powerOffMachine()
Power off the whole machine.default void
powerOn(@Valid BMPBoard board)
Power on a board in the machine.default void
powerOn(Collection<@Valid BMPBoard> boards)
Power on some boards in the machine.void
powerOnMachine()
Power on the whole machine.default ADCInfo
readADCData(@Valid BMPBoard board)
Read the ADC data.ADCInfo
readADCData(@Valid BMPCoords bmp, @Valid BMPBoard board)
Read the ADC data.default Blacklist
readBlacklist(@Valid BMPBoard board)
Read the blacklist from a board.default Blacklist
readBlacklist(@Valid BMPCoords bmp, @Valid BMPBoard board)
Read the blacklist from a board.default FirmwareDescriptor
readBMPFirmwareDescriptor(@Valid BMPBoard board, FirmwareDescriptors type)
Read the BMP firmware descriptor.default FirmwareDescriptor
readBMPFirmwareDescriptor(@Valid BMPCoords bmp, @Valid BMPBoard board, FirmwareDescriptors type)
Read the BMP firmware descriptor.default ByteBuffer
readBMPMemory(@Valid BMPBoard board, @NotNull MemoryLocation baseAddress, @javax.validation.constraints.Positive int length)
Read BMP memory.ByteBuffer
readBMPMemory(@Valid BMPCoords bmp, @Valid BMPBoard board, @NotNull MemoryLocation baseAddress, @javax.validation.constraints.Positive int length)
Read BMP memory.default int
readBMPMemoryWord(@Valid BMPBoard board, @NotNull MemoryLocation address)
Read BMP memory.default int
readBMPMemoryWord(@Valid BMPCoords bmp, @Valid BMPBoard board, @NotNull MemoryLocation address)
Read BMP memory.default VersionInfo
readBMPVersion(@Valid BMPBoard board)
Read the BMP version.VersionInfo
readBMPVersion(@Valid BMPCoords bmp, @Valid BMPBoard board)
Read the BMP version.default VersionInfo
readBMPVersion(@Valid BMPCoords bmp, Iterable<@Valid BMPBoard> boards)
Read the BMP version.default VersionInfo
readBMPVersion(Iterable<@Valid BMPBoard> boards)
Read the BMP version.default String
readBoardSerialNumber(@Valid BMPBoard board)
Read the BMP serial number from a board.String
readBoardSerialNumber(@Valid BMPCoords bmp, @Valid BMPBoard board)
Read the BMP serial number from a board.default int
readFPGALinkCounter(FPGA fpga, int linkNumber, FPGARecevingLinkCounters counter, @Valid BMPBoard board)
Read a link counter on a FPGA of a board, assuming the standard FPGA configuration.default int
readFPGALinkCounter(FPGA fpga, int linkNumber, FPGARecevingLinkCounters counter, @Valid BMPCoords bmp, @Valid BMPBoard board)
Read a register on a FPGA of a board, assuming the standard FPGA configuration.default int
readFPGALinkCounter(FPGA fpga, int linkNumber, FPGASendingLinkCounters counter, @Valid BMPBoard board)
Read a link counter on a FPGA of a board, assuming the standard FPGA configuration.default int
readFPGALinkCounter(FPGA fpga, int linkNumber, FPGASendingLinkCounters counter, @Valid BMPCoords bmp, @Valid BMPBoard board)
Read a register on a FPGA of a board, assuming the standard FPGA configuration.default int
readFPGARegister(FPGA fpga, int registerBank, FPGALinkRegisters register, @Valid BMPBoard board)
Read a register on a FPGA of a board, assuming the standard FPGA configuration.default int
readFPGARegister(FPGA fpga, int registerBank, FPGALinkRegisters register, @Valid BMPCoords bmp, @Valid BMPBoard board)
Read a register on a FPGA of a board, assuming the standard FPGA configuration.default int
readFPGARegister(FPGA fpga, @NotNull MemoryLocation register, @Valid BMPBoard board)
Read a register on a FPGA of a board.int
readFPGARegister(FPGA fpga, @NotNull MemoryLocation register, @Valid BMPCoords bmp, @Valid BMPBoard board)
Read a register on a FPGA of a board.default int
readFPGARegister(FPGA fpga, FPGAMainRegisters register, @Valid BMPBoard board)
Read a register on a FPGA of a board, assuming the standard FPGA configuration.default int
readFPGARegister(FPGA fpga, FPGAMainRegisters register, @Valid BMPCoords bmp, @Valid BMPBoard board)
Read a register on a FPGA of a board, assuming the standard FPGA configuration.default ByteBuffer
readSerialFlash(@Valid BMPBoard board, @NotNull MemoryLocation baseAddress, @javax.validation.constraints.Positive int length)
Read BMP serial flash memory.ByteBuffer
readSerialFlash(@Valid BMPCoords bmp, @Valid BMPBoard board, @NotNull MemoryLocation baseAddress, @javax.validation.constraints.Positive int length)
Read BMP serial flash memory.default int
readSerialFlashCRC(@Valid BMPBoard board, @NotNull MemoryLocation baseAddress, @javax.validation.constraints.Positive int length)
Read the CRC32 checksum of BMP serial flash memory.int
readSerialFlashCRC(@Valid BMPCoords bmp, @Valid BMPBoard board, @NotNull MemoryLocation baseAddress, @javax.validation.constraints.Positive int length)
Read the CRC32 checksum of BMP serial flash memory.default void
resetFPGA(@Valid BMPBoard board, BMPTransceiverInterface.FPGAResetType resetType)
Reset the FPGAs on a board.void
resetFPGA(@Valid BMPCoords bmp, @Valid BMPBoard board, BMPTransceiverInterface.FPGAResetType resetType)
Reset the FPGAs on a board.default void
setLED(Collection<Integer> leds, LEDAction action, @Valid BMPBoard board)
Set the LED state of a board in the machine.void
setLED(Collection<Integer> leds, LEDAction action, @Valid BMPCoords bmp, Collection<@Valid BMPBoard> boards)
Set the LED state of a board in the machine.default void
writeBlacklist(@Valid BMPBoard board, @Valid Blacklist blacklist)
Write a blacklist to a board.default void
writeBlacklist(@Valid BMPCoords bmp, @Valid BMPBoard board, @Valid Blacklist blacklist)
Write a blacklist to a board.default void
writeBMPFlash(@Valid BMPBoard board, @NotNull MemoryLocation baseAddress)
Write a fixed size chunk to flash memory of a BMP with erase.void
writeBMPFlash(@Valid BMPCoords bmp, @Valid BMPBoard board, @NotNull MemoryLocation baseAddress)
Write a fixed size chunk to flash memory of a BMP with erase.default void
writeBMPMemory(@Valid BMPBoard board, @NotNull MemoryLocation baseAddress, int dataWord)
Write BMP memory.default void
writeBMPMemory(@Valid BMPBoard board, @NotNull MemoryLocation baseAddress, @NotNull File file)
Write BMP memory from a file.default void
writeBMPMemory(@Valid BMPBoard board, @NotNull MemoryLocation baseAddress, @NotNull ByteBuffer data)
Write BMP memory.default void
writeBMPMemory(@Valid BMPCoords bmp, @Valid BMPBoard board, @NotNull MemoryLocation baseAddress, int dataWord)
Write BMP memory.void
writeBMPMemory(@Valid BMPCoords bmp, @Valid BMPBoard board, @NotNull MemoryLocation baseAddress, @NotNull File file)
Write BMP memory from a file.void
writeBMPMemory(@Valid BMPCoords bmp, @Valid BMPBoard board, @NotNull MemoryLocation baseAddress, @NotNull ByteBuffer data)
Write BMP memory.default void
writeFlash(@Valid BMPBoard board, @NotNull MemoryLocation baseAddress, @NotNull ByteBuffer data)
Write a buffer to flash memory on the BMP.void
writeFlash(@Valid BMPCoords bmp, @Valid BMPBoard board, @NotNull MemoryLocation baseAddress, @NotNull ByteBuffer data)
Write a buffer to flash memory on the BMP.default void
writeFPGARegister(FPGA fpga, int registerBank, FPGALinkRegisters register, int value, @Valid BMPBoard board)
Write a register on a FPGA of a board, assuming the standard FPGA configuration.default void
writeFPGARegister(FPGA fpga, int registerBank, FPGALinkRegisters register, int value, @Valid BMPCoords bmp, @Valid BMPBoard board)
Write a register on a FPGA of a board, assuming the standard FPGA configuration.default void
writeFPGARegister(FPGA fpga, @NotNull MemoryLocation register, int value, @Valid BMPBoard board)
Write a register on a FPGA of a board.void
writeFPGARegister(FPGA fpga, @NotNull MemoryLocation register, int value, @Valid BMPCoords bmp, @Valid BMPBoard board)
Write a register on a FPGA of a board.default void
writeFPGARegister(FPGA fpga, FPGAMainRegisters register, int value, @Valid BMPBoard board)
Write a register on a FPGA of a board, assuming the standard FPGA configuration.default void
writeFPGARegister(FPGA fpga, FPGAMainRegisters register, int value, @Valid BMPCoords bmp, @Valid BMPBoard board)
Write a register on a FPGA of a board, assuming the standard FPGA configuration.default void
writeSerialFlash(@Valid BMPBoard board, @NotNull MemoryLocation baseAddress, @javax.validation.constraints.Positive int size, @NotNull InputStream stream)
Write BMP serial flash memory from a stream.default void
writeSerialFlash(@Valid BMPBoard board, @NotNull MemoryLocation baseAddress, @NotNull File file)
Write BMP serial flash memory from a file.default void
writeSerialFlash(@Valid BMPBoard board, @NotNull MemoryLocation baseAddress, @NotNull ByteBuffer data)
Write BMP serial flash memory.void
writeSerialFlash(@Valid BMPCoords bmp, @Valid BMPBoard board, @NotNull MemoryLocation baseAddress, @javax.validation.constraints.Positive int size, @NotNull InputStream stream)
Write BMP serial flash memory from a stream.void
writeSerialFlash(@Valid BMPCoords bmp, @Valid BMPBoard board, @NotNull MemoryLocation baseAddress, @NotNull File file)
Write BMP serial flash memory from a file.void
writeSerialFlash(@Valid BMPCoords bmp, @Valid BMPBoard board, @NotNull MemoryLocation baseAddress, @NotNull ByteBuffer data)
Write BMP serial flash memory.
-
Method Details
-
bind
Set the default BMP coordinates, at least for cabinet and frame.- Parameters:
bmp
- The new default coordinates.
-
getBoundBMP
BMPCoords getBoundBMP()- Returns:
- The currently bound BMP coordinates. Defaults to 0,0 if not set
by
bind(BMPCoords)
.
-
availableBoards
@ParallelSafeWithCare @CheckReturnValue MappableIterable<BMPBoard> availableBoards(@Valid @Valid BMPCoords bmp) throws IOException, ProcessException, InterruptedExceptionList which boards are actually available to be manipulated by a particular BMP.- Parameters:
bmp
- Which BMP are we asking?- Returns:
- Ordered list of board identifiers.
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
availableBoards
@ParallelSafeWithCare @CheckReturnValue default MappableIterable<BMPBoard> availableBoards() throws IOException, ProcessException, InterruptedExceptionList which boards are actually available to be manipulated by the current bound BMP.- Returns:
- Ordered list of board identifiers.
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
powerOnMachine
Power on the whole machine.WARNING! This operation is unsafe in a multi-threaded context.
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.
-
powerOn
@ParallelSafeWithCare default void powerOn(Collection<@Valid BMPBoard> boards) throws InterruptedException, IOException, ProcessExceptionPower on some boards in the machine.WARNING! This operation is unsafe in a multi-threaded context.
- Parameters:
boards
- The boards to power on (managed by default BMP)- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.
-
powerOn
@ParallelSafeWithCare default void powerOn(@Valid @Valid BMPBoard board) throws InterruptedException, IOException, ProcessExceptionPower on a board in the machine.WARNING! This operation is unsafe in a multi-threaded context.
- Parameters:
board
- The board to power on (managed by default BMP)- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.
-
powerOffMachine
Power off the whole machine.WARNING! This operation is unsafe in a multi-threaded context.
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.
-
powerOff
@ParallelSafeWithCare default void powerOff(Collection<@Valid BMPBoard> boards) throws InterruptedException, IOException, ProcessExceptionPower off some boards in the machine.WARNING! This operation is unsafe in a multi-threaded context.
- Parameters:
boards
- The boards to power off (managed by default BMP)- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.
-
powerOff
@ParallelSafeWithCare default void powerOff(@Valid @Valid BMPBoard board) throws InterruptedException, IOException, ProcessExceptionPower off a board in the machine.WARNING! This operation is unsafe in a multi-threaded context.
- Parameters:
board
- The board to power off (in the bound BMP)- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.InterruptedException
- If the communications were interrupted.
-
power
@ParallelUnsafe void power(@NotNull @NotNull PowerCommand powerCommand, @Valid @Valid BMPCoords bmp, Collection<@Valid BMPBoard> boards) throws InterruptedException, IOException, ProcessExceptionSend a power request to the machine.WARNING! This operation is unsafe in a multi-threaded context.
- Parameters:
powerCommand
- The power command to sendbmp
- the coordinates of the BMP; components are zero for a board not in a frame of a cabinetboards
- The boards to send the command to- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.InterruptedException
- If the communications were interrupted.
-
setLED
@ParallelSafe void setLED(Collection<Integer> leds, LEDAction action, @Valid @Valid BMPCoords bmp, Collection<@Valid BMPBoard> boards) throws IOException, ProcessException, InterruptedExceptionSet the LED state of a board in the machine.- Parameters:
leds
- Collection of LED numbers to set the state of (0-7)action
- State to set the LED to, either on, off or togglebmp
- the coordinates of the BMP this is targetingboards
- Specifies the board to control the LEDs of. The command will actually be sent to the first board in the collection.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
setLED
@ParallelSafe default void setLED(Collection<Integer> leds, LEDAction action, @Valid @Valid BMPBoard board) throws IOException, ProcessException, InterruptedExceptionSet the LED state of a board in the machine.- Parameters:
leds
- Collection of LED numbers to set the state of (0-7)action
- State to set the LED to, either on, off or toggleboard
- Specifies the board to control the LEDs of.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readFPGARegister
@ParallelSafe @CheckReturnValue default int readFPGARegister(FPGA fpga, FPGAMainRegisters register, @Valid @Valid BMPBoard board) throws IOException, ProcessException, InterruptedExceptionRead a register on a FPGA of a board, assuming the standard FPGA configuration.- Parameters:
fpga
- FPGA (0, 1 or 2) to communicate with.register
- Register to read.board
- which board to request the FPGA register from- Returns:
- the register data
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readFPGARegister
@ParallelSafe @CheckReturnValue default int readFPGARegister(FPGA fpga, FPGAMainRegisters register, @Valid @Valid BMPCoords bmp, @Valid @Valid BMPBoard board) throws IOException, ProcessException, InterruptedExceptionRead a register on a FPGA of a board, assuming the standard FPGA configuration.- Parameters:
fpga
- FPGA (0, 1 or 2) to communicate with.register
- Register to read.bmp
- the coordinates of the BMP this is targetingboard
- which board to request the FPGA register from- Returns:
- the register data
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readFPGARegister
@ParallelSafe @CheckReturnValue default int readFPGARegister(FPGA fpga, int registerBank, FPGALinkRegisters register, @Valid @Valid BMPBoard board) throws IOException, ProcessException, InterruptedExceptionRead a register on a FPGA of a board, assuming the standard FPGA configuration.- Parameters:
fpga
- FPGA (0, 1 or 2) to communicate with.registerBank
- Which bank of link registers to read from.register
- Register to read.board
- which board to request the FPGA register from- Returns:
- the register data
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readFPGARegister
@ParallelSafe @CheckReturnValue default int readFPGARegister(FPGA fpga, int registerBank, FPGALinkRegisters register, @Valid @Valid BMPCoords bmp, @Valid @Valid BMPBoard board) throws IOException, ProcessException, InterruptedExceptionRead a register on a FPGA of a board, assuming the standard FPGA configuration.- Parameters:
fpga
- FPGA (0, 1 or 2) to communicate with.registerBank
- Which bank of link registers to read from.register
- Register to read.bmp
- the coordinates of the BMP this is targetingboard
- which board to request the FPGA register from- Returns:
- the register data
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readFPGALinkCounter
@ParallelSafe @CheckReturnValue default int readFPGALinkCounter(FPGA fpga, int linkNumber, FPGARecevingLinkCounters counter, @Valid @Valid BMPBoard board) throws IOException, ProcessException, InterruptedExceptionRead a link counter on a FPGA of a board, assuming the standard FPGA configuration.- Parameters:
fpga
- FPGA (0, 1 or 2) to communicate with.linkNumber
- Which bank of link counters to read from.counter
- Counter to read.board
- which board to request the FPGA register from- Returns:
- the register data
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readFPGALinkCounter
@ParallelSafe @CheckReturnValue default int readFPGALinkCounter(FPGA fpga, int linkNumber, FPGARecevingLinkCounters counter, @Valid @Valid BMPCoords bmp, @Valid @Valid BMPBoard board) throws IOException, ProcessException, InterruptedExceptionRead a register on a FPGA of a board, assuming the standard FPGA configuration.- Parameters:
fpga
- FPGA (0, 1 or 2) to communicate with.linkNumber
- Which bank of link counters to read from.counter
- Counter to read.bmp
- the coordinates of the BMP this is targetingboard
- which board to request the FPGA register from- Returns:
- the register data
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readFPGALinkCounter
@ParallelSafe @CheckReturnValue default int readFPGALinkCounter(FPGA fpga, int linkNumber, FPGASendingLinkCounters counter, @Valid @Valid BMPBoard board) throws IOException, ProcessException, InterruptedExceptionRead a link counter on a FPGA of a board, assuming the standard FPGA configuration.- Parameters:
fpga
- FPGA (0, 1 or 2) to communicate with.linkNumber
- Which bank of link counters to read from.counter
- Counter to read.board
- which board to request the FPGA register from- Returns:
- the register data
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readFPGALinkCounter
@ParallelSafe @CheckReturnValue default int readFPGALinkCounter(FPGA fpga, int linkNumber, FPGASendingLinkCounters counter, @Valid @Valid BMPCoords bmp, @Valid @Valid BMPBoard board) throws IOException, ProcessException, InterruptedExceptionRead a register on a FPGA of a board, assuming the standard FPGA configuration.- Parameters:
fpga
- FPGA (0, 1 or 2) to communicate with.linkNumber
- Which bank of link counters to read from.counter
- Counter to read.bmp
- the coordinates of the BMP this is targetingboard
- which board to request the FPGA register from- Returns:
- the register data
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readFPGARegister
@ParallelSafe @CheckReturnValue default int readFPGARegister(FPGA fpga, @NotNull @NotNull MemoryLocation register, @Valid @Valid BMPBoard board) throws IOException, ProcessException, InterruptedExceptionRead a register on a FPGA of a board. The meaning of the register's contents will depend on the FPGA's configuration.- Parameters:
fpga
- FPGA (0, 1 or 2) to communicate with.register
- Register address to read to (will be rounded down to the nearest 32-bit word boundary).board
- which board to request the FPGA register from- Returns:
- the register data
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readFPGARegister
@ParallelSafe @CheckReturnValue int readFPGARegister(FPGA fpga, @NotNull @NotNull MemoryLocation register, @Valid @Valid BMPCoords bmp, @Valid @Valid BMPBoard board) throws IOException, ProcessException, InterruptedExceptionRead a register on a FPGA of a board. The meaning of the register's contents will depend on the FPGA's configuration.- Parameters:
fpga
- FPGA (0, 1 or 2) to communicate with.register
- Register address to read to (will be rounded down to the nearest 32-bit word boundary).bmp
- the coordinates of the BMP this is targetingboard
- which board to request the FPGA register from- Returns:
- the register data
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeFPGARegister
@ParallelSafe default void writeFPGARegister(FPGA fpga, FPGAMainRegisters register, int value, @Valid @Valid BMPBoard board) throws IOException, ProcessException, InterruptedExceptionWrite a register on a FPGA of a board, assuming the standard FPGA configuration.- Parameters:
fpga
- FPGA (0, 1 or 2) to communicate with.register
- Register to write.value
- the value to write into the FPGA registerboard
- which board to write the FPGA register to- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeFPGARegister
@ParallelSafe default void writeFPGARegister(FPGA fpga, FPGAMainRegisters register, int value, @Valid @Valid BMPCoords bmp, @Valid @Valid BMPBoard board) throws IOException, ProcessException, InterruptedExceptionWrite a register on a FPGA of a board, assuming the standard FPGA configuration.- Parameters:
fpga
- FPGA (0, 1 or 2) to communicate with.register
- Register to write.value
- the value to write into the FPGA registerbmp
- the coordinates of the BMP this is targetingboard
- which board to write the FPGA register to- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeFPGARegister
@ParallelSafe default void writeFPGARegister(FPGA fpga, int registerBank, FPGALinkRegisters register, int value, @Valid @Valid BMPBoard board) throws IOException, ProcessException, InterruptedExceptionWrite a register on a FPGA of a board, assuming the standard FPGA configuration.- Parameters:
fpga
- FPGA (0, 1 or 2) to communicate with.registerBank
- Which bank of link registers to read from.register
- Register to write.value
- the value to write into the FPGA registerboard
- which board to write the FPGA register to- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeFPGARegister
@ParallelSafe default void writeFPGARegister(FPGA fpga, int registerBank, FPGALinkRegisters register, int value, @Valid @Valid BMPCoords bmp, @Valid @Valid BMPBoard board) throws IOException, ProcessException, InterruptedExceptionWrite a register on a FPGA of a board, assuming the standard FPGA configuration.- Parameters:
fpga
- FPGA (0, 1 or 2) to communicate with.registerBank
- Which bank of link registers to read from.register
- Register to write.value
- the value to write into the FPGA registerbmp
- the coordinates of the BMP this is targetingboard
- which board to write the FPGA register to- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeFPGARegister
@ParallelSafe default void writeFPGARegister(FPGA fpga, @NotNull @NotNull MemoryLocation register, int value, @Valid @Valid BMPBoard board) throws IOException, ProcessException, InterruptedExceptionWrite a register on a FPGA of a board. The meaning of setting the register's contents will depend on the FPGA's configuration.- Parameters:
fpga
- FPGA (0, 1 or 2) to communicate with.register
- Register address to read to (will be rounded down to the nearest 32-bit word boundary).value
- the value to write into the FPGA registerboard
- which board to write the FPGA register to- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeFPGARegister
@ParallelSafe void writeFPGARegister(FPGA fpga, @NotNull @NotNull MemoryLocation register, int value, @Valid @Valid BMPCoords bmp, @Valid @Valid BMPBoard board) throws IOException, ProcessException, InterruptedExceptionWrite a register on a FPGA of a board. The meaning of setting the register's contents will depend on the FPGA's configuration.- Parameters:
fpga
- FPGA (0, 1 or 2) to communicate with.register
- Register address to read to (will be rounded down to the nearest 32-bit word boundary).value
- the value to write into the FPGA registerbmp
- the coordinates of the BMP this is targetingboard
- which board to write the FPGA register to- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readADCData
@ParallelSafe @CheckReturnValue default ADCInfo readADCData(@Valid @Valid BMPBoard board) throws IOException, ProcessException, InterruptedExceptionRead the ADC data.- Parameters:
board
- which board to request the ADC data from- Returns:
- the FPGA's ADC data object
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readADCData
@ParallelSafe @CheckReturnValue ADCInfo readADCData(@Valid @Valid BMPCoords bmp, @Valid @Valid BMPBoard board) throws IOException, ProcessException, InterruptedExceptionRead the ADC data.- Parameters:
bmp
- the coordinates of the BMP this is targetingboard
- which board to request the ADC data from- Returns:
- the FPGA's ADC data object
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readBMPVersion
@ParallelUnsafe @CheckReturnValue default VersionInfo readBMPVersion(Iterable<@Valid BMPBoard> boards) throws IOException, ProcessException, InterruptedExceptionRead the BMP version.- Parameters:
boards
- which board to request the data from; the first board in the collection will be queried- Returns:
- the parsed SVER from the BMP
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readBMPVersion
@ParallelSafe @CheckReturnValue default VersionInfo readBMPVersion(@Valid @Valid BMPBoard board) throws IOException, ProcessException, InterruptedExceptionRead the BMP version.- Parameters:
board
- which board to request the data from- Returns:
- the parsed SVER from the BMP
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readBMPVersion
@ParallelUnsafe @CheckReturnValue default VersionInfo readBMPVersion(@Valid @Valid BMPCoords bmp, Iterable<@Valid BMPBoard> boards) throws IOException, ProcessException, InterruptedExceptionRead the BMP version.- Parameters:
bmp
- the coordinates of the BMP this is targetingboards
- which board to request the data from; the first board in the collection will be queried- Returns:
- the parsed SVER from the BMP
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readBMPVersion
@ParallelSafeWithCare @CheckReturnValue VersionInfo readBMPVersion(@Valid @Valid BMPCoords bmp, @Valid @Valid BMPBoard board) throws IOException, ProcessException, InterruptedExceptionRead the BMP version.- Parameters:
bmp
- the coordinates of the BMP this is targetingboard
- which board to request the data from- Returns:
- the parsed SVER from the BMP
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readBMPFirmwareDescriptor
@ParallelSafeWithCare @CheckReturnValue default FirmwareDescriptor readBMPFirmwareDescriptor(@Valid @Valid BMPBoard board, FirmwareDescriptors type) throws IOException, ProcessException, InterruptedExceptionRead the BMP firmware descriptor.- Parameters:
board
- which board to request the descriptor fromtype
- Which firmware descriptor to read- Returns:
- the firmware descriptor
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readBMPFirmwareDescriptor
@ParallelSafeWithCare @CheckReturnValue default FirmwareDescriptor readBMPFirmwareDescriptor(@Valid @Valid BMPCoords bmp, @Valid @Valid BMPBoard board, FirmwareDescriptors type) throws IOException, ProcessException, InterruptedExceptionRead the BMP firmware descriptor.- Parameters:
bmp
- the coordinates of the BMP this is targetingboard
- which board to request the descriptor fromtype
- Which firmware descriptor to read- Returns:
- the firmware descriptor
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getResetStatus
@ParallelSafeWithCare @CheckReturnValue default boolean getResetStatus(@Valid @Valid BMPBoard board) throws IOException, ProcessException, InterruptedExceptionGet the FPGA reset status.- Parameters:
board
- Which board are the FPGAs on?- Returns:
- What the state of the reset line is.
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getResetStatus
@ParallelSafeWithCare @CheckReturnValue boolean getResetStatus(@Valid @Valid BMPCoords bmp, @Valid @Valid BMPBoard board) throws IOException, ProcessException, InterruptedExceptionGet the FPGA reset status.- Parameters:
bmp
- Which BMP are we talking to?board
- Which board are the FPGAs on?- Returns:
- What the state of the reset line is.
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getSerialFlashBuffer
@ParallelSafeWithCare default MemoryLocation getSerialFlashBuffer(@Valid @Valid BMPBoard board) throws IOException, ProcessException, InterruptedExceptionGet the address of the serial flash buffer.- Parameters:
board
- Which BMP's buffer do we want the address of?- Returns:
- The adress of the serial flash buffer.
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getSerialFlashBuffer
@ParallelSafeWithCare MemoryLocation getSerialFlashBuffer(@Valid @Valid BMPCoords bmp, @Valid @Valid BMPBoard board) throws IOException, ProcessException, InterruptedExceptionGet the address of the serial flash buffer.- Parameters:
bmp
- Which BMP are we talking to?board
- Which BMP's buffer do we want the address of?- Returns:
- The adress of the serial flash buffer.
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
resetFPGA
@ParallelSafeWithCare default void resetFPGA(@Valid @Valid BMPBoard board, BMPTransceiverInterface.FPGAResetType resetType) throws IOException, ProcessException, InterruptedExceptionReset the FPGAs on a board.- Parameters:
board
- Which board are the FPGAs on?resetType
- What kind of reset to perform.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
resetFPGA
@ParallelSafeWithCare void resetFPGA(@Valid @Valid BMPCoords bmp, @Valid @Valid BMPBoard board, BMPTransceiverInterface.FPGAResetType resetType) throws IOException, ProcessException, InterruptedExceptionReset the FPGAs on a board.- Parameters:
bmp
- Which BMP are we talking to?board
- Which board are the FPGAs on?resetType
- What kind of reset to perform.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readBMPMemory
@ParallelSafeWithCare @CheckReturnValue default ByteBuffer readBMPMemory(@Valid @Valid BMPBoard board, @NotNull @NotNull MemoryLocation baseAddress, @Positive @javax.validation.constraints.Positive int length) throws IOException, ProcessException, InterruptedExceptionRead BMP memory.- Parameters:
board
- Which board's BMP are we reading?baseAddress
- The address in the BMP's memory where the region of memory to be read startslength
- The length of the data to be read in bytes- Returns:
- A little-endian buffer of data read, positioned at the start of the data. The buffer will be writable, but writes will not be automatically reflected anywhere.
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readBMPMemory
@ParallelSafeWithCare @CheckReturnValue ByteBuffer readBMPMemory(@Valid @Valid BMPCoords bmp, @Valid @Valid BMPBoard board, @NotNull @NotNull MemoryLocation baseAddress, @Positive @javax.validation.constraints.Positive int length) throws IOException, ProcessException, InterruptedExceptionRead BMP memory.- Parameters:
bmp
- Which BMP are we talking to?board
- Which board's BMP are we reading?baseAddress
- The address in the BMP's memory where the region of memory to be read startslength
- The length of the data to be read in bytes- Returns:
- A little-endian buffer of data read, positioned at the start of the data. The buffer will be writable, but writes will not be automatically reflected anywhere.
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readBMPMemoryWord
@ParallelSafeWithCare @CheckReturnValue default int readBMPMemoryWord(@Valid @Valid BMPBoard board, @NotNull @NotNull MemoryLocation address) throws IOException, ProcessException, InterruptedExceptionRead BMP memory.- Parameters:
board
- Which board's BMP are we reading?address
- The address in the BMP's memory where the region of memory to be read starts- Returns:
- The little-endian word at the given address.
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readBMPMemoryWord
@ParallelSafeWithCare @CheckReturnValue default int readBMPMemoryWord(@Valid @Valid BMPCoords bmp, @Valid @Valid BMPBoard board, @NotNull @NotNull MemoryLocation address) throws IOException, ProcessException, InterruptedExceptionRead BMP memory.- Parameters:
bmp
- Which BMP are we talking to?board
- Which board's BMP are we reading?address
- The address in the BMP's memory where the region of memory to be read starts- Returns:
- The little-endian word at the given address.
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeBMPMemory
default void writeBMPMemory(@Valid @Valid BMPBoard board, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull ByteBuffer data) throws IOException, ProcessException, InterruptedExceptionWrite BMP memory.- Parameters:
board
- Which board's BMP are we writing?baseAddress
- The address in the BMP's memory where the region of memory to be written startsdata
- The data to be written, extending from the position to the limit. The contents of this buffer will be unchanged.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeBMPMemory
void writeBMPMemory(@Valid @Valid BMPCoords bmp, @Valid @Valid BMPBoard board, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull ByteBuffer data) throws IOException, ProcessException, InterruptedExceptionWrite BMP memory.- Parameters:
bmp
- Which BMP are we talking to?board
- Which board's BMP are we writing?baseAddress
- The address in the BMP's memory where the region of memory to be written startsdata
- The data to be written, extending from the position to the limit. The contents of this buffer will be unchanged.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeBMPMemory
default void writeBMPMemory(@Valid @Valid BMPBoard board, @NotNull @NotNull MemoryLocation baseAddress, int dataWord) throws IOException, ProcessException, InterruptedExceptionWrite BMP memory.- Parameters:
board
- Which board's BMP are we writing?baseAddress
- The address in the BMP's memory where the region of memory to be written startsdataWord
- The data to be written as a 4-byte little-endian value.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeBMPMemory
default void writeBMPMemory(@Valid @Valid BMPCoords bmp, @Valid @Valid BMPBoard board, @NotNull @NotNull MemoryLocation baseAddress, int dataWord) throws IOException, ProcessException, InterruptedExceptionWrite BMP memory.- Parameters:
bmp
- Which BMP are we talking to?board
- Which board's BMP are we writing?baseAddress
- The address in the BMP's memory where the region of memory to be written startsdataWord
- The data to be written as a 4-byte little-endian value.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeBMPMemory
default void writeBMPMemory(@Valid @Valid BMPBoard board, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull File file) throws IOException, ProcessException, InterruptedExceptionWrite BMP memory from a file.- Parameters:
board
- Which board's BMP are we writing?baseAddress
- The address in the BMP's memory where the region of memory to be written startsfile
- The file containing the data to be written.- Throws:
IOException
- If anything goes wrong with networking or file I/O.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeBMPMemory
void writeBMPMemory(@Valid @Valid BMPCoords bmp, @Valid @Valid BMPBoard board, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull File file) throws IOException, ProcessException, InterruptedExceptionWrite BMP memory from a file.- Parameters:
bmp
- Which BMP are we talking to?board
- Which board's BMP are we writing?baseAddress
- The address in the BMP's memory where the region of memory to be written startsfile
- The file containing the data to be written.- Throws:
IOException
- If anything goes wrong with networking or file I/O.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readSerialFlash
@ParallelSafeWithCare @CheckReturnValue default ByteBuffer readSerialFlash(@Valid @Valid BMPBoard board, @NotNull @NotNull MemoryLocation baseAddress, @Positive @javax.validation.constraints.Positive int length) throws IOException, ProcessException, InterruptedExceptionRead BMP serial flash memory.- Parameters:
board
- Which board's BMP are we reading?baseAddress
- The address in the BMP's serial flash where the region of memory to be read startslength
- The length of the data to be read in bytes- Returns:
- A little-endian buffer of data read, positioned at the start of the data. The buffer will be writable, but writes will not be automatically reflected anywhere.
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readSerialFlash
@ParallelSafeWithCare @CheckReturnValue ByteBuffer readSerialFlash(@Valid @Valid BMPCoords bmp, @Valid @Valid BMPBoard board, @NotNull @NotNull MemoryLocation baseAddress, @Positive @javax.validation.constraints.Positive int length) throws IOException, ProcessException, InterruptedExceptionRead BMP serial flash memory.- Parameters:
bmp
- Which BMP are we talking to?board
- Which board's BMP are we reading?baseAddress
- The address in the BMP's serial flash where the region of memory to be read startslength
- The length of the data to be read in bytes- Returns:
- A little-endian buffer of data read, positioned at the start of the data. The buffer will be writable, but writes will not be automatically reflected anywhere.
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readBoardSerialNumber
@ParallelSafeWithCare @CheckReturnValue String readBoardSerialNumber(@Valid @Valid BMPCoords bmp, @Valid @Valid BMPBoard board) throws IOException, ProcessException, InterruptedExceptionRead the BMP serial number from a board.- Parameters:
bmp
- Which BMP are we sending messages to directly?board
- Which board's BMP (of those managed by the BMP we send the message to) are we getting the serial number from?- Returns:
- The LPC1768 serial number.
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readBoardSerialNumber
@CheckReturnValue default String readBoardSerialNumber(@Valid @Valid BMPBoard board) throws ProcessException, IOException, InterruptedExceptionRead the BMP serial number from a board.- Parameters:
board
- Which board's BMP are we reading the serial number of? Must be one controlled by the current bound BMP.- Returns:
- The LPC1768 serial number.
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readBlacklist
@CheckReturnValue default Blacklist readBlacklist(@Valid @Valid BMPCoords bmp, @Valid @Valid BMPBoard board) throws IOException, ProcessException, InterruptedExceptionRead the blacklist from a board.- Parameters:
bmp
- Which BMP are we sending messages to directly?board
- Which board's blacklist are we reading?- Returns:
- The contents of the blacklist.
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readBlacklist
@CheckReturnValue default Blacklist readBlacklist(@Valid @Valid BMPBoard board) throws IOException, ProcessException, InterruptedExceptionRead the blacklist from a board.- Parameters:
board
- Which board's blacklist are we reading? Must be one controlled by the current bound BMP.- Returns:
- The contents of the blacklist.
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeBlacklist
default void writeBlacklist(@Valid @Valid BMPBoard board, @Valid @Valid Blacklist blacklist) throws ProcessException, IOException, InterruptedExceptionWrite a blacklist to a board. Note that this is a non-transactional operation!- Parameters:
board
- Which board's BMP to write to.blacklist
- The blacklist to write.- Throws:
ProcessException
- If a BMP rejects a message.IOException
- If anything goes wrong with networking.InterruptedException
- If interrupted. Interruption can happen prior to commencing the actual writes.
-
writeBlacklist
default void writeBlacklist(@Valid @Valid BMPCoords bmp, @Valid @Valid BMPBoard board, @Valid @Valid Blacklist blacklist) throws ProcessException, IOException, InterruptedExceptionWrite a blacklist to a board. Note that this is a non-transactional operation!- Parameters:
bmp
- The BMP to send communications via.board
- Which board's BMP to write to.blacklist
- The blacklist to write.- Throws:
ProcessException
- If a BMP rejects a message.IOException
- If anything goes wrong with networking.InterruptedException
- If interrupted. Interruption can happen prior to commencing the actual writes.
-
readSerialFlashCRC
@ParallelSafeWithCare @CheckReturnValue default int readSerialFlashCRC(@Valid @Valid BMPBoard board, @NotNull @NotNull MemoryLocation baseAddress, @Positive @javax.validation.constraints.Positive int length) throws IOException, ProcessException, InterruptedExceptionRead the CRC32 checksum of BMP serial flash memory.- Parameters:
board
- Which board's BMP are we reading?baseAddress
- The address in the BMP's serial flash where the region of memory to be checksummed startslength
- The length of the data to be checksummed in bytes- Returns:
- The CRC32 checksum
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readSerialFlashCRC
@ParallelSafeWithCare @CheckReturnValue int readSerialFlashCRC(@Valid @Valid BMPCoords bmp, @Valid @Valid BMPBoard board, @NotNull @NotNull MemoryLocation baseAddress, @Positive @javax.validation.constraints.Positive int length) throws IOException, ProcessException, InterruptedExceptionRead the CRC32 checksum of BMP serial flash memory.- Parameters:
bmp
- Which BMP are we talking to?board
- Which board's BMP are we reading?baseAddress
- The address in the BMP's serial flash where the region of memory to be checksummed startslength
- The length of the data to be checksummed in bytes- Returns:
- The CRC32 checksum
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeSerialFlash
default void writeSerialFlash(@Valid @Valid BMPBoard board, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull File file) throws ProcessException, IOException, InterruptedExceptionWrite BMP serial flash memory from a file.- Parameters:
board
- Which board's BMP are we writing?baseAddress
- The address in the BMP's serial flash where the region of memory to be written startsfile
- The file containing the data to be written- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeSerialFlash
void writeSerialFlash(@Valid @Valid BMPCoords bmp, @Valid @Valid BMPBoard board, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull File file) throws ProcessException, IOException, InterruptedExceptionWrite BMP serial flash memory from a file.- Parameters:
bmp
- Which BMP are we talking to?board
- Which board's BMP are we writing?baseAddress
- The address in the BMP's serial flash where the region of memory to be written startsfile
- The file containing the data to be written- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeSerialFlash
default void writeSerialFlash(@Valid @Valid BMPBoard board, @NotNull @NotNull MemoryLocation baseAddress, @Positive @javax.validation.constraints.Positive int size, @NotNull @NotNull InputStream stream) throws ProcessException, IOException, InterruptedExceptionWrite BMP serial flash memory from a stream.- Parameters:
board
- Which board's BMP are we writing?baseAddress
- The address in the BMP's serial flash where the region of memory to be written startssize
- How many bytes to write from the streamstream
- The file containing the data to be written- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeSerialFlash
void writeSerialFlash(@Valid @Valid BMPCoords bmp, @Valid @Valid BMPBoard board, @NotNull @NotNull MemoryLocation baseAddress, @Positive @javax.validation.constraints.Positive int size, @NotNull @NotNull InputStream stream) throws ProcessException, IOException, InterruptedExceptionWrite BMP serial flash memory from a stream.- Parameters:
bmp
- Which BMP are we talking to?board
- Which board's BMP are we writing?baseAddress
- The address in the BMP's serial flash where the region of memory to be written startssize
- How many bytes to write from the streamstream
- The file containing the data to be written- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeSerialFlash
default void writeSerialFlash(@Valid @Valid BMPBoard board, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull ByteBuffer data) throws ProcessException, IOException, InterruptedExceptionWrite BMP serial flash memory.- Parameters:
board
- Which board's BMP are we writing?baseAddress
- The address in the BMP's serial flash where the region of memory to be written startsdata
- The raw data to be written- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeSerialFlash
void writeSerialFlash(@Valid @Valid BMPCoords bmp, @Valid @Valid BMPBoard board, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull ByteBuffer data) throws ProcessException, IOException, InterruptedExceptionWrite BMP serial flash memory.- Parameters:
bmp
- Which BMP are we talking to?board
- Which board's BMP are we writing?baseAddress
- The address in the BMP's serial flash where the region of memory to be written startsdata
- The raw data to be written- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeBMPFlash
default void writeBMPFlash(@Valid @Valid BMPBoard board, @NotNull @NotNull MemoryLocation baseAddress) throws IOException, ProcessException, InterruptedExceptionWrite a fixed size chunk to flash memory of a BMP with erase. The data must have already been written to the flash buffer.- Parameters:
board
- Which board's BMP are we writing to?baseAddress
- Where in flash will we write?- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.- See Also:
writeFlash(BMPCoords,BMPBoard,MemoryLocation,ByteBuffer)
-
writeBMPFlash
void writeBMPFlash(@Valid @Valid BMPCoords bmp, @Valid @Valid BMPBoard board, @NotNull @NotNull MemoryLocation baseAddress) throws IOException, ProcessException, InterruptedExceptionWrite a fixed size chunk to flash memory of a BMP with erase. The data must have already been written to the flash buffer.- Parameters:
bmp
- Which BMP are we talking to?board
- Which board's BMP are we writing to?baseAddress
- Where in flash will we write?- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.- See Also:
writeFlash(BMPCoords,BMPBoard,MemoryLocation,ByteBuffer)
-
writeFlash
default void writeFlash(@Valid @Valid BMPBoard board, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull ByteBuffer data) throws ProcessException, IOException, InterruptedExceptionWrite a buffer to flash memory on the BMP. This is a composite operation.- Parameters:
board
- Which board's BMP are we writing to?baseAddress
- Where in flash will we write?data
- What data will we write?- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeFlash
void writeFlash(@Valid @Valid BMPCoords bmp, @Valid @Valid BMPBoard board, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull ByteBuffer data) throws ProcessException, IOException, InterruptedExceptionWrite a buffer to flash memory on the BMP. This is a composite operation.- Parameters:
bmp
- Which BMP are we talking to?board
- Which board's BMP are we writing to?baseAddress
- Where in flash will we write?data
- What data will we write?- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
IOException
-