_session.get_signals();
dialogs::Decoder dlg(this, dec, sigs);
- dlg.exec();
+ if(dlg.exec() != QDialog::Accepted)
+ return;
+
+ _session.add_decoder(dec);
}
void MainWindow::run_stop()
#include "data/analogsnapshot.h"
#include "data/logic.h"
#include "data/logicsnapshot.h"
+
#include "view/analogsignal.h"
+#include "view/decodesignal.h"
#include "view/logicsignal.h"
#include <assert.h>
return _logic_data;
}
+void SigSession::add_decoder(srd_decoder *const dec)
+{
+ {
+ shared_ptr<view::DecodeSignal> d(new view::DecodeSignal(*this, dec));
+ _decode_traces.push_back(d);
+ }
+ signals_changed();
+}
+
void SigSession::set_capture_state(capture_state state)
{
lock_guard<mutex> lock(_sampling_mutex);
unsigned int logic_probe_count = 0;
unsigned int analog_probe_count = 0;
+ // Clear the decode traces
+ _decode_traces.clear();
+
// Detect what data types we will receive
if(sdi) {
for (const GSList *l = sdi->probes; l; l = l->next) {
#include <libsigrok/libsigrok.h>
+struct srd_decoder;
+
namespace pv {
class DeviceManager;
}
namespace view {
+class DecodeSignal;
class Signal;
}
boost::shared_ptr<data::Logic> get_data();
+ void add_decoder(srd_decoder *const dec);
+
private:
void set_capture_state(capture_state state);
*/
struct sr_dev_inst *_sdi;
+ std::vector< boost::shared_ptr<view::DecodeSignal> > _decode_traces;
+
mutable boost::mutex _sampling_mutex;
capture_state _capture_state;