LSL Sender
- class gpype.backend.sinks.lsl_sender.LSLSender[source]
Bases:
SinkLab Streaming Layer (LSL) sender for real-time data streaming.
Streams multi-channel data to the Lab Streaming Layer network, configuring the LSL stream from its input port’s context.
Where the input names its channels, or gives any of them a role other than signal, each channel’s type, label and physical unit are written to the stream’s channel description (desc/channels/channel, the XDF convention). A channel that was never named gets no label; a unit is empty rather than omitted where the channel’s own unit is not recorded.
- DEFAULT_STREAM_NAME = 'gpype_lsl'
Default LSL stream name for g.Pype data streams
- __init__(stream_name=None, edge_id=None, **kwargs)[source]
Initialize the LSL sender with specified stream name.
- Parameters:
stream_name (
Optional[str]) – Name for the LSL stream. If None, uses the default stream name. Used for stream identification on the LSL network.edge_id (
Optional[str]) – Which edge runs this node, matched against the edge process’s –edge-id. None, the default, is every edge; ignored when the pipeline is not distributed.**kwargs – Additional arguments passed to parent INode class.
- stop()[source]
Stop the LSL sender and clean up resources.
Properly releases LSL resources by setting outlet and info objects to None, allowing them to be garbage collected.
- setup(data, port_context_in)[source]
Setup the LSL stream based on input port context.
Creates LSL StreamInfo and StreamOutlet objects using metadata from the input port context. Stream is configured with appropriate parameters for EEG data transmission.
- Parameters:
- Return type:
- Returns:
Dictionary returned from parent setup method.
- attach_timeline(timeline)[source]
Bind this sink to the pipeline’s master timeline.
- Parameters:
timeline – Timeline manager owned by the pipeline.
- Return type: