spinnman.messages.scp package

Subpackages

Submodules

spinnman.messages.scp.scp_request_header module

class spinnman.messages.scp.scp_request_header.SCPRequestHeader(command, sequence=0)[source]

Bases: object

Represents the header of an SCP Request Each optional parameter in the constructor can be set to a value other than None once, after which it is immutable. It is an error to set a parameter that is not currently None.

Parameters:
  • command (spinnman.messages.scp.scp_command.SCPCommand) – The SCP command
  • sequence (int) – The number of the SCP packet in order of all packets sent or received, between 0 and 65535
Raises:

spinnman.exceptions.SpinnmanInvalidParameterException – If one of the parameters is incorrect

bytestring

The header as a bytestring

Returns:The header as a bytestring
Return type:str
command

The command of the SCP packet

Returns:The command
Return type:spinnman.messages.scp.scp_command.SCPCommand
sequence

The sequence number of the SCP packet

Returns:The sequence number of the packet, between 0 and 65535
Return type:int

spinnman.messages.scp.scp_response_header module

class spinnman.messages.scp.scp_response_header.SCPResponseHeader(result=None, sequence=None)[source]

Bases: object

Represents the header of an SCP Response

static from_bytestring(data, offset)[source]

Read a header from a bytestring

Parameters:
  • data (str) – The bytestring to read from
  • offset
result

The result of the SCP response

Returns:The result
Return type:spinnman.messages.scp.scp_result.SCPResult
sequence

The sequence number of the SCP response

Returns:The sequence number of the packet, between 0 and 65535
Return type:int

Module contents