X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fdata%2Fdecodesignal.hpp;h=3adcbb93102c5b05b65b58340de491857fdefaf9;hb=85125b0f34be424fdf8a8a5133f2494722077d7d;hp=f8994adbeb87955c2fe3a675141d2e8cd7600c73;hpb=5a9146acd1a3ec81ff74e108f50d5b2885ff21a1;p=pulseview.git diff --git a/pv/data/decodesignal.hpp b/pv/data/decodesignal.hpp index f8994adb..3adcbb93 100644 --- a/pv/data/decodesignal.hpp +++ b/pv/data/decodesignal.hpp @@ -42,7 +42,6 @@ using std::condition_variable; using std::deque; using std::map; using std::mutex; -using std::pair; using std::vector; using std::shared_ptr; @@ -78,11 +77,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 @@ -119,7 +124,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; /** @@ -150,7 +155,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; /** @@ -158,7 +163,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, @@ -177,6 +182,8 @@ 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);