X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fdata%2Fdecodesignal.hpp;h=c9ebb2a69c4d00adea4e099e0c4df8de5c6a7d87;hb=f6a93932056dab5e2f75207b65197b436d4141a5;hp=c59b20b816d6a29ce4dee4dd60891a5d9fa07f92;hpb=feda6c6bbde575242cf01c769c0ecd3e89f9f7a0;p=pulseview.git diff --git a/pv/data/decodesignal.hpp b/pv/data/decodesignal.hpp index c59b20b8..c9ebb2a6 100644 --- a/pv/data/decodesignal.hpp +++ b/pv/data/decodesignal.hpp @@ -27,7 +27,6 @@ #include #include -#include #include @@ -77,11 +76,17 @@ struct DecodeBinaryClass struct DecodeSegment { - map annotation_rows; + // Constructor is a no-op + DecodeSegment() { }; + // Copy constructor is a no-op + DecodeSegment(DecodeSegment&& ds) { (void)ds; }; + + map annotation_rows; // Note: Row is the same for all segments while RowData is not pv::util::Timestamp start_time; double samplerate; int64_t samples_decoded_incl, samples_decoded_excl; vector binary_classes; + deque all_annotations; }; class DecodeSignal : public SignalBase @@ -109,7 +114,6 @@ public: void pause_decode(); void resume_decode(); bool is_paused() const; - QString error_message() const; const vector get_channels() const; void auto_assign_signals(const shared_ptr dec); @@ -118,7 +122,7 @@ public: void set_initial_pin_state(const uint16_t channel_id, const int init_state); - double samplerate() const; + virtual double get_samplerate() const; const pv::util::Timestamp start_time() const; /** @@ -149,7 +153,7 @@ public: * Note: The annotations may be unsorted and only annotations that fully * fit into the sample range are considered. */ - void get_annotation_subset(vector &dest, const Row* row, + void get_annotation_subset(deque &dest, const Row* row, uint32_t segment_id, uint64_t start_sample, uint64_t end_sample) const; /** @@ -157,7 +161,7 @@ public: * Note: The annotations may be unsorted and only annotations that fully * fit into the sample range are considered. */ - void get_annotation_subset(vector &dest, uint32_t segment_id, + void get_annotation_subset(deque &dest, uint32_t segment_id, uint64_t start_sample, uint64_t end_sample) const; uint32_t get_binary_data_chunk_count(uint32_t segment_id, @@ -176,15 +180,16 @@ public: const DecodeBinaryClass* get_binary_data_class(uint32_t segment_id, const Decoder* dec, uint32_t bin_class_id) const; + const deque* get_all_annotations_by_segment(uint32_t segment_id) const; + virtual void save_settings(QSettings &settings) const; virtual void restore_settings(QSettings &settings); private: - void set_error_message(QString msg); - + bool all_input_segments_complete(uint32_t segment_id) const; uint32_t get_input_segment_count() const; - uint32_t get_input_samplerate(uint32_t segment_id) const; + double get_input_samplerate(uint32_t segment_id) const; Decoder* get_decoder_by_instance(const srd_decoder *const srd_dec); @@ -218,12 +223,15 @@ Q_SIGNALS: void decode_reset(); void decode_finished(); void channels_updated(); + void annotation_visibility_changed(); private Q_SLOTS: void on_capture_state_changed(int state); void on_data_cleared(); void on_data_received(); + void on_annotation_visibility_changed(); + private: pv::Session &session_; @@ -249,8 +257,6 @@ private: atomic decode_interrupt_, logic_mux_interrupt_; bool decode_paused_; - - QString error_message_; }; } // namespace data