#include <boost/none_t.hpp>
#include <pv/data/decode/decoder.hpp>
-#include <pv/data/decoderstack.hpp>
+#include <pv/data/decodesignal.hpp>
#include <pv/prop/double.hpp>
#include <pv/prop/enum.hpp>
#include <pv/prop/int.hpp>
namespace binding {
Decoder::Decoder(
- shared_ptr<pv::data::DecoderStack> decoder_stack,
+ shared_ptr<pv::data::DecodeSignal> decode_signal,
shared_ptr<data::decode::Decoder> decoder) :
- decoder_stack_(decoder_stack),
+ decode_signal_(decode_signal),
decoder_(decoder)
{
assert(decoder_);
assert(decoder_);
decoder_->set_option(id, value.gobj());
- assert(decoder_stack_);
- decoder_stack_->begin_decode();
+ assert(decode_signal_);
+ decode_signal_->begin_decode();
}
} // namespace binding
namespace pv {
namespace data {
-class DecoderStack;
+class DecodeSignal;
namespace decode {
class Decoder;
}
class Decoder : public Binding
{
public:
- Decoder(shared_ptr<pv::data::DecoderStack> decoder_stack,
+ Decoder(shared_ptr<pv::data::DecodeSignal> decode_signal,
shared_ptr<pv::data::decode::Decoder> decoder);
private:
void setter(const char *id, Glib::VariantBase value);
private:
- shared_ptr<pv::data::DecoderStack> decoder_stack_;
+ shared_ptr<pv::data::DecodeSignal> decode_signal_;
shared_ptr<pv::data::decode::Decoder> decoder_;
};
return state;
}
+void DecodeSignal::begin_decode()
+{
+ decoder_stack_->begin_decode();
+}
+
QString DecodeSignal::error_message() const
{
return decoder_stack_->error_message();
#include <libsigrokdecode/libsigrokdecode.h>
#include <pv/data/signalbase.hpp>
+#include <pv/util.hpp>
using std::list;
using std::unordered_set;
void remove_decoder(int index);
bool toggle_decoder_visibility(int index);
+ void begin_decode();
QString error_message() const;
const list<data::DecodeChannel> get_channels() const;
.arg(ch.name, ch.desc, required_flag), hlayout);
}
- shared_ptr<pv::data::DecoderStack> decoder_stack = base_->decoder_stack();
-
// Add the options
shared_ptr<binding::Decoder> binding(
- new binding::Decoder(decoder_stack, dec));
+ new binding::Decoder(decode_signal_, dec));
binding->add_properties_to_form(decoder_form, true);
bindings_.push_back(binding);