Falcon
Toggle main menu visibility
Loading...
Searching...
No Matches
serialoutput.hpp
1
// ---------------------------------------------------------------------
2
// This file is part of falcon-core.
3
//
4
// Copyright (C) 2015, 2016, 2017 Neuro-Electronics Research Flanders
5
//
6
// Falcon-server is free software: you can redistribute it and/or modify
7
// it under the terms of the GNU General Public License as published by
8
// the Free Software Foundation, either version 3 of the License, or
9
// (at your option) any later version.
10
//
11
// Falcon-server is distributed in the hope that it will be useful,
12
// but WITHOUT ANY WARRANTY; without even the implied warranty of
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
// GNU General Public License for more details.
15
//
16
// You should have received a copy of the GNU General Public License
17
// along with falcon-core. If not, see <http://www.gnu.org/licenses/>.
18
// ---------------------------------------------------------------------
19
20
#pragma once
21
#include <fstream>
22
23
#include "eventdata/eventdata.hpp"
24
#include "iprocessor.hpp"
25
#include "options/options.hpp"
26
#include "options/units.hpp"
27
#include "
serialib/lib/serialib.h
"
28
29
class
SerialOutput :
public
IProcessor {
30
// CONSTRUCTOR and OVERLOADED METHODS
31
public
:
32
SerialOutput();
33
void
CreatePorts()
override
;
34
void
Preprocess(
ProcessingContext
& context)
override
;
35
void
Process(
ProcessingContext
& context)
override
;
36
void
Postprocess(
ProcessingContext
& context)
override
;
37
38
// DATA PORTS AND STATES
39
protected
:
40
PortIn<EventType>
* data_in_port_;
41
PortOut<EventType>
* data_out_port_;
42
43
// OPTIONS
44
protected
:
45
options::String port_address_{
"/dev/ttyACM0"
};
46
options::Int baudrate_{9600};
47
options::Bool event_log_{
true
};
48
49
// variables
50
protected
:
51
serialib
fd_;
52
};
PortIn
Definition
streamports.hpp:256
PortOut
Definition
streamports.hpp:98
ProcessingContext
Definition
runinfo.hpp:248
serialib
This class is used for communication over a serial device.
Definition
serialib.h:53
serialib.h
Header file of the class serialib. This class is used for communication over a serial device.
extensions
falcon-fklab-extensions
processors
serialoutput
serialoutput.hpp
Generated by
1.18.0