Previous topic

spinnman.messages.eieio.data_messages.abstract_eieio_data_element module

Next topic

spinnman.messages.eieio.data_messages.eieio_data_message module

This Page

spinnman.messages.eieio.data_messages.eieio_data_header module

class spinnman.messages.eieio.data_messages.eieio_data_header.EIEIODataHeader(eieio_type, tag=0, prefix=None, prefix_type=<EIEIOPrefix.LOWER_HALF_WORD: 0>, payload_base=None, is_time=False, count=0)[source]

Bases: object

EIEIO header for data packets

Parameters:
  • eieio_type (spinnman.spinnman.messages.eieio.eieio_type.EIEIOType) – the type of message
  • tag (int) – the tag of the message (0 by default)
  • prefix (int or None) – the key prefix of the message or None if not prefixed
  • prefix_type (spinnman.messages.eieio.eieio_prefix.EIEIOPrefix) – the position of the prefix (upper or lower)
  • payload_base (int or None) – The base payload to be applied, or None if no base payload
  • is_time (bool) – True if the payloads should be taken to be timestamps, or False otherwise
  • count (int) – Count of the number of items in the packet

Attributes

count
eieio_type
is_time
payload_base
prefix
prefix_type
size
tag

Methods

get_header_size(eieio_type[, is_prefix, ...]) Get the size of a header with the given parameters
increment_count()
read_eieio_header(byte_reader) Read an eieio data header from a byte_reader
reset_count()
write_eieio_header(byte_writer) Writes the header to a writer

Detailed Methods

static get_header_size(eieio_type, is_prefix=False, is_payload_base=False)[source]

Get the size of a header with the given parameters

Parameters:
  • eieio_type (spinnman.spinnman.messages.eieio.eieio_type.EIEIOType) – the type of message
  • is_prefix (bool) – True if there is a prefix, False otherwise
  • is_payload_base (bool) – True if there is a payload base, False otherwise
Returns:

The size of the header in bytes

Return type:

int

increment_count()[source]
static read_eieio_header(byte_reader)[source]

Read an eieio data header from a byte_reader

Parameters:

byte_reader (spinnman.data.abstract_byte_reader.AbstractByteReader) – The reader to read the data from

Returns:

an eieio header

Return type:

spinnman.messages.eieio.data_messages.eieio_data_header.EIEIODataHeader

Raises:
reset_count()[source]
write_eieio_header(byte_writer)[source]

Writes the header to a writer

Parameters:byte_writer (spinnman.data.abstract_byte_writer.AbstractByteWriter) – The writer to write the header to