Skip to content

Commit a133ab3

Browse files
committed
Docs: reformat header files, fix doxygen errors
1 parent e5605f2 commit a133ab3

File tree

10 files changed

+1854
-1332
lines changed

10 files changed

+1854
-1332
lines changed

docs/Doxyfile_API

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,19 @@ OUTPUT_DIRECTORY = liblsl_api
88
FULL_PATH_NAMES = NO
99
DISTRIBUTE_GROUP_DOC = YES
1010
INLINE_SIMPLE_STRUCTS = YES
11-
EXTRACT_ALL = YES
11+
WARN_IF_UNDOCUMENTED = NO
1212
SHOW_NAMESPACES = NO
13-
INPUT = ../include
13+
INPUT = ../include ../include/lsl/
1414
JAVADOC_AUTOBRIEF = YES
15-
FILE_PATTERNS = *.c \
16-
*.cpp \
17-
*.h
15+
FILE_PATTERNS = *.h
1816
EXCLUDE_SYMBOLS = lslboost
1917
SOURCE_BROWSER = YES
2018
CLANG_ASSISTED_PARSING = NO
2119
CLANG_OPTIONS = -I../lslboost
2220
MACRO_EXPANSION = YES
2321
EXPAND_ONLY_PREDEF = YES
2422
ENABLE_PREPROCESSING = YES
25-
PREDEFINED = LIBLSL_C_API DOXYGEN_SHOULD_SKIP_THIS
23+
PREDEFINED = LIBLSL_C_API
2624
ALPHABETICAL_INDEX = NO
2725
HTML_DYNAMIC_SECTIONS = YES
2826
GENERATE_TREEVIEW = YES

include/lsl/common.h

Lines changed: 32 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
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).
6261
typedef 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.
9788
typedef 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.
125118
typedef 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

include/lsl/inlet.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#include "common.h"
33
#include "types.h"
44

5+
6+
/// @file inlet.h Stream inlet functions
7+
58
/** @defgroup lsl_inlet The lsl_inlet object
69
* @{
710
*/

include/lsl/outlet.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#include "./common.h"
33
#include "types.h"
44

5+
/// @file outlet.h Stream outlet functions
6+
57
/** @defgroup outlet The lsl_outlet object
68
*
79
* This object represents an outlet sending data to all connected inlets.

include/lsl/resolver.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#include "common.h"
33
#include "types.h"
44

5+
/// @file resolver.h Stream resolution functions
6+
57
/** @defgroup continuous_resolver The lsl_continuous_resolver
68
* @ingroup resolve
79
*

include/lsl/streaminfo.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#include "common.h"
33
#include "types.h"
44

5+
/// @file streaminfo.h Stream info functions
6+
57
/** @defgroup streaminfo The lsl_streaminfo object
68
*
79
* The #lsl_streaminfo object keeps a stream's meta data and connection settings.

include/lsl/types.h

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
#ifndef LSL_TYPES
22
#define LSL_TYPES
33

4-
/* ===================================================== */
5-
/* ==== Objects provided by the lab streaming layer ==== */
6-
/* ===================================================== */
7-
84
/**
9-
* Handle to a stream info object. Stores the declaration of a data stream.
5+
* @class lsl_streaminfo
6+
* Handle to a stream info object.
7+
*
8+
* Stores the declaration of a data stream.
109
* Represents the following information:
1110
*
1211
* - stream data format (number of channels, channel format)
@@ -22,18 +21,21 @@
2221
typedef struct lsl_streaminfo_struct_ *lsl_streaminfo;
2322

2423
/**
24+
* @class lsl_outlet
2525
* A stream outlet handle.
2626
* Outlets are used to make streaming data (and the meta-data) available on the lab network.
2727
*/
2828
typedef struct lsl_outlet_struct_ *lsl_outlet;
2929

3030
/**
31+
* @class lsl_inlet
3132
* A stream inlet handle.
3233
* Inlets are used to receive streaming data (and meta-data) from the lab network.
3334
*/
3435
typedef struct lsl_inlet_struct_ *lsl_inlet;
3536

3637
/**
38+
* @class lsl_xml_ptr
3739
* A lightweight XML element tree handle; models the description of a streaminfo object.
3840
* XML elements behave like advanced pointers into memory that is owned by some respective
3941
* streaminfo.
@@ -47,6 +49,8 @@ typedef struct lsl_inlet_struct_ *lsl_inlet;
4749
typedef struct lsl_xml_ptr_struct_ *lsl_xml_ptr;
4850

4951
/**
52+
* @class lsl_continuous_resolver
53+
*
5054
* Handle to a convenience object that resolves streams continuously in the background throughout
5155
* its lifetime and which can be queried at any time for the set of streams that are currently
5256
* visible on the network.

include/lsl/xml.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#include "common.h"
33
#include "types.h"
44

5+
/// @file inlet.h XML functions
6+
57
/** @defgroup xml_ptr The lsl_xml_ptr object
68
* @{
79
*/

0 commit comments

Comments
 (0)