X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdata%2Fdecoderstack.h;h=029ca25c21c91350c7709074aacd6c7a758ff88d;hp=844a2b547cef8f353007e09029b855024c2a4f44;hb=caabb84c559023f179bf2c4600a5ebce34eab081;hpb=6e89374a6796f8d5d9cc61b0a2f7e98562a034ae diff --git a/pv/data/decoderstack.h b/pv/data/decoderstack.h index 844a2b54..029ca25c 100644 --- a/pv/data/decoderstack.h +++ b/pv/data/decoderstack.h @@ -23,7 +23,7 @@ #include "signaldata.h" -#include +#include #include #include @@ -31,8 +31,6 @@ #include #include -#include - struct srd_decoder; struct srd_probe; struct srd_proto_data; @@ -54,6 +52,10 @@ class Annotation; namespace data { +namespace decode { +class Decoder; +} + class Logic; class DecoderStack : public QObject, public SignalData @@ -70,27 +72,22 @@ public: virtual ~DecoderStack(); - const srd_decoder* decoder() const; + const std::list< boost::shared_ptr >& stack() const; + void push(boost::shared_ptr decoder); + void remove(int index); - const std::map >& - probes() const; - void set_probes(std::map > probes); - - const GHashTable* options() const; - - void set_option(const char *id, GVariant *value); + int64_t samples_decoded() const; const std::vector< boost::shared_ptr > annotations() const; QString error_message(); - void clear_snapshots(); + void clear(); -private: void begin_decode(); +private: void decode_proc(boost::shared_ptr data); static void annotation_callback(srd_proto_data *pdata, @@ -109,12 +106,10 @@ private: */ static boost::mutex _global_decode_mutex; - const srd_decoder *const _decoder; - std::map > - _probes; - GHashTable *_options; + std::list< boost::shared_ptr > _stack; mutable boost::mutex _mutex; + int64_t _samples_decoded; std::vector< boost::shared_ptr > _annotations; QString _error_message;