spinnman.messages.scp package

Module contents

class spinnman.messages.scp.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 (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:

SpinnmanInvalidParameterException – If one of the parameters is incorrect

bytestring

The header as a bytestring.

Return type:bytes
command

The command of the SCP packet.

Return type:SCPCommand
sequence

The sequence number of the SCP packet, between 0 and 65535.

Return type:int
class spinnman.messages.scp.SCPResponseHeader(result=None, sequence=None)[source]

Bases: object

Represents the header of an SCP Response.

Parameters:
static from_bytestring(data, offset)[source]

Read a header from a bytestring.

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

The result of the SCP response.

Return type:SCPResult
sequence

The sequence number of the SCP response, between 0 and 65535.

Return type:int