spinnman.messages.eieio.command_messages package¶
Module contents¶
- class spinnman.messages.eieio.command_messages.EIEIOCommandHeader(command: int | Enum)¶
Bases:
objectEIEIO header for command packets.
- Parameters:
command
- static from_bytestring(data: bytes, offset: int) EIEIOCommandHeader[source]¶
Read an EIEIO command header from a byte-string.
- Parameters:
data – The byte-string to read the data from
offset – The offset where the valid data starts
- Returns:
an EIEIO command header
- Raises:
SpinnmanIOException – If there is an error reading from the reader
SpinnmanInvalidParameterException – If there is an error setting any of the values
- class spinnman.messages.eieio.command_messages.EIEIOCommandMessage(eieio_command_header: EIEIOCommandHeader, data: bytes | None = None, offset: int = 0)¶
Bases:
AbstractEIEIOMessageAn EIEIO command message.
- Parameters:
eieio_command_header – The header of the message
data – Optional incoming data
offset – Offset into the data where valid data begins
- property eieio_header: EIEIOCommandHeader¶
- The header of the message.
Gets the eieio_header passed into the init.
- static from_bytestring(command_header: EIEIOCommandHeader, data: bytes, offset: int) EIEIOCommandMessage[source]¶
Creates an EIEIOCommandMessage based on the supplied information.
- Parameters:
command_header
data
offset
- Returns:
The created EIEIOCommandMessage
- class spinnman.messages.eieio.command_messages.EventStopRequest¶
Bases:
EIEIOCommandMessagePacket used for the buffering input technique which causes the parser of the input packet to terminate its execution.
- Parameters:
eieio_command_header – The header of the message
data – Optional incoming data
offset – Offset into the data where valid data begins
- class spinnman.messages.eieio.command_messages.HostDataRead(n_requests: int, sequence_no: int, channel: List[int] | int, region_id: List[int] | int, space_read: List[int] | int)¶
Bases:
EIEIOCommandMessagePacket sent by the host computer to the SpiNNaker system in the context of the buffering output technique to signal that the host has completed reading data from the output buffer, and that such space can be considered free to use again.
- Parameters:
n_requests
sequence_no
channel
region_id
space_read
- channel(ack_id: int) int[source]¶
- Parameters:
ack_id
- Returns:
The channel value for this ack_id.
- Raises:
SpinnmanInvalidParameterTypeException – If the ack_id is invalid
- static from_bytestring(command_header: EIEIOCommandHeader, data: bytes, offset: int) HostDataRead[source]¶
Creates an EIEIOCommandMessage based on the supplied information.
- Parameters:
command_header
data
offset
- Returns:
The created EIEIOCommandMessage
- region_id(ack_id: int) int[source]¶
- Parameters:
ack_id
- Returns:
The region_id value for this ack_id.
- Raises:
SpinnmanInvalidParameterTypeException – If the ack_id is invalid
- space_read(ack_id: int) int[source]¶
- Parameters:
ack_id
- Returns:
The space_read value for this ack_id.
- Raises:
SpinnmanInvalidParameterTypeException – If the ack_id is invalid
- class spinnman.messages.eieio.command_messages.HostDataReadAck(sequence_no: int)¶
Bases:
EIEIOCommandMessagePacket sent by the host computer to the SpiNNaker system in the context of the buffering output technique to signal that the host has received a request to read data.
- Parameters:
sequence_no
- static from_bytestring(command_header: EIEIOCommandHeader, data: bytes, offset: int) HostDataReadAck[source]¶
Creates an EIEIOCommandMessage based on the supplied information.
- Parameters:
command_header
data
offset
- Returns:
The created EIEIOCommandMessage
- class spinnman.messages.eieio.command_messages.HostSendSequencedData(region_id: int, sequence_no: int, eieio_data_message: AbstractEIEIOMessage)¶
Bases:
EIEIOCommandMessagePacket sent from the host to the SpiNNaker system in the context of buffering input mechanism to identify packet which needs to be stored in memory for future use.
- Parameters:
region_id
sequence_no
eieio_data_message
- property eieio_data_message: AbstractEIEIOMessage¶
The eieio_data_message passed into the init.
- static from_bytestring(command_header: EIEIOCommandHeader, data: bytes, offset: int) HostSendSequencedData[source]¶
Creates an EIEIOCommandMessage based on the supplied information.
- Parameters:
command_header
data
offset
- Returns:
The created EIEIOCommandMessage
- class spinnman.messages.eieio.command_messages.NotificationProtocolDatabaseLocation(database_path: str | None = None)¶
Bases:
EIEIOCommandMessagePacket which contains the path to the database created by the toolchain which is to be used by any software which interfaces with SpiNNaker. Also the acknowledgement of that message.
This message is not sent to SpiNNaker boards but rather to an auxiliary tool (e.g., data visualiser).
- Parameters:
database_path – The location of the database. If
None, this is an acknowledgement, stating that the database has now been read.
- property database_path: str | None¶
Gets the database path passed into the init.
The path is encoded by the init and decode back to a str here.
- static from_bytestring(command_header: EIEIOCommandHeader, data: bytes, offset: int) NotificationProtocolDatabaseLocation[source]¶
Creates an EIEIOCommandMessage based on the supplied information.
- Parameters:
command_header
data
offset
- Returns:
The created EIEIOCommandMessage
- class spinnman.messages.eieio.command_messages.NotificationProtocolPauseStop¶
Bases:
EIEIOCommandMessagePacket which indicates that the toolchain has paused or stopped.
This message is not sent to SpiNNaker boards but rather to an auxiliary tool (e.g., data visualiser).
- Parameters:
eieio_command_header – The header of the message
data – Optional incoming data
offset – Offset into the data where valid data begins
- static from_bytestring(command_header: EIEIOCommandHeader, data: bytes, offset: int) NotificationProtocolPauseStop[source]¶
Creates an EIEIOCommandMessage based on the supplied information.
- Parameters:
command_header
data
offset
- Returns:
The created EIEIOCommandMessage
- class spinnman.messages.eieio.command_messages.NotificationProtocolStartResume¶
Bases:
EIEIOCommandMessagePacket which indicates that the toolchain has started or resumed.
This message is not sent to SpiNNaker boards but rather to an auxiliary tool (e.g., data visualiser).
- Parameters:
eieio_command_header – The header of the message
data – Optional incoming data
offset – Offset into the data where valid data begins
- static from_bytestring(command_header: EIEIOCommandHeader, data: bytes, offset: int) NotificationProtocolStartResume[source]¶
Creates an EIEIOCommandMessage based on the supplied information.
- Parameters:
command_header
data
offset
- Returns:
The created EIEIOCommandMessage
- class spinnman.messages.eieio.command_messages.PaddingRequest¶
Bases:
EIEIOCommandMessagePacket used to pad space in the buffering area, if needed.
- Parameters:
eieio_command_header – The header of the message
data – Optional incoming data
offset – Offset into the data where valid data begins
- class spinnman.messages.eieio.command_messages.SpinnakerRequestBuffers(x: int, y: int, p: int, region_id: int, sequence_no: int, space_available: int)¶
Bases:
EIEIOCommandMessageMessage used in the context of the buffering input mechanism which is sent by the SpiNNaker system to the host computer to ask for more data to inject during the simulation.
- Parameters:
x
y
p
region_id
sequence_no
space_available
- static from_bytestring(command_header: EIEIOCommandHeader, data: bytes, offset: int) SpinnakerRequestBuffers[source]¶
Creates an EIEIOCommandMessage based on the supplied information.
- Parameters:
command_header
data
offset
- Returns:
The created EIEIOCommandMessage
- class spinnman.messages.eieio.command_messages.SpinnakerRequestReadData(x: int, y: int, p: int, region_id: List[int] | int, sequence_no: int, n_requests: int, channel: List[int] | int, start_address: List[int] | int, space_to_be_read: List[int] | int)¶
Bases:
EIEIOCommandMessageMessage used in the context of the buffering output mechanism which is sent from the SpiNNaker system to the host computer to signal that some data is available to be read.
- Parameters:
x
y
p
region_id
sequence_no
n_requests
channel
start_address
space_to_be_read
- channel(request_id: int) int[source]¶
- Parameters:
request_id
- Returns:
The channel for this request_id.
- Raises:
IndexError – If the request_id is invalid
- static from_bytestring(command_header: EIEIOCommandHeader, data: bytes, offset: int) SpinnakerRequestReadData[source]¶
Creates an EIEIOCommandMessage based on the supplied information.
- Parameters:
command_header
data
offset
- Returns:
The created EIEIOCommandMessage
- region_id(request_id: int) int[source]¶
- Parameters:
request_id
- Returns:
The region_id for this request_id.
- Raises:
IndexError – If the request_id is invalid
- space_to_be_read(request_id: int) int[source]¶
- Parameters:
request_id
- Returns:
The space_to_be_read for this request_id.
- Raises:
IndexError – If the request_id is invalid
- start_address(request_id: int) int[source]¶
- Parameters:
request_id
- Returns:
The start_address value for this request_id.
- Raises:
IndexError – If the request_id is invalid
- class spinnman.messages.eieio.command_messages.StartRequests¶
Bases:
EIEIOCommandMessagePacket used in the context of buffering input for the host computer to signal to the SpiNNaker system that, if needed, it is possible to send more “SpinnakerRequestBuffers” packet.
- Parameters:
eieio_command_header – The header of the message
data – Optional incoming data
offset – Offset into the data where valid data begins
- class spinnman.messages.eieio.command_messages.StopRequests¶
Bases:
EIEIOCommandMessagePacket used in the context of buffering input for the host computer to signal to the SpiNNaker system that to stop sending “SpinnakerRequestBuffers” packet.
- Parameters:
eieio_command_header – The header of the message
data – Optional incoming data
offset – Offset into the data where valid data begins