- shared_ptr<data::Decoder> decoder(
- new data::Decoder(dec, probes));
- shared_ptr<view::DecodeSignal> d(
- new view::DecodeSignal(*this, decoder));
+
+ // Create the decoder
+ 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)
+ {
+ const srd_probe *const probe = (const srd_probe*)i->data;
+ BOOST_FOREACH(shared_ptr<view::Signal> s, _signals)
+ {
+ shared_ptr<view::LogicSignal> l =
+ dynamic_pointer_cast<view::LogicSignal>(s);
+ if (l && QString(probe->name).toLower().contains(
+ l->get_name().toLower()))
+ probes[probe] = l;
+ }
+ }
+
+ 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_stack,
+ _decode_traces.size()));