]> sigrok.org Git - pulseview.git/blobdiff - pv/data/decoder.h
Added empty decoder thread
[pulseview.git] / pv / data / decoder.h
index ddcf6674ba15c0d5bb59dc6abd37ae81a7683e33..dcf12fe1d4b5d2b8c6696442682bc9f5217ea2e6 100644 (file)
 #include <map>
 
 #include <boost/shared_ptr.hpp>
+#include <boost/thread.hpp>
 
 struct srd_decoder;
+struct srd_decoder_inst;
 struct srd_probe;
 
 namespace pv {
@@ -38,20 +40,36 @@ class Signal;
 
 namespace data {
 
+class Logic;
+
 class Decoder : public SignalData
 {
 public:
-       Decoder(const srd_decoder *const dec, std::map<const srd_probe*,
-               boost::shared_ptr<pv::view::Signal> > probes);
+       Decoder(const srd_decoder *const decoder,
+               std::map<const srd_probe*,
+                       boost::shared_ptr<pv::view::Signal> > probes);
+
+       virtual ~Decoder();
 
        const srd_decoder* get_decoder() const;
 
+       void begin_decode();
+
        void clear_snapshots();
 
+private:
+       void init_decoder();
+
+       void decode_proc(boost::shared_ptr<data::Logic> data);
+
 private:
        const srd_decoder *const _decoder;
        std::map<const srd_probe*, boost::shared_ptr<view::Signal> >
                _probes;
+
+       srd_decoder_inst *_decoder_inst;
+
+       boost::thread _decode_thread;
 };
 
 } // namespace data