v2.0.0
Loading...
Searching...
No Matches
src
libraries
lsl
stream_inlet.h
Go to the documentation of this file.
1
//=============================================================================================================
34
35
#ifndef LSL_STREAM_INLET_H
36
#define LSL_STREAM_INLET_H
37
38
//=============================================================================================================
39
// INCLUDES
40
//=============================================================================================================
41
42
#include "
lsl_global.h
"
43
#include "
stream_info.h
"
44
45
//=============================================================================================================
46
// STL INCLUDES
47
//=============================================================================================================
48
49
#include <vector>
50
#include <memory>
51
#include <type_traits>
52
53
//=============================================================================================================
54
// DEFINE NAMESPACE lsl
55
//=============================================================================================================
56
57
namespace
LSLLIB
{
58
59
//=============================================================================================================
60
// FORWARD DECLARATIONS
61
//=============================================================================================================
62
66
class
StreamInletPrivate
;
67
68
//=============================================================================================================
77
class
LSLSHARED_EXPORT
stream_inlet
78
{
79
public
:
80
//=========================================================================================================
86
explicit
stream_inlet
(
const
stream_info
& info);
87
88
//=========================================================================================================
92
~stream_inlet
();
93
94
//=========================================================================================================
100
void
open_stream
();
101
102
//=========================================================================================================
106
void
close_stream
();
107
108
//=========================================================================================================
116
bool
samples_available
();
117
118
//=========================================================================================================
128
template
<
typename
T>
129
std::vector<std::vector<T>>
pull_chunk
()
130
{
131
static_assert
(std::is_same<T, float>::value,
132
"lsl::stream_inlet::pull_chunk<T>: only float is supported"
);
133
return
pull_chunk_float
();
134
}
135
136
//=========================================================================================================
142
std::vector<std::vector<float>> pull_chunk_float();
143
144
private
:
146
std::unique_ptr<StreamInletPrivate> m_pImpl;
147
};
148
149
}
// namespace LSLLIB
150
151
#endif
// LSL_STREAM_INLET_H
stream_info.h
Contains the declaration of the stream_info class.
lsl_global.h
lsl library export/import macros.
LSLSHARED_EXPORT
#define LSLSHARED_EXPORT
Definition
lsl_global.h:55
LSLLIB
Lab Streaming Layer (LSL) integration for real-time data exchange.
LSLLIB::stream_info
Describes a particular stream on the network.
Definition
stream_info.h:82
LSLLIB::StreamInletPrivate
Definition
stream_inlet.cpp:71
LSLLIB::stream_inlet::stream_inlet
stream_inlet(const stream_info &info)
Definition
stream_inlet.cpp:252
LSLLIB::stream_inlet::samples_available
bool samples_available()
Definition
stream_inlet.cpp:280
LSLLIB::stream_inlet::open_stream
void open_stream()
Definition
stream_inlet.cpp:266
LSLLIB::stream_inlet::pull_chunk_float
std::vector< std::vector< float > > pull_chunk_float()
Definition
stream_inlet.cpp:287
LSLLIB::stream_inlet::pull_chunk
std::vector< std::vector< T > > pull_chunk()
Definition
stream_inlet.h:129
LSLLIB::stream_inlet::close_stream
void close_stream()
Definition
stream_inlet.cpp:273
Generated on
for MNE-CPP by
1.16.1