X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fdata%2Fdecoderstack.h;h=6391e6a88ceb0b2d4c57e41f85591401446bf531;hb=bdc5c3b09d09781aa50ae3b128b2a7c6e2a53d5b;hp=4de7ae4c24ab85cdfd9e93e52c465f8d3ed6d105;hpb=5dfeb70fc60f1c4752697d8ad6f80e1415213197;p=pulseview.git diff --git a/pv/data/decoderstack.h b/pv/data/decoderstack.h index 4de7ae4c..6391e6a8 100644 --- a/pv/data/decoderstack.h +++ b/pv/data/decoderstack.h @@ -31,7 +31,11 @@ #include #include +#include +#include + struct srd_decoder; +struct srd_decoder_annotation_row; struct srd_probe; struct srd_proto_data; @@ -41,18 +45,16 @@ class TwoDecoderStack; namespace pv { +class SigSession; + namespace view { class LogicSignal; - -namespace decode { -class Annotation; -} - } namespace data { namespace decode { +class Annotation; class Decoder; } @@ -68,7 +70,8 @@ private: static const int64_t DecodeChunkLength; public: - DecoderStack(const srd_decoder *const decoder); + DecoderStack(pv::SigSession &_session, + const srd_decoder *const decoder); virtual ~DecoderStack(); @@ -78,12 +81,21 @@ public: int64_t samples_decoded() const; - const std::vector< boost::shared_ptr > - annotations() const; + std::vector get_visible_rows() const; + + /** + * Extracts sorted annotations between two period into a vector. + */ + void get_annotation_subset( + std::vector &dest, + const decode::Row &row, uint64_t start_sample, + uint64_t end_sample) const; QString error_message(); - void clear_snapshots(); + void clear(); + + uint64_t get_max_sample_count() const; void begin_decode(); @@ -97,6 +109,7 @@ signals: void new_decode_data(); private: + pv::SigSession &_session; /** * This mutex prevents more than one decode operation occuring @@ -110,8 +123,11 @@ private: mutable boost::mutex _mutex; int64_t _samples_decoded; - std::vector< boost::shared_ptr > - _annotations; + + std::map _rows; + + std::map, decode::Row> _class_rows; + QString _error_message; boost::thread _decode_thread;