Skip to content

Message

Msg

Msg(type: str)

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:

  • type (str) –

    Message distinctive type

type

type: str = type

Message type description for filtering and representation

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 (list, tuple, range, etc.) and contains the attribute, it matches the attribute.

Use Not(condition) to invert condition matching. Use Glob(pattern) or Regex(pattern) for string pattern matching.

Returns:

  • bool –

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