]> sigrok.org Git - pulseview.git/blobdiff - pv/data/mathsignal.hpp
Fix #1637 by auto-assigning only to unused signals
[pulseview.git] / pv / data / mathsignal.hpp
index e452215bd7e9240faec0d61a8e763a276e211c36..e40dbfb3cf61125643d945b2b760846f4069efee 100644 (file)
 #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 <limits>
 
 #include <QString>
@@ -43,7 +47,7 @@ namespace data {
 class SignalBase;
 
 template<typename T>
-struct sig_sample;
+struct fnc_sample;
 
 struct signal_data {
        signal_data(const shared_ptr<SignalBase> _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();
 
@@ -122,6 +126,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<std::string, signal_data> input_signals_;
 
        QString expression_;
@@ -139,10 +144,10 @@ private:
        exprtk::parser<double> *exprtk_parser_;
        double exprtk_current_time_, exprtk_current_sample_;
 
-       sig_sample<double>* fnc_sig_sample_;
+       fnc_sample<double>* fnc_sample_;
 
        // Give sig_sample access to the private helper functions
-       friend struct sig_sample<double>;
+       friend struct fnc_sample<double>;
 };
 
 } // namespace data