Skip to content

Message

Msg

Msg(type: str, source: Input | None = None)

The data object generated by input port that is sent as an argument to its subscribed calls and can be sent with an output port

Parameters:

  • source (Input | None, default: None ) –

    Input port instance that generated the message

type

type: str = type

Message type description for filtering and representation

source

source: Input | None = source

Input port instance that generated the message

ctime

ctime: float

Message creation time in "Unix time" format

matches

matches(*conditions_args, **conditions_kwargs) -> bool

Checks if message's attributes match all provided attribute conditions:

  1. If condition is None or omitted, it matches anything.

  2. If condition equals attribute, it matches the attribute.

  3. If condition is a container and contains the attribute, it matches the attribute.

Use Not(condition) to invert condition matching.

Returns:

  • bool

    True if all attributes match, False if any does not match