X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fdata%2Fmathsignal.hpp;h=98adbe8099b57058ba1c1a3e4fa243e49b8b7439;hb=6daf265cd0e2a699a50ce434466881bd3b7f1d12;hp=e452215bd7e9240faec0d61a8e763a276e211c36;hpb=66b6f41becf52ed12e50d1fa7f56cf0c76379d61;p=pulseview.git diff --git a/pv/data/mathsignal.hpp b/pv/data/mathsignal.hpp index e452215b..98adbe80 100644 --- a/pv/data/mathsignal.hpp +++ b/pv/data/mathsignal.hpp @@ -20,6 +20,10 @@ #ifndef PULSEVIEW_PV_DATA_MATHSIGNAL_HPP #define PULSEVIEW_PV_DATA_MATHSIGNAL_HPP +#define exprtk_disable_rtl_io_file /* Potential security issue, doubt anyone would use those anyway */ +#define exprtk_disable_rtl_vecops /* Vector ops are rather useless for math channels */ +#define exprtk_disable_caseinsensitivity /* So that we can have both 't' and 'T' */ + #include #include @@ -43,7 +47,7 @@ namespace data { class SignalBase; template -struct sig_sample; +struct fnc_sample; struct signal_data { signal_data(const shared_ptr _sb) : @@ -91,7 +95,7 @@ private: void reset_generation(); virtual void begin_generation(); - void generate_samples(uint32_t segment_id, const uint64_t start_sample, + uint64_t generate_samples(uint32_t segment_id, const uint64_t start_sample, const int64_t sample_count); void generation_proc(); @@ -101,13 +105,6 @@ private: bool all_input_signals_enabled(QString &disabled_signals) const; Q_SIGNALS: - void samples_cleared(); - - void samples_added(uint64_t segment_id, uint64_t start_sample, - uint64_t end_sample); - - void min_max_changed(float min, float max); - void expression_changed(QString expression); private Q_SLOTS: @@ -122,6 +119,7 @@ private: uint64_t custom_sample_rate_; uint64_t custom_sample_count_; bool use_custom_sample_rate_, use_custom_sample_count_; + uint64_t generation_chunk_size_; map input_signals_; QString expression_; @@ -139,10 +137,10 @@ private: exprtk::parser *exprtk_parser_; double exprtk_current_time_, exprtk_current_sample_; - sig_sample* fnc_sig_sample_; + fnc_sample* fnc_sample_; // Give sig_sample access to the private helper functions - friend struct sig_sample; + friend struct fnc_sample; }; } // namespace data