Implements stream_info construction, accessors and the wire serialisation used by LSL discovery datagrams. More...

Go to the source code of this file.
Implements stream_info construction, accessors and the wire serialisation used by LSL discovery datagrams.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors
The constructors populate the two transport-identity fields that cannot be supplied by the caller: a per-instance uid generated via QUuid::createUuid (the same UUID format used by liblsl) and the originating hostname obtained from QHostInfo. The data port and data host stay zero/empty until either the outlet binds a TCP server (and writes the bound port back in) or the discovery code observes the stream on the wire (and writes the sender address back in).
The to_string / from_string pair defines the on-wire representation broadcast over UDP multicast and stored by applications that want to remember a stream across runs. The format is a deliberately minimal, line-oriented key=value encoding rather than the XML used by upstream liblsl: it is trivial to parse without an external dependency, fits comfortably in a single UDP datagram, and round-trips every field exposed by the public accessors.
Definition in file lsl_stream_info.cpp.