v2.0.0
Loading...
Searching...
No Matches
lsl_stream_outlet.h File Reference

Declares stream_outlet, the server side of an LSL stream that publishes samples over TCP and advertises itself via UDP multicast. More...

#include "lsl_global.h"
#include "lsl_stream_info.h"
#include <vector>
#include <memory>
Include dependency graph for lsl_stream_outlet.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  LSLLIB::stream_outlet
 Server-side LSL endpoint: binds a TCP data server, advertises the stream on the LSL discovery multicast group, and fans samples out to every connected inlet. More...

Namespaces

namespace  LSLLIB
 Lab Streaming Layer (LSL) integration for real-time data exchange.

Detailed Description

Declares stream_outlet, the server side of an LSL stream that publishes samples over TCP and advertises itself via UDP multicast.

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors

Author
Christoph Dinh chris.nosp@m.toph.nosp@m..dinh.nosp@m.@mne.nosp@m.-cpp..nosp@m.org
Since
2.0.0
Date
March 2026

A LSLLIB::stream_outlet is the producer counterpart of LSLLIB::stream_inlet: instantiating it immediately binds a QTcpServer on an OS-assigned port (which is written back into the contained LSLLIB::stream_info so callers can read it via info), starts a background worker that periodically multicasts the stream's serialised metadata on the LSL discovery channel, and accepts incoming inlet connections so they can be fed from the outlet's internal sample queue.

The public API is the standard LSL push_sample / push_chunk pair plus have_consumers for back-pressure decisions in acquisition loops. As with the inlet, all Qt network and threading machinery is hidden behind a PIMPL so this header stays lightweight and the implementation is free to evolve (for example, to swap the broadcast scheme or add a peer-discovery cache) without rippling through every translation unit that produces LSL data in mne-cpp.

Definition in file lsl_stream_outlet.h.