2 * This file is part of the SmuView project.
4 * Copyright (C) 2018-2021 Frank Stettner <frank-stettner@gmx.net>
6 * This program 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.
11 * This program 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.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef CHANNELS_INTEGRATECHANNEL_HPP
21 #define CHANNELS_INTEGRATECHANNEL_HPP
29 #include "src/channels/basechannel.hpp"
30 #include "src/channels/mathchannel.hpp"
31 #include "src/data/datautil.hpp"
34 using std::shared_ptr
;
40 class AnalogTimeSignal
;
49 class IntegrateChannel
: public MathChannel
55 data::Quantity quantity
,
56 const set
<data::QuantityFlag
> &quantity_flags
,
58 shared_ptr
<data::AnalogTimeSignal
> int_signal
,
59 shared_ptr
<devices::BaseDevice
> parent_device
,
60 const set
<string
> &channel_group_names
,
61 const string
&channel_name
,
62 double channel_start_timestamp
);
65 shared_ptr
<data::AnalogTimeSignal
> int_signal_
;
66 size_t next_int_signal_pos_
;
67 double last_timestamp_
;
71 void on_channel_start_timestamp_changed(double timestamp
);
72 void on_sample_appended();
76 } // namespace channels
79 #endif // CHANNELS_INTEGRATECHANNEL_HPP