projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Moved all srd commands into decode thread, implemented error messages
[pulseview.git]
/
pv
/
data
/
decoder.h
diff --git
a/pv/data/decoder.h
b/pv/data/decoder.h
index 264920a723422c9bf51f5e1fb6947e9f5e03f759..09002ac911153ed06901af6ab1ba3e0927b1f4c7 100644
(file)
--- a/
pv/data/decoder.h
+++ b/
pv/data/decoder.h
@@
-29,19
+29,22
@@
#include <boost/thread.hpp>
#include <QObject>
#include <boost/thread.hpp>
#include <QObject>
+#include <QString>
#include <glib.h>
struct srd_decoder;
#include <glib.h>
struct srd_decoder;
-struct srd_decoder_inst;
struct srd_probe;
struct srd_proto_data;
struct srd_probe;
struct srd_proto_data;
-struct srd_session;
+
+namespace DecoderTest {
+class TwoDecoder;
+}
namespace pv {
namespace view {
namespace pv {
namespace view {
-class Signal;
+class
Logic
Signal;
namespace decode {
class Annotation;
namespace decode {
class Annotation;
@@
-65,7
+68,7
@@
private:
public:
Decoder(const srd_decoder *const decoder,
std::map<const srd_probe*,
public:
Decoder(const srd_decoder *const decoder,
std::map<const srd_probe*,
- boost::shared_ptr<pv::view::Signal> > probes,
+ boost::shared_ptr<pv::view::
Logic
Signal> > probes,
GHashTable *options);
virtual ~Decoder();
GHashTable *options);
virtual ~Decoder();
@@
-75,12
+78,14
@@
public:
const std::vector< boost::shared_ptr<pv::view::decode::Annotation> >
annotations() const;
const std::vector< boost::shared_ptr<pv::view::decode::Annotation> >
annotations() const;
+ QString error_message();
+
void clear_snapshots();
private:
void begin_decode();
void clear_snapshots();
private:
void begin_decode();
-
bool
init_decoder();
+
void
init_decoder();
void decode_proc(boost::shared_ptr<data::Logic> data);
void decode_proc(boost::shared_ptr<data::Logic> data);
@@
-92,18
+97,18
@@
signals:
private:
const srd_decoder *const _decoder;
private:
const srd_decoder *const _decoder;
- std::map<const srd_probe*, boost::shared_ptr<view::Signal> >
+ std::map<const srd_probe*, boost::shared_ptr<view::
Logic
Signal> >
_probes;
GHashTable *_options;
_probes;
GHashTable *_options;
- srd_session *_session;
- srd_decoder_inst *_decoder_inst;
-
- mutable boost::mutex _annotations_mutex;
+ mutable boost::mutex _mutex;
std::vector< boost::shared_ptr<pv::view::decode::Annotation> >
_annotations;
std::vector< boost::shared_ptr<pv::view::decode::Annotation> >
_annotations;
+ QString _error_message;
boost::thread _decode_thread;
boost::thread _decode_thread;
+
+ friend class DecoderTest::TwoDecoder;
};
} // namespace data
};
} // namespace data