spinnman.messages.sdp package¶
Module contents¶
- class spinnman.messages.sdp.SDPFlag(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
Enum
SDPFlag for the message.
- REPLY_EXPECTED = 135¶
- REPLY_EXPECTED_NO_P2P = 167¶
- REPLY_NOT_EXPECTED = 7¶
- REPLY_NOT_EXPECTED_NO_P2P = 39¶
- class spinnman.messages.sdp.SDPHeader(flags: SDPFlag, tag: int | None = None, destination_port: int = 0, destination_cpu: int = 0, destination_chip_x: int = 0, destination_chip_y: int = 0, source_port: int | None = None, source_cpu: int | None = None, source_chip_x: int | None = None, source_chip_y: int | None = None)¶
Bases:
object
Represents the header of an SDP message. 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:
flags (SDPFlag) – Any flags for the packet
tag (int) – The IP tag of the packet between 0 and 255, or None if it is to be set later
destination_port (int) – The destination port of the packet between 0 and 7
destination_cpu (int) – The destination processor ID within the chip between 0 and 31
destination_chip_x (int) – The x-coordinate of the destination chip between 0 and 255
destination_chip_y (int) – The y-coordinate of the destination chip between 0 and 255
source_port (int) – The source port of the packet between 0 and 7, or None if it is to be set later
source_cpu (int) – The source processor ID within the chip between 0 and 31, or None if it is to be set later
source_chip_x (int) – The x-coordinate of the source chip between 0 and 255, or None if it is to be set later
source_chip_y (int) – The y-coordinate of the source chip between 0 and 255, or None if it is to be set later
- property destination_chip_x: int¶
The x-coordinate of the destination chip of the packet, between 0 and 255 (settable).
- Return type:
- property destination_chip_y: int¶
The y-coordinate of the destination chip of the packet, between 0 and 255 (settable).
- Return type:
- property destination_cpu: int¶
The core on the destination chip, between 0 and 31 (settable).
- Return type:
- property destination_port: int¶
The destination SDP port of the packet, between 0 and 7 (settable).
- Return type:
- static from_bytestring(data: bytes, offset: int) SDPHeader [source]¶
Read the header from a byte-string.
- get_physical_cpu_id() str [source]¶
A String describing the physical core of the destination.
- Return type:
- property source_chip_x: int¶
The x-coordinate of the source chip of the packet, between 0 and 255 (settable).
- Return type:
- property source_chip_y: int¶
The y-coordinate of the source chip of the packet, between 0 and 255 (settable).
- Return type: