Signal I/O Interface
signal_io.h
Go to the documentation of this file.
1 // //
3 // Copyright (c) 2016-2025 Leonardo Consoni <leonardojc@protonmail.com> //
4 // //
5 // This file is part of Signal I/O Interface. //
6 // //
7 // Signal I/O Interface is free software: you can redistribute it and/or modify //
8 // it under the terms of the GNU Lesser General Public License as published //
9 // by the Free Software Foundation, either version 3 of the License, or //
10 // (at your option) any later version. //
11 // //
12 // Signal I/O Interface is distributed in the hope that it will be useful, //
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
15 // GNU Lesser General Public License for more details. //
16 // //
17 // You should have received a copy of the GNU Lesser General Public License //
18 // along with Signal I/O Interface. If not, see <http://www.gnu.org/licenses/>. //
19 // //
21 
22 
27 
28 #ifndef SIGNAL_IO_H
29 #define SIGNAL_IO_H
30 
31 #include <math.h>
32 #ifndef M_PI
33 #define M_PI 3.14159
34 #endif
35 
36 #include "plugin_loader/loader_macros.h"
37 
38 #define SIGNAL_IO_DEVICE_INVALID_ID -1
39 
40 #define SIGNAL_IO_INTERFACE( Namespace, INIT_FUNCTION ) \
42  INIT_FUNCTION( long int, Namespace, InitDevice, const char* ) \
43  INIT_FUNCTION( void, Namespace, EndDevice, long int ) \
44  INIT_FUNCTION( void, Namespace, Reset, long int ) \
45  INIT_FUNCTION( bool, Namespace, HasError, long int ) \
46  INIT_FUNCTION( size_t, Namespace, GetMaxInputSamplesNumber, long int ) \
47  INIT_FUNCTION( size_t, Namespace, Read, long int, unsigned int, double* ) \
48  INIT_FUNCTION( bool, Namespace, CheckInputChannel, long int, unsigned int ) \
49  INIT_FUNCTION( bool, Namespace, Write, long int, unsigned int, double ) \
50  INIT_FUNCTION( bool, Namespace, AcquireOutputChannel, long int, unsigned int ) \
51  INIT_FUNCTION( void, Namespace, ReleaseOutputChannel, long int, unsigned int )
52 
53 
54 #endif // SIGNAL_IO_H
55