ezmsg.lsl.outlet#
Functions
- generate_source_id(name, stream_type, channel_count, nominal_srate, channel_format)[source]#
Generate a stable source_id hash from stream metadata.
- populate_desc_from_axisarray(info, message, *, out_size)[source]#
Populate the
descof info from message’s metadata.Stamps two kinds of metadata onto the StreamInfo description: all stream-level
message.attrsas top-level desc XML elements, and per-channel labels / structured-array fields from a"ch"CoordinateAxis.
Classes
- class LSLOutletSettings(stream_name: str | None = None, stream_type: str | None = None, use_message_timestamp: bool = True, assume_lsl_clock: bool = False)[source]#
Bases:
Settings- Parameters:
- use_message_timestamp: bool = True#
Whether to push the data with the incoming timestamps (True, default) or to ignore the incoming timestamps and push the data with the current pylsl.local_clock (False). When True, the incoming data must have a “time” dimension.
- assume_lsl_clock: bool = False#
When use_message_timestamp is True, this indicates whether the incoming timestamps were already in the lsl clock (see
LslInletSettings). If False, the incoming timestamps are assumed to be in the system time.time clock and are converted to the lsl clock. Note: Ignored when use_message_timestamp is False.
- class LSLOutletUnit(*args, settings=None, **kwargs)[source]#
Bases:
BaseConsumerUnit[LSLOutletSettings,AxisArray,OutletProcessor]Represents a node in a graph that subscribes to messages and forwards them by writing to an LSL outlet.
- Parameters:
stream_name – The name of the created LSL outlet.
stream_type – The type of the created LSL outlet.
settings (Settings | None)
- SETTINGS#
alias of
LSLOutletSettings
- async shutdown()[source]#
Runs when the Unit terminates.
This is called from within the same process this unit will live in. This lifecycle hook can be overridden. It can be run as async functions by simply adding the async keyword when overriding.
This method is where you should clean up resources and perform any necessary shutdown procedures.
- Return type:
None
- class OutletProcessor(*args, **kwargs)[source]#
Bases:
BaseStatefulConsumer[LSLOutletSettings,AxisArray,LSLOutletProcessorState]
- generate_source_id(name, stream_type, channel_count, nominal_srate, channel_format)[source]#
Generate a stable source_id hash from stream metadata.
- populate_desc_from_axisarray(info, message, *, out_size)[source]#
Populate the
descof info from message’s metadata.Stamps two kinds of metadata onto the StreamInfo description: all stream-level
message.attrsas top-level desc XML elements, and per-channel labels / structured-array fields from a"ch"CoordinateAxis.
- class LSLOutletSettings(stream_name: str | None = None, stream_type: str | None = None, use_message_timestamp: bool = True, assume_lsl_clock: bool = False)[source]#
Bases:
Settings- Parameters:
- use_message_timestamp: bool = True#
Whether to push the data with the incoming timestamps (True, default) or to ignore the incoming timestamps and push the data with the current pylsl.local_clock (False). When True, the incoming data must have a “time” dimension.
- assume_lsl_clock: bool = False#
When use_message_timestamp is True, this indicates whether the incoming timestamps were already in the lsl clock (see
LslInletSettings). If False, the incoming timestamps are assumed to be in the system time.time clock and are converted to the lsl clock. Note: Ignored when use_message_timestamp is False.
- class OutletProcessor(*args, **kwargs)[source]#
Bases:
BaseStatefulConsumer[LSLOutletSettings,AxisArray,LSLOutletProcessorState]
- class LSLOutletUnit(*args, settings=None, **kwargs)[source]#
Bases:
BaseConsumerUnit[LSLOutletSettings,AxisArray,OutletProcessor]Represents a node in a graph that subscribes to messages and forwards them by writing to an LSL outlet.
- Parameters:
stream_name – The name of the created LSL outlet.
stream_type – The type of the created LSL outlet.
settings (Settings | None)
- SETTINGS#
alias of
LSLOutletSettings
- async shutdown()[source]#
Runs when the Unit terminates.
This is called from within the same process this unit will live in. This lifecycle hook can be overridden. It can be run as async functions by simply adding the async keyword when overriding.
This method is where you should clean up resources and perform any necessary shutdown procedures.
- Return type:
None