spinnman.messages.scp package

Subpackages

Module contents

class spinnman.messages.scp.SCPRequestHeader(command: SCPCommand | Enum, sequence: int = 0)

Bases: object

Represents the header of an SCP Request.

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

property bytestring: bytes

The header as a byte-string.

Return type:

bytes

property command: SCPCommand | Enum

The command of the SCP packet.

Return type:

SCPCommand

property sequence: int

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

Return type:

int

class spinnman.messages.scp.SCPResponseHeader(result, sequence)

Bases: object

Represents the header of an SCP Response.

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

Read a header from a byte-string.

Parameters:
  • data (bytes) – The byte-string to read from

  • offset (int)

property result: SCPResult

The result of the SCP response.

Return type:

SCPResult

property sequence: int

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

Return type:

int