projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Moved form generation into Binding
[pulseview.git]
/
pv
/
data
/
decoder.h
diff --git
a/pv/data/decoder.h
b/pv/data/decoder.h
index ddcf6674ba15c0d5bb59dc6abd37ae81a7683e33..4cae427ea95813e842be6aaa25fb93641ee0de1d 100644
(file)
--- a/
pv/data/decoder.h
+++ b/
pv/data/decoder.h
@@
-26,32
+26,74
@@
#include <map>
#include <boost/shared_ptr.hpp>
#include <map>
#include <boost/shared_ptr.hpp>
+#include <boost/thread.hpp>
+
+#include <QObject>
struct srd_decoder;
struct srd_decoder;
+struct srd_decoder_inst;
struct srd_probe;
namespace pv {
namespace view {
class Signal;
struct srd_probe;
namespace pv {
namespace view {
class Signal;
+
+namespace decode {
+class Annotation;
+}
+
}
namespace data {
}
namespace data {
-class Decoder : public SignalData
+class Logic;
+
+class Decoder : public QObject, public SignalData
{
{
+ Q_OBJECT
+
+private:
+ static const double DecodeMargin;
+ static const double DecodeThreshold;
+ static const int64_t DecodeChunkLength;
+
public:
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;
const srd_decoder* get_decoder() const;
+ const std::vector< boost::shared_ptr<pv::view::decode::Annotation> >
+ annotations() const;
+
void clear_snapshots();
void clear_snapshots();
+private:
+ void begin_decode();
+
+ void init_decoder();
+
+ void decode_proc(boost::shared_ptr<data::Logic> data);
+
+ static void annotation_callback(srd_proto_data *pdata,
+ void *decoder);
+
private:
const srd_decoder *const _decoder;
std::map<const srd_probe*, boost::shared_ptr<view::Signal> >
_probes;
private:
const srd_decoder *const _decoder;
std::map<const srd_probe*, boost::shared_ptr<view::Signal> >
_probes;
+
+ srd_decoder_inst *_decoder_inst;
+
+ mutable boost::mutex _annotations_mutex;
+ std::vector< boost::shared_ptr<pv::view::decode::Annotation> >
+ _annotations;
+
+ boost::thread _decode_thread;
};
} // namespace data
};
} // namespace data