X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fdata%2Flogic.hpp;h=b5e532c45e9a0523d13991f39fb8c653d498eca3;hb=1c552f400ee967f7a489853578c4d8d4bd2edfbf;hp=d11e0cca67677b5a833ef66fb9390ed4237a406e;hpb=9009d9b5ca2e2039725040060c0fec19e7bc3caa;p=pulseview.git diff --git a/pv/data/logic.hpp b/pv/data/logic.hpp index d11e0cca..b5e532c4 100644 --- a/pv/data/logic.hpp +++ b/pv/data/logic.hpp @@ -21,6 +21,7 @@ #define PULSEVIEW_PV_DATA_LOGIC_HPP #include "signaldata.hpp" +#include "segment.hpp" #include @@ -47,6 +48,7 @@ public: void push_segment(shared_ptr &segment); const deque< shared_ptr >& logic_segments() const; + deque< shared_ptr >& logic_segments(); vector< shared_ptr > segments() const; @@ -54,18 +56,23 @@ public: void clear(); + void set_samplerate(double value); + + double get_samplerate() const; + uint64_t max_sample_count() const; - void notify_samples_added(QObject* segment, uint64_t start_sample, + void notify_samples_added(shared_ptr segment, uint64_t start_sample, uint64_t end_sample); Q_SIGNALS: void samples_cleared(); - void samples_added(QObject* segment, uint64_t start_sample, + void samples_added(SharedPtrToSegment segment, uint64_t start_sample, uint64_t end_sample); private: + double samplerate_; const unsigned int num_channels_; deque< shared_ptr > segments_; };