@@ -64,86 +64,8 @@ typedef unsigned int uint32_t;
6464extern "C" {
6565#endif
6666
67-
68-
69- /* =========================== */
70- /* ==== Defined constants ==== */
71- /* =========================== */
72-
73- /**
74- * Constant to indicate that a stream has variable sampling rate.
75- */
76- #define LSL_IRREGULAR_RATE 0.0
77-
78- /**
79- * Constant to indicate that a sample has the next successive time stamp.
80- * This is an optional optimization to transmit less data per sample.
81- * The stamp is then deduced from the preceding one according to the stream's sampling rate
82- * (in the case of an irregular rate, the same time stamp as before will is assumed).
83- */
84- #define LSL_DEDUCED_TIMESTAMP -1.0
85-
86- /**
87- * A very large time value (ca. 1 year); can be used in timeouts.
88- */
89- #define LSL_FOREVER 32000000.0
90-
91- /**
92- * Constant to indicate that there is no preference about how a data stream shall be chunked for transmission.
93- * (can be used for the chunking parameters in the inlet or the outlet).
94- */
95- #define LSL_NO_PREFERENCE 0
96-
97- /**
98- * Data format of a channel (each transmitted sample holds an array of channels).
99- */
100- typedef enum {
101- cft_float32 = 1 , /* For up to 24-bit precision measurements in the appropriate physical unit */
102- /* (e.g., microvolts). Integers from -16777216 to 16777216 are represented accurately. */
103- cft_double64 = 2 , /* For universal numeric data as long as permitted by network & disk budget. */
104- /* The largest representable integer is 53-bit. */
105- cft_string = 3 , /* For variable-length ASCII strings or data blobs, such as video frames, */
106- /* complex event descriptions, etc. */
107- cft_int32 = 4 , /* For high-rate digitized formats that require 32-bit precision. Depends critically on */
108- /* meta-data to represent meaningful units. Useful for application event codes or other coded data. */
109- cft_int16 = 5 , /* For very high rate signals (40Khz+) or consumer-grade audio */
110- /* (for professional audio float is recommended). */
111- cft_int8 = 6 , /* For binary signals or other coded data. */
112- /* Not recommended for encoding string data. */
113- cft_int64 = 7 , /* For now only for future compatibility. Support for this type is not yet exposed in all languages. */
114- /* Also, some builds of liblsl will not be able to send or receive data of this type. */
115- cft_undefined = 0 /* Can not be transmitted. */
116- } lsl_channel_format_t ;
117-
118- /**
119- * Post-processing options for stream inlets.
120- */
121- typedef enum {
122- proc_none = 0 , /* No automatic post-processing; return the ground-truth time stamps for manual post-processing */
123- /* (this is the default behavior of the inlet). */
124- proc_clocksync = 1 , /* Perform automatic clock synchronization; equivalent to manually adding the time_correction() value */
125- /* to the received time stamps. */
126- proc_dejitter = 2 , /* Remove jitter from time stamps. This will apply a smoothing algorithm to the received time stamps; */
127- /* the smoothing needs to see a minimum number of samples (30-120 seconds worst-case) until the remaining */
128- /* jitter is consistently below 1ms. */
129- proc_monotonize = 4 , /* Force the time-stamps to be monotonically ascending (only makes sense if timestamps are dejittered). */
130- proc_threadsafe = 8 , /* Post-processing is thread-safe (same inlet can be read from by multiple threads); uses somewhat more CPU. */
131- proc_ALL = 1 |2 |4 |8 /* The combination of all possible post-processing options. */
132- } lsl_processing_options_t ;
133-
134- /**
135- * Possible error codes.
136- */
137- typedef enum {
138- lsl_no_error = 0 , /* No error occurred */
139- lsl_timeout_error = -1 , /* The operation failed due to a timeout. */
140- lsl_lost_error = -2 , /* The stream has been lost. */
141- lsl_argument_error = -3 , /* An argument was incorrectly specified (e.g., wrong format or wrong length). */
142- lsl_internal_error = -4 /* Some other internal error has happened. */
143- } lsl_error_code_t ;
144-
145-
146-
67+ // Defined constants
68+ #include "lsl_constants.h"
14769
14870/* ===================================================== */
14971/* ==== Objects provided by the lab streaming layer ==== */
0 commit comments