X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fdata%2Fsignalbase.hpp;h=97dbd8477d58dea4537e117a25946338f48f64c3;hb=ad908057e13224eee9f983685e0ccc7db1ded0e9;hp=b29c6b56558d3dffb74cd22429d20a6b80efb7a9;hpb=12ea3616767553ee0a615f14bbcb8ec614589e34;p=pulseview.git diff --git a/pv/data/signalbase.hpp b/pv/data/signalbase.hpp index b29c6b5..97dbd84 100644 --- a/pv/data/signalbase.hpp +++ b/pv/data/signalbase.hpp @@ -148,11 +148,9 @@ public: void set_conversion_type(ConversionType t); #ifdef ENABLE_DECODE - bool is_decode_signal() const; + virtual bool is_decode_signal() const; - shared_ptr decoder_stack() const; - - void set_decoder_stack(shared_ptr decoder_stack); + virtual shared_ptr decoder_stack() const; #endif void save_settings(QSettings &settings) const; @@ -161,7 +159,8 @@ public: private: uint8_t convert_a2l_threshold(float threshold, float value); - uint8_t convert_a2l_schmitt_trigger(float lo_thr, float hi_thr, float value); + uint8_t convert_a2l_schmitt_trigger(float lo_thr, float hi_thr, + float value, uint8_t &state); void conversion_thread_proc(QObject* segment, uint64_t start_sample, uint64_t end_sample); @@ -175,6 +174,11 @@ Q_SIGNALS: void conversion_type_changed(const ConversionType t); + void samples_cleared(); + + void samples_added(QObject* segment, uint64_t start_sample, + uint64_t end_sample); + private Q_SLOTS: void on_samples_cleared(); @@ -183,17 +187,13 @@ private Q_SLOTS: void on_capture_state_changed(int state); -private: +protected: shared_ptr channel_; ChannelType channel_type_; shared_ptr data_; shared_ptr converted_data_; int conversion_type_; -#ifdef ENABLE_DECODE - shared_ptr decoder_stack_; -#endif - std::thread conversion_thread_; QString internal_name_, name_;