2 * This file is part of the PulseView project.
4 * Copyright (C) 2020 Soeren Apel <soeren@apelpie.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 2 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 PULSEVIEW_PV_DATA_MATHSIGNAL_HPP
21 #define PULSEVIEW_PV_DATA_MATHSIGNAL_HPP
26 #include <pv/data/analog.hpp>
27 #include <pv/data/signalbase.hpp>
28 #include <pv/util.hpp>
30 using std::shared_ptr;
40 class MathSignal : public SignalBase
45 static const int64_t ChunkLength;
48 MathSignal(pv::Session &session);
49 virtual ~MathSignal();
51 virtual void save_settings(QSettings &settings) const;
52 virtual void restore_settings(QSettings &settings);
55 void samples_cleared();
57 void samples_added(uint64_t segment_id, uint64_t start_sample,
60 void min_max_changed(float min, float max);
63 // void on_data_cleared();
64 // void on_data_received();
66 // void on_samples_added(SharedPtrToSegment segment, uint64_t start_sample,
67 // uint64_t end_sample);
69 // void on_min_max_changed(float min, float max);
72 pv::Session &session_;
74 QString error_message_;
80 #endif // PULSEVIEW_PV_DATA_MATHSIGNAL_HPP