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

Declares stream_info, the LSL metadata descriptor that identifies and routes a stream on the network. More...

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

Go to the source code of this file.

Classes

class  LSLLIB::stream_info
 Value-type descriptor of a single LSL stream: semantic metadata plus transport endpoint, API-compatible with liblsl's stream_info. More...

Namespaces

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

Enumerations

enum class  LSLLIB::ChannelFormat : int {
  LSLLIB::Undefined = 0 , LSLLIB::Float32 = 1 , LSLLIB::Double64 = 2 , LSLLIB::String = 3 ,
  LSLLIB::Int32 = 4 , LSLLIB::Int16 = 5 , LSLLIB::Int8 = 6 , LSLLIB::Int64 = 7
}

Detailed Description

Declares stream_info, the LSL metadata descriptor that identifies and routes a stream on the network.

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_info is the handshake object of the Lab Streaming Layer protocol: every outlet announces itself with one, LSLLIB::resolve_streams returns a vector of them, and every inlet is constructed from one. It carries both the semantic description of the stream (name, content type, channel count, nominal sampling rate, per-channel data format, and a stable source_id used to recognise the same device across restarts) and the transport metadata (per-instance UUID, originating hostname, and the TCP host/port pair filled in by the discovery layer) needed to actually open a connection.

This header also defines the LSLLIB::ChannelFormat enum, whose integer values intentionally match the cf_* constants of the upstream liblsl C API so that wire payloads serialised by to_string remain interoperable with third-party LSL clients. The class is intentionally a plain value type (cheap to copy, default-constructible into an "invalid" state) so it can be passed around freely between the discovery, outlet and inlet components without imposing any ownership constraints on callers.

Definition in file lsl_stream_info.h.