11#pragma once
22
3- /** @file common.h
4- * @brief Global constants for liblsl */
3+ /// @file common.h Global constants for liblsl
54
65#if defined(LIBLSL_FFI )
76// Skip any typedefs that might confuse a FFI header parser, e.g. cffi
@@ -36,7 +35,7 @@ typedef unsigned int uint32_t;
3635#define LIBLSL_C_API __attribute__((visibility("default")))
3736#endif
3837
39- //! Constant to indicate that a stream has variable sampling rate.
38+ /// Constant to indicate that a stream has variable sampling rate.
4039#define LSL_IRREGULAR_RATE 0.0
4140
4241/**
@@ -48,7 +47,7 @@ typedef unsigned int uint32_t;
4847 * before will is assumed). */
4948#define LSL_DEDUCED_TIMESTAMP -1.0
5049
51- //! A very large time value (ca. 1 year); can be used in timeouts.
50+ /// A very large time value (ca. 1 year); can be used in timeouts.
5251#define LSL_FOREVER 32000000.0
5352
5453/**
@@ -58,84 +57,78 @@ typedef unsigned int uint32_t;
5857 */
5958#define LSL_NO_PREFERENCE 0
6059
61- //! Data format of a channel (each transmitted sample holds an array of channels).
60+ /// Data format of a channel (each transmitted sample holds an array of channels).
6261typedef enum {
63- /*! For up to 24-bit precision measurements in the appropriate physical unit (e.g., microvolts).
62+ /** For up to 24-bit precision measurements in the appropriate physical unit (e.g., microvolts).
6463 * Integers from -16777216 to 16777216 are represented accurately. */
6564 cft_float32 = 1 ,
66-
67- /*! For universal numeric data as long as permitted by network & disk budget.
65+ /** For universal numeric data as long as permitted by network & disk budget.
6866 * The largest representable integer is 53-bit. */
6967 cft_double64 = 2 ,
70-
71- /*! For variable-length ASCII strings or data blobs, such as video frames, complex event
68+ /** For variable-length ASCII strings or data blobs, such as video frames, complex event
7269 descriptions, etc. */
7370 cft_string = 3 ,
74-
75- /*! For high-rate digitized formats that require 32-bit precision.
71+ /** For high-rate digitized formats that require 32-bit precision.
7672 * Depends critically on meta-data to represent meaningful units.
7773 * Useful for application event codes or other coded data. */
7874 cft_int32 = 4 ,
79-
80- /*! For very high rate signals (40Khz+) or consumer-grade audio.
75+ /** For very high rate signals (40Khz+) or consumer-grade audio.
8176 * For professional audio float is recommended. */
8277 cft_int16 = 5 ,
83-
84- /*! For binary signals or other coded data. Not recommended for encoding string data. */
78+ /// For binary signals or other coded data. Not recommended for encoding string data.
8579 cft_int8 = 6 ,
86-
87- /*! For now only for future compatibility. Support for this type is not yet
88- exposed in all languages. Also, some builds of liblsl will not be able
89- to send or receive data of this type.*/
80+ /** 64 bit integers. Support for this type is not yet exposed in all languages.
81+ * Also, some builds of liblsl will not be able to send or receive data of this type. */
9082 cft_int64 = 7 ,
91-
92- //! Can not be transmitted.
83+ /// Can not be transmitted.
9384 cft_undefined = 0
9485} lsl_channel_format_t ;
9586
96- //! Post-processing options for stream inlets.
87+ /// Post-processing options for stream inlets.
9788typedef enum {
98- /*! No automatic post-processing; return the ground-truth time stamps for manual
99- * post-processing. This is the default behavior of the inlet. */
89+ /** No automatic post-processing; return the ground-truth time stamps for manual
90+ post-processing. This is the default behavior of the inlet. */
10091 proc_none = 0 ,
10192
102- /*! Perform automatic clock synchronization;
103- * equivalent to manually adding the time_correction() value to the received time stamps. */
93+ /** Perform automatic clock synchronization; equivalent to manually adding the time_correction()
94+ value to the received time stamps. */
10495 proc_clocksync = 1 ,
10596
106- /*! Remove jitter from time stamps.<br>
107- * This will apply a smoothing algorithm to the received time stamps;
108- * the smoothing needs to see a minimum number of samples (30-120 seconds worst-case)
109- * until the remaining jitter is consistently below 1ms. */
97+ /** Remove jitter from time stamps.
98+ *
99+ * This will apply a smoothing algorithm to the received time stamps; the smoothing needs to see
100+ * a minimum number of samples (30-120 seconds worst-case) until the remaining jitter is
101+ * consistently below 1ms. */
110102 proc_dejitter = 2 ,
111103
112- /*! Force the time-stamps to be monotonically ascending.<br>
104+ /** Force the time-stamps to be monotonically ascending.
105+ *
113106 * Only makes sense if timestamps are dejittered. */
114107 proc_monotonize = 4 ,
115108
116- /*! Post-processing is thread-safe (same inlet can be read from by multiple threads);
109+ /** Post-processing is thread-safe (same inlet can be read from by multiple threads);
117110 * uses somewhat more CPU. */
118111 proc_threadsafe = 8 ,
119112
120- //! The combination of all possible post-processing options.
113+ /// The combination of all possible post-processing options.
121114 proc_ALL = 1 | 2 | 4 | 8
122115} lsl_processing_options_t ;
123116
124117/// Possible error codes.
125118typedef enum {
126- //! No error occurred
119+ /// No error occurred
127120 lsl_no_error = 0 ,
128121
129- //! The operation failed due to a timeout.
122+ /// The operation failed due to a timeout.
130123 lsl_timeout_error = -1 ,
131124
132- //! The stream has been lost.
125+ /// The stream has been lost.
133126 lsl_lost_error = -2 ,
134127
135- //! An argument was incorrectly specified (e.g., wrong format or wrong length).
128+ /// An argument was incorrectly specified (e.g., wrong format or wrong length).
136129 lsl_argument_error = -3 ,
137130
138- //! Some other internal error has happened.
131+ /// Some other internal error has happened.
139132 lsl_internal_error = -4
140133} lsl_error_code_t ;
141134
0 commit comments