spinnman.messages.scp.abstract_messages package¶
Submodules¶
spinnman.messages.scp.abstract_messages.bmp_request module¶
-
class
spinnman.messages.scp.abstract_messages.bmp_request.
BMPRequest
(boards, scp_request_header, argument_1=None, argument_2=None, argument_3=None, data=None)[source]¶ Bases:
spinnman.messages.scp.abstract_messages.scp_request.AbstractSCPRequest
An SCP request intended to be sent to a BMP.
Parameters: - boards (int or iterable of int) – The board or boards to be addressed by this request
- scp_request_header – The SCP request header
- argument_1 – The optional first argument
- argument_2 – The optional second argument
- argument_3 – The optional third argument
- data – The optional data to be sent
spinnman.messages.scp.abstract_messages.bmp_response module¶
-
class
spinnman.messages.scp.abstract_messages.bmp_response.
BMPResponse
[source]¶ Bases:
spinnman.messages.scp.abstract_messages.scp_response.AbstractSCPResponse
Represents an SCP request thats tailored for the BMP connection.
spinnman.messages.scp.abstract_messages.scp_request module¶
-
class
spinnman.messages.scp.abstract_messages.scp_request.
AbstractSCPRequest
(sdp_header, scp_request_header, argument_1=None, argument_2=None, argument_3=None, data=None)[source]¶ Bases:
object
Represents an Abstract SCP Request
Parameters: - sdp_header (
spinnman.messages.sdp.sdp_header.SDPHeader
) – The SDP header of the request - scp_request_header (
spinnman.messages.scp.SCPRequestHeader
) – The SCP header of the request - argument_1 (int) – The first argument, or None if no first argument
- argument_2 (int) – The second argument, or None if no second argument
- argument_3 (int) – The third argument, or None if no third argument
- data (bytearray) – The optional data, or None if no data
Raises: None – No known exceptions are raised
-
DEFAULT_DEST_X_COORD
= 255¶
-
DEFAULT_DEST_Y_COORD
= 255¶
-
argument_1
¶ The first argument, or None if no first argument
Return type: int
-
argument_2
¶ The second argument, or None if no second argument
Return type: int
-
argument_3
¶ The third argument, or None if no third argument
Return type: int
-
bytestring
¶ The request as a bytestring
Returns: The request as a bytestring Return type: str
-
data
¶ The data, or None if no data
Return type: bytearray
-
get_scp_response
()[source]¶ Get an SCP response message to be used to process any response received
Returns: An SCP response, or None if no response is required Return type: spinnman.messages.scp_response.SCPResponse
Raises: None – No known exceptions are raised
-
scp_request_header
¶ The SCP request header of the message
Return type: spinnman.messages.scp.SCPRequestHeader
-
sdp_header
¶ The SDP header of the message
Return type: spinnman.message.sdp.sdp_header.SDPHeader
- sdp_header (
spinnman.messages.scp.abstract_messages.scp_response module¶
-
class
spinnman.messages.scp.abstract_messages.scp_response.
AbstractSCPResponse
[source]¶ Bases:
object
Represents an abstract SCP Response
-
read_bytestring
(data, offset)[source]¶ Reads a packet from a bytestring of data
Parameters: - data (str) – The bytestring to be read
- offset (int) – The offset in the data from which the response should be read
-
read_data_bytestring
(data, offset)[source]¶ Reads the remainder of the data following the header
Parameters: - data (str) – The bytestring to read from
- offset (int) – The offset into the data after the headers
-
scp_response_header
¶ The SCP header from the response
Returns: The SCP header Return type: spinnman.messages.scp.SCPResponseHeader
Raises: None – No known exceptions are raised
-
sdp_header
¶ The SDP header from the response
Returns: The SDP header Return type: spinnman.messages.sdp.sdp_header.SDPHeader
Raises: None – No known exceptions are raised
-
Module contents¶
-
class
spinnman.messages.scp.abstract_messages.
BMPRequest
(boards, scp_request_header, argument_1=None, argument_2=None, argument_3=None, data=None)[source]¶ Bases:
spinnman.messages.scp.abstract_messages.scp_request.AbstractSCPRequest
An SCP request intended to be sent to a BMP.
Parameters: - boards (int or iterable of int) – The board or boards to be addressed by this request
- scp_request_header – The SCP request header
- argument_1 – The optional first argument
- argument_2 – The optional second argument
- argument_3 – The optional third argument
- data – The optional data to be sent
-
class
spinnman.messages.scp.abstract_messages.
BMPResponse
[source]¶ Bases:
spinnman.messages.scp.abstract_messages.scp_response.AbstractSCPResponse
Represents an SCP request thats tailored for the BMP connection.
-
class
spinnman.messages.scp.abstract_messages.
AbstractSCPRequest
(sdp_header, scp_request_header, argument_1=None, argument_2=None, argument_3=None, data=None)[source]¶ Bases:
object
Represents an Abstract SCP Request
Parameters: - sdp_header (
spinnman.messages.sdp.sdp_header.SDPHeader
) – The SDP header of the request - scp_request_header (
spinnman.messages.scp.SCPRequestHeader
) – The SCP header of the request - argument_1 (int) – The first argument, or None if no first argument
- argument_2 (int) – The second argument, or None if no second argument
- argument_3 (int) – The third argument, or None if no third argument
- data (bytearray) – The optional data, or None if no data
Raises: None – No known exceptions are raised
-
DEFAULT_DEST_X_COORD
= 255¶
-
DEFAULT_DEST_Y_COORD
= 255¶
-
argument_1
¶ The first argument, or None if no first argument
Return type: int
-
argument_2
¶ The second argument, or None if no second argument
Return type: int
-
argument_3
¶ The third argument, or None if no third argument
Return type: int
-
bytestring
¶ The request as a bytestring
Returns: The request as a bytestring Return type: str
-
data
¶ The data, or None if no data
Return type: bytearray
-
get_scp_response
()[source]¶ Get an SCP response message to be used to process any response received
Returns: An SCP response, or None if no response is required Return type: spinnman.messages.scp_response.SCPResponse
Raises: None – No known exceptions are raised
-
scp_request_header
¶ The SCP request header of the message
Return type: spinnman.messages.scp.SCPRequestHeader
-
sdp_header
¶ The SDP header of the message
Return type: spinnman.message.sdp.sdp_header.SDPHeader
- sdp_header (
-
class
spinnman.messages.scp.abstract_messages.
AbstractSCPResponse
[source]¶ Bases:
object
Represents an abstract SCP Response
-
read_bytestring
(data, offset)[source]¶ Reads a packet from a bytestring of data
Parameters: - data (str) – The bytestring to be read
- offset (int) – The offset in the data from which the response should be read
-
read_data_bytestring
(data, offset)[source]¶ Reads the remainder of the data following the header
Parameters: - data (str) – The bytestring to read from
- offset (int) – The offset into the data after the headers
-
scp_response_header
¶ The SCP header from the response
Returns: The SCP header Return type: spinnman.messages.scp.SCPResponseHeader
Raises: None – No known exceptions are raised
-
sdp_header
¶ The SDP header from the response
Returns: The SDP header Return type: spinnman.messages.sdp.sdp_header.SDPHeader
Raises: None – No known exceptions are raised
-