pv/data/logicsnapshot.cpp
pv/data/signaldata.cpp
pv/data/snapshot.cpp
+ pv/data/decode/decoder.cpp
pv/dialogs/about.cpp
pv/dialogs/connect.cpp
pv/popups/deviceoptions.cpp
--- /dev/null
+/*
+ * This file is part of the PulseView project.
+ *
+ * Copyright (C) 2013 Joel Holdsworth <joel@airwebreathe.org.uk>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <libsigrokdecode/libsigrokdecode.h>
+
+#include "decoder.h"
+
+#include <pv/view/logicsignal.h>
+
+using namespace boost;
+using namespace std;
+
+namespace pv {
+namespace data {
+namespace decode {
+
+Decoder::Decoder(const srd_decoder *const dec) :
+ _decoder(dec),
+ _options(g_hash_table_new_full(g_str_hash,
+ g_str_equal, g_free, (GDestroyNotify)g_variant_unref))
+{
+}
+
+Decoder::~Decoder()
+{
+ g_hash_table_destroy(_options);
+}
+
+const srd_decoder* Decoder::decoder() const
+{
+ return _decoder;
+}
+
+const map<const srd_probe*, shared_ptr<view::LogicSignal> >&
+Decoder::probes() const
+{
+ return _probes;
+}
+
+void Decoder::set_probes(std::map<const srd_probe*,
+ boost::shared_ptr<view::LogicSignal> > probes)
+{
+ _probes = probes;
+}
+
+const GHashTable* Decoder::options() const
+{
+ return _options;
+}
+
+void Decoder::set_option(const char *id, GVariant *value)
+{
+ g_variant_ref(value);
+ g_hash_table_replace(_options, (void*)g_strdup(id), value);
+}
+
+srd_decoder_inst* Decoder::create_decoder_inst(
+ srd_session *const session) const
+{
+ // Create the decoder instance
+ srd_decoder_inst *const decoder_inst = srd_inst_new(
+ session, _decoder->id, _options);
+ if(!decoder_inst)
+ return NULL;
+
+ // Setup the probes
+ GHashTable *const probes = g_hash_table_new_full(g_str_hash,
+ g_str_equal, g_free, (GDestroyNotify)g_variant_unref);
+
+ for(map<const srd_probe*, shared_ptr<view::LogicSignal> >::
+ const_iterator i = _probes.begin();
+ i != _probes.end(); i++)
+ {
+ shared_ptr<view::LogicSignal> signal((*i).second);
+ GVariant *const gvar = g_variant_new_int32(
+ signal->probe()->index);
+ g_variant_ref_sink(gvar);
+ g_hash_table_insert(probes, (*i).first->id, gvar);
+ }
+
+ srd_inst_probe_set_all(decoder_inst, probes);
+
+ return decoder_inst;
+}
+
+} // decode
+} // data
+} // pv
--- /dev/null
+/*
+ * This file is part of the PulseView project.
+ *
+ * Copyright (C) 2013 Joel Holdsworth <joel@airwebreathe.org.uk>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef PULSEVIEW_PV_DATA_DECODE_DECODER_H
+#define PULSEVIEW_PV_DATA_DECODE_DECODER_H
+
+#include <map>
+
+#include <boost/shared_ptr.hpp>
+
+#include <glib.h>
+
+struct srd_decoder;
+struct srd_decoder_inst;
+struct srd_probe;
+struct srd_session;
+
+namespace pv {
+
+namespace view {
+class LogicSignal;
+}
+
+namespace data {
+namespace decode {
+
+class Decoder
+{
+public:
+ Decoder(const srd_decoder *const decoder);
+
+ virtual ~Decoder();
+
+ const srd_decoder* decoder() const;
+
+ const std::map<const srd_probe*,
+ boost::shared_ptr<view::LogicSignal> >& probes() const;
+ void set_probes(std::map<const srd_probe*,
+ boost::shared_ptr<view::LogicSignal> > probes);
+
+ const GHashTable* options() const;
+
+ void set_option(const char *id, GVariant *value);
+
+ srd_decoder_inst* create_decoder_inst(
+ srd_session *const session) const;
+
+private:
+ const srd_decoder *const _decoder;
+ std::map<const srd_probe*, boost::shared_ptr<pv::view::LogicSignal> >
+ _probes;
+ GHashTable *_options;
+};
+
+} // namespace decode
+} // namespace data
+} // namespace pv
+
+#endif // PULSEVIEW_PV_DATA_DECODE_DECODER_H
#include <libsigrokdecode/libsigrokdecode.h>
+#include <boost/foreach.hpp>
#include <boost/thread/thread.hpp>
#include <stdexcept>
#include <pv/data/logic.h>
#include <pv/data/logicsnapshot.h>
+#include <pv/data/decode/decoder.h>
#include <pv/view/logicsignal.h>
#include <pv/view/decode/annotation.h>
mutex DecoderStack::_global_decode_mutex;
-DecoderStack::DecoderStack(const srd_decoder *const dec) :
- _decoder(dec),
- _options(g_hash_table_new_full(g_str_hash,
- g_str_equal, g_free, (GDestroyNotify)g_variant_unref))
+DecoderStack::DecoderStack(const srd_decoder *const dec)
{
+ _stack.push_back(shared_ptr<decode::Decoder>(
+ new decode::Decoder(dec)));
}
DecoderStack::~DecoderStack()
{
_decode_thread.interrupt();
_decode_thread.join();
-
- g_hash_table_destroy(_options);
-}
-
-const srd_decoder* DecoderStack::decoder() const
-{
- return _decoder;
-}
-
-const map<const srd_probe*, shared_ptr<view::LogicSignal> >&
-DecoderStack::probes() const
-{
- return _probes;
-}
-
-void DecoderStack::set_probes(std::map<const srd_probe*,
- boost::shared_ptr<view::LogicSignal> > probes)
-{
- _probes = probes;
- begin_decode();
}
-const GHashTable* DecoderStack::options() const
+const std::list< boost::shared_ptr<decode::Decoder> >&
+DecoderStack::stack() const
{
- return _options;
+ return _stack;
}
-void DecoderStack::set_option(const char *id, GVariant *value)
+void DecoderStack::push(boost::shared_ptr<decode::Decoder> decoder)
{
- g_variant_ref(value);
- g_hash_table_replace(_options, (void*)g_strdup(id), value);
- begin_decode();
+ assert(decoder);
+ _stack.push_back(decoder);
}
const vector< shared_ptr<view::decode::Annotation> >
void DecoderStack::begin_decode()
{
+ shared_ptr<pv::view::LogicSignal> logic_signal;
+ shared_ptr<pv::data::Logic> data;
+
_decode_thread.interrupt();
_decode_thread.join();
_annotations.clear();
- if (_probes.empty())
- return;
-
- // Get the samplerate and start time
- shared_ptr<pv::view::LogicSignal> logic_signal =
- dynamic_pointer_cast<pv::view::LogicSignal>(
- (*_probes.begin()).second);
- if (logic_signal) {
- shared_ptr<pv::data::Logic> data(
- logic_signal->data());
- if (data) {
- _start_time = data->get_start_time();
- _samplerate = data->get_samplerate();
- if (_samplerate == 0.0)
- _samplerate = 1.0;
- }
- }
-
// We get the logic data of the first probe in the list.
// This works because we are currently assuming all
// LogicSignals have the same data/snapshot
- shared_ptr<pv::view::LogicSignal> sig = (*_probes.begin()).second;
- assert(sig);
- shared_ptr<data::Logic> data = sig->data();
+ BOOST_FOREACH (const shared_ptr<decode::Decoder> &dec, _stack)
+ if (dec && !dec->probes().empty() &&
+ ((logic_signal = (*dec->probes().begin()).second)) &&
+ ((data = logic_signal->data())))
+ break;
+
+ if (!data)
+ return;
+
+ // Get the samplerate and start time
+ _start_time = data->get_start_time();
+ _samplerate = data->get_samplerate();
+ if (_samplerate == 0.0)
+ _samplerate = 1.0;
_decode_thread = boost::thread(&DecoderStack::decode_proc, this,
data);
{
srd_session *session;
uint8_t chunk[DecodeChunkLength];
+ srd_decoder_inst *prev_di = NULL;
assert(data);
srd_session_new(&session);
assert(session);
- srd_session_metadata_set(session, SRD_CONF_SAMPLERATE,
- g_variant_new_uint64((uint64_t)_samplerate));
- srd_pd_output_callback_add(session, SRD_OUTPUT_ANN,
- DecoderStack::annotation_callback, this);
+ // Create the decoders
+ BOOST_FOREACH(const shared_ptr<decode::Decoder> &dec, _stack)
+ {
+ srd_decoder_inst *const di = dec->create_decoder_inst(session);
- // Create the decoder instance
- srd_decoder_inst *const decoder_inst = srd_inst_new(
- session, _decoder->id, _options);
- if(!decoder_inst) {
- _error_message = tr("Failed to initialise decoder");
- return;
- }
+ if (!di)
+ {
+ _error_message = tr("Failed to initialise decoder");
+ srd_session_destroy(session);
+ return;
+ }
- // Setup the probes
- GHashTable *const probes = g_hash_table_new_full(g_str_hash,
- g_str_equal, g_free, (GDestroyNotify)g_variant_unref);
+ if (prev_di)
+ srd_inst_stack (session, prev_di, di);
- for(map<const srd_probe*, shared_ptr<view::LogicSignal> >::
- const_iterator i = _probes.begin();
- i != _probes.end(); i++)
- {
- shared_ptr<view::Signal> signal((*i).second);
- GVariant *const gvar = g_variant_new_int32(
- signal->probe()->index);
- g_variant_ref_sink(gvar);
- g_hash_table_insert(probes, (*i).first->id, gvar);
+ prev_di = di;
}
- srd_inst_probe_set_all(decoder_inst, probes);
-
// Start the session
+ srd_session_metadata_set(session, SRD_CONF_SAMPLERATE,
+ g_variant_new_uint64((uint64_t)_samplerate));
+
+ srd_pd_output_callback_add(session, SRD_OUTPUT_ANN,
+ DecoderStack::annotation_callback, this);
+
srd_session_start(session);
for (int64_t i = 0;
#include "signaldata.h"
-#include <map>
+#include <list>
#include <boost/shared_ptr.hpp>
#include <boost/thread.hpp>
#include <QObject>
#include <QString>
-#include <glib.h>
-
struct srd_decoder;
struct srd_probe;
struct srd_proto_data;
namespace data {
+namespace decode {
+class Decoder;
+}
+
class Logic;
class DecoderStack : public QObject, public SignalData
virtual ~DecoderStack();
- const srd_decoder* decoder() const;
-
- const std::map<const srd_probe*, boost::shared_ptr<view::LogicSignal> >&
- probes() const;
- void set_probes(std::map<const srd_probe*,
- boost::shared_ptr<view::LogicSignal> > probes);
-
- const GHashTable* options() const;
-
- void set_option(const char *id, GVariant *value);
+ const std::list< boost::shared_ptr<decode::Decoder> >& stack() const;
+ void push(boost::shared_ptr<decode::Decoder> decoder);
const std::vector< boost::shared_ptr<pv::view::decode::Annotation> >
annotations() const;
void clear_snapshots();
-private:
void begin_decode();
+private:
void decode_proc(boost::shared_ptr<data::Logic> data);
static void annotation_callback(srd_proto_data *pdata,
*/
static boost::mutex _global_decode_mutex;
- const srd_decoder *const _decoder;
- std::map<const srd_probe*, boost::shared_ptr<view::LogicSignal> >
- _probes;
- GHashTable *_options;
+ std::list< boost::shared_ptr<decode::Decoder> > _stack;
mutable boost::mutex _mutex;
std::vector< boost::shared_ptr<pv::view::decode::Annotation> >
#include "decoderoptions.h"
+#include <boost/bind.hpp>
#include <boost/foreach.hpp>
#include <boost/none_t.hpp>
#include <pv/data/decoderstack.h>
+#include <pv/data/decode/decoder.h>
#include <pv/prop/int.h>
#include <pv/prop/string.h>
namespace prop {
namespace binding {
-DecoderOptions::DecoderOptions(shared_ptr<pv::data::DecoderStack> decoder) :
+DecoderOptions::DecoderOptions(
+ shared_ptr<pv::data::DecoderStack> decoder_stack,
+ shared_ptr<data::decode::Decoder> decoder) :
+ _decoder_stack(decoder_stack),
_decoder(decoder)
{
assert(_decoder);
{
assert(_decoder);
_decoder->set_option(id, value);
+
+ assert(_decoder_stack);
+ _decoder_stack->begin_decode();
}
} // binding
namespace data {
class DecoderStack;
+namespace decode {
+class Decoder;
+}
}
namespace prop {
class DecoderOptions : public Binding
{
public:
- DecoderOptions(boost::shared_ptr<pv::data::DecoderStack> decoder);
+ DecoderOptions(boost::shared_ptr<pv::data::DecoderStack> decoder_stack,
+ boost::shared_ptr<pv::data::decode::Decoder> decoder);
private:
GVariant* getter(const char *id);
void setter(const char *id, GVariant *value);
private:
- boost::shared_ptr<pv::data::DecoderStack> _decoder;
+ boost::shared_ptr<pv::data::DecoderStack> _decoder_stack;
+ boost::shared_ptr<pv::data::decode::Decoder> _decoder;
};
} // binding
#include "data/decoderstack.h"
#include "data/logic.h"
#include "data/logicsnapshot.h"
+#include "data/decode/decoder.h"
#include "view/analogsignal.h"
#include "view/decodetrace.h"
bool SigSession::add_decoder(srd_decoder *const dec)
{
map<const srd_probe*, shared_ptr<view::LogicSignal> > probes;
+ shared_ptr<data::DecoderStack> decoder_stack;
try
{
lock_guard<mutex> lock(_signals_mutex);
// Create the decoder
- shared_ptr<data::DecoderStack> decoder(new data::DecoderStack(dec));
+ decoder_stack = shared_ptr<data::DecoderStack>(
+ new data::DecoderStack(dec));
// Auto select the initial probes
for(const GSList *i = dec->probes; i; i = i->next)
}
}
- decoder->set_probes(probes);
+ assert(decoder_stack);
+ assert(!decoder_stack->stack().empty());
+ assert(decoder_stack->stack().front());
+ decoder_stack->stack().front()->set_probes(probes);
// Create the decode signal
shared_ptr<view::DecodeTrace> d(
- new view::DecodeTrace(*this, decoder,
+ new view::DecodeTrace(*this, decoder_stack,
_decode_traces.size()));
_decode_traces.push_back(d);
}
signals_changed();
+ // Do an initial decode
+ decoder_stack->begin_decode();
+
return true;
}
#include <pv/sigsession.h>
#include <pv/data/decoderstack.h>
+#include <pv/data/decode/decoder.h>
#include <pv/view/logicsignal.h>
#include <pv/view/view.h>
#include <pv/view/decode/annotation.h>
DecodeTrace::DecodeTrace(pv::SigSession &session,
boost::shared_ptr<pv::data::DecoderStack> decoder_stack, int index) :
- Trace(session, QString(decoder_stack->decoder()->name)),
- _decoder_stack(decoder_stack),
- _binding(decoder_stack)
+ Trace(session, QString(decoder_stack->stack().front()->decoder()->name)),
+ _decoder_stack(decoder_stack)
{
assert(_decoder_stack);
void DecodeTrace::populate_popup_form(QWidget *parent, QFormLayout *form)
{
- const GSList *probe;
-
assert(form);
assert(parent);
assert(_decoder_stack);
- const srd_decoder *const decoder = _decoder_stack->decoder();
-
- assert(decoder);
-
+ // Add the standard options
Trace::populate_popup_form(parent, form);
- form->addRow(new QLabel(tr("<h3>Probes</h3>"), parent));
-
- _probe_selector_map.clear();
-
- // Add the mandatory probes
- for(probe = decoder->probes; probe; probe = probe->next) {
- const struct srd_probe *const p =
- (struct srd_probe *)probe->data;
- QComboBox *const combo = create_probe_selector(parent, p);
- connect(combo, SIGNAL(currentIndexChanged(int)),
- this, SLOT(on_probe_selected(int)));
- form->addRow(tr("<b>%1</b> (%2) *")
- .arg(p->name).arg(p->desc), combo);
-
- _probe_selector_map[p] = combo;
- }
-
- // Add the optional probes
- for(probe = decoder->opt_probes; probe; probe = probe->next) {
- const struct srd_probe *const p =
- (struct srd_probe *)probe->data;
- QComboBox *const combo = create_probe_selector(parent, p);
- connect(combo, SIGNAL(currentIndexChanged(int)),
- this, SLOT(on_probe_selected(int)));
- form->addRow(tr("<b>%1</b> (%2)")
- .arg(p->name).arg(p->desc), combo);
+ // Add the decoder options
+ _bindings.clear();
+ _probe_selectors.clear();
- _probe_selector_map[p] = combo;
- }
+ BOOST_FOREACH(shared_ptr<data::decode::Decoder> dec,
+ _decoder_stack->stack())
+ create_decoder_form(dec, parent, form);
form->addRow(new QLabel(
tr("<i>* Required Probes</i>"), parent));
- // Add the options
- if (!_binding.properties().empty()) {
- form->addRow(new QLabel(tr("<h3>Options</h3>"),
- parent));
- _binding.add_properties_to_form(form, true);
- }
-
// Add stacking button
- QPushButton *const stack_button =
- new QPushButton(tr("Stack DecoderStack"), parent);
pv::widgets::DecoderMenu *const decoder_menu =
new pv::widgets::DecoderMenu(parent);
+ connect(decoder_menu, SIGNAL(decoder_selected(srd_decoder*)),
+ this, SLOT(on_stack_decoder(srd_decoder*)));
+
+ QPushButton *const stack_button =
+ new QPushButton(tr("Stack Decoder"), parent);
stack_button->setMenu(decoder_menu);
QHBoxLayout *stack_button_box = new QHBoxLayout;
p.drawText(text_rect, message);
}
+void DecodeTrace::create_decoder_form(shared_ptr<data::decode::Decoder> &dec,
+ QWidget *parent, QFormLayout *form)
+{
+ const GSList *probe;
+
+ assert(dec);
+ const srd_decoder *const decoder = dec->decoder();
+ assert(decoder);
+
+ form->addRow(new QLabel(tr("<h3>%1</h3>").arg(decoder->name), parent));
+
+ // Add the mandatory probes
+ for(probe = decoder->probes; probe; probe = probe->next) {
+ const struct srd_probe *const p =
+ (struct srd_probe *)probe->data;
+ QComboBox *const combo = create_probe_selector(parent, dec, p);
+ connect(combo, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(on_probe_selected(int)));
+ form->addRow(tr("<b>%1</b> (%2) *")
+ .arg(p->name).arg(p->desc), combo);
+
+ const ProbeSelector s = {combo, dec, p};
+ _probe_selectors.push_back(s);
+ }
+
+ // Add the optional probes
+ for(probe = decoder->opt_probes; probe; probe = probe->next) {
+ const struct srd_probe *const p =
+ (struct srd_probe *)probe->data;
+ QComboBox *const combo = create_probe_selector(parent, dec, p);
+ connect(combo, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(on_probe_selected(int)));
+ form->addRow(tr("<b>%1</b> (%2)")
+ .arg(p->name).arg(p->desc), combo);
+
+ const ProbeSelector s = {combo, dec, p};
+ _probe_selectors.push_back(s);
+ }
+
+ // Add the options
+ shared_ptr<prop::binding::DecoderOptions> binding(
+ new prop::binding::DecoderOptions(_decoder_stack, dec));
+ binding->add_properties_to_form(form, true);
+
+ _bindings.push_back(binding);
+}
+
QComboBox* DecodeTrace::create_probe_selector(
- QWidget *parent, const srd_probe *const probe)
+ QWidget *parent, const shared_ptr<data::decode::Decoder> &dec,
+ const srd_probe *const probe)
{
+ assert(dec);
+
const vector< shared_ptr<Signal> > sigs = _session.get_signals();
assert(_decoder_stack);
const map<const srd_probe*,
shared_ptr<LogicSignal> >::const_iterator probe_iter =
- _decoder_stack->probes().find(probe);
+ dec->probes().find(probe);
QComboBox *selector = new QComboBox(parent);
selector->addItem("-", qVariantFromValue((void*)NULL));
- if (probe_iter == _decoder_stack->probes().end())
+ if (probe_iter == dec->probes().end())
selector->setCurrentIndex(0);
for(size_t i = 0; i < sigs.size(); i++) {
return selector;
}
-void DecodeTrace::commit_probes()
+void DecodeTrace::commit_decoder_probes(shared_ptr<data::decode::Decoder> &dec)
{
- assert(_decoder_stack);
+ assert(dec);
map<const srd_probe*, shared_ptr<LogicSignal> > probe_map;
const vector< shared_ptr<Signal> > sigs = _session.get_signals();
- for(map<const srd_probe*, QComboBox*>::const_iterator i =
- _probe_selector_map.begin();
- i != _probe_selector_map.end(); i++)
+ BOOST_FOREACH(const ProbeSelector &s, _probe_selectors)
{
- const QComboBox *const combo = (*i).second;
+ if(s._decoder != dec)
+ break;
+
const LogicSignal *const selection =
- (LogicSignal*)combo->itemData(combo->currentIndex()).
- value<void*>();
+ (LogicSignal*)s._combo->itemData(
+ s._combo->currentIndex()).value<void*>();
- BOOST_FOREACH(shared_ptr<Signal> s, sigs)
- if(s.get() == selection) {
- probe_map[(*i).first] =
- dynamic_pointer_cast<LogicSignal>(s);
+ BOOST_FOREACH(shared_ptr<Signal> sig, sigs)
+ if(sig.get() == selection) {
+ probe_map[s._probe] =
+ dynamic_pointer_cast<LogicSignal>(sig);
break;
}
}
- _decoder_stack->set_probes(probe_map);
+ dec->set_probes(probe_map);
+}
+
+void DecodeTrace::commit_probes()
+{
+ assert(_decoder_stack);
+ BOOST_FOREACH(shared_ptr<data::decode::Decoder> dec,
+ _decoder_stack->stack())
+ commit_decoder_probes(dec);
+
+ _decoder_stack->begin_decode();
}
void DecodeTrace::on_new_decode_data()
commit_probes();
}
+void DecodeTrace::on_stack_decoder(srd_decoder *decoder)
+{
+ assert(decoder);
+ assert(_decoder_stack);
+ _decoder_stack->push(shared_ptr<data::decode::Decoder>(
+ new data::decode::Decoder(decoder)));
+ _decoder_stack->begin_decode();
+}
+
} // namespace view
} // namespace pv
#include "trace.h"
+#include <list>
#include <map>
#include <boost/shared_ptr.hpp>
namespace data {
class DecoderStack;
+
+namespace decode {
+class Decoder;
+}
}
namespace view {
{
Q_OBJECT
+private:
+ struct ProbeSelector
+ {
+ const QComboBox *_combo;
+ const boost::shared_ptr<pv::data::decode::Decoder> _decoder;
+ const srd_probe *_probe;
+ };
+
private:
static const QColor DecodeColours[4];
static const QColor ErrorBgColour;
void draw_error(QPainter &p, const QString &message,
int left, int right);
- QComboBox* create_probe_selector(
- QWidget *parent, const srd_probe *const probe);
+ void create_decoder_form(
+ boost::shared_ptr<pv::data::decode::Decoder> &dec,
+ QWidget *parent, QFormLayout *form);
+
+ QComboBox* create_probe_selector(QWidget *parent,
+ const boost::shared_ptr<pv::data::decode::Decoder> &dec,
+ const srd_probe *const probe);
+
+ void commit_decoder_probes(
+ boost::shared_ptr<data::decode::Decoder> &dec);
void commit_probes();
void on_probe_selected(int);
+ void on_stack_decoder(srd_decoder *decoder);
+
private:
boost::shared_ptr<pv::data::DecoderStack> _decoder_stack;
uint64_t _decode_start, _decode_end;
- pv::prop::binding::DecoderOptions _binding;
+ std::list< boost::shared_ptr<pv::prop::binding::DecoderOptions> >
+ _bindings;
- std::map<const srd_probe*, QComboBox*> _probe_selector_map;
+ std::list<ProbeSelector> _probe_selectors;
};
} // namespace view
${PROJECT_SOURCE_DIR}/pv/data/logicsnapshot.cpp
${PROJECT_SOURCE_DIR}/pv/data/snapshot.cpp
${PROJECT_SOURCE_DIR}/pv/data/signaldata.cpp
+ ${PROJECT_SOURCE_DIR}/pv/data/decode/decoder.cpp
${PROJECT_SOURCE_DIR}/pv/prop/int.cpp
${PROJECT_SOURCE_DIR}/pv/prop/property.cpp
${PROJECT_SOURCE_DIR}/pv/prop/string.cpp