pydistsim.message.Message

class Message(destination: T = None, header=None, data=None, **kwargs)[source]

Bases: Generic[T]

The Message class is used to represent messages in the simulation.

Parameters:
  • destination (T) – The destination of the message.

  • header (str) – The header of the message.

  • data (dict) – The data associated with the message.

  • source (T) – The source of the message.

  • meta_header (MetaHeader) – The meta header of the message.

  • meta_data (dict) – The meta data associated with the message. This is meant to be used by the simulation.

Methods

__init__

copy

Create a copy of the Message object.

Attributes

destination

header

data

source

meta_header

meta_data

next_message_id

META_HEADERS

alias of MetaHeader

copy()[source]

Create a copy of the Message object.