X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fdata%2Fdecoderstack.h;h=ad2a17b6b593c79b0ddbeff9c70823fb5d508d3c;hb=82f50b10f8fd45a772f9ba40c4ef1f888ed6b8b1;hp=58dd887145c62cc6bb98dfa18d43c316112b649b;hpb=db62bbfda512aeddca5b9d7b5960e9cf24b8859c;p=pulseview.git diff --git a/pv/data/decoderstack.h b/pv/data/decoderstack.h index 58dd8871..ad2a17b6 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,7 +81,15 @@ public: int64_t samples_decoded() const; - const std::vector 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(); @@ -94,10 +105,14 @@ private: static void annotation_callback(srd_proto_data *pdata, void *decoder); +private slots: + void on_new_frame(); + signals: void new_decode_data(); private: + pv::SigSession &_session; /** * This mutex prevents more than one decode operation occuring @@ -111,7 +126,11 @@ private: mutable boost::mutex _mutex; int64_t _samples_decoded; - std::vector _annotations; + + std::map _rows; + + std::map, decode::Row> _class_rows; + QString _error_message; boost::thread _decode_thread;