libtcspc.Multiplex

final class libtcspc.Multiplex(*event_types)[source]

Bases: Node

Processor that wraps events of several types into a single variant type.

The listed event types are combined into a single VariantEvent carrying whichever event arrived. This is typically used to buffer a stream of more than one event type through a stage that handles only a single type; Demultiplex reverses the effect.

Parameters:

*event_types (EventType) – The event types to combine. The order is significant and is part of the resulting VariantEvent type.

Notes

Events handled:

  • Events in event_types: passed through wrapped in a VariantEvent spanning all of event_types.

  • End of input: pass through.

See also

tcspc::multiplex()

The underlying C++ factory function.

Demultiplex

Restore the individual event types.

VariantEvent

The emitted event type.