+ for (GSList *l = decoder_->channels; l; l = l->next) {
+ const srd_channel *const pdch = (const srd_channel*)l->data;
+ assert(pdch);
+ if (channels_.find(pdch) == channels_.end())
+ return false;
+ }
+
+ return true;
+}
+
+set< shared_ptr<pv::data::Logic> > Decoder::get_data()
+{
+ set< shared_ptr<pv::data::Logic> > data;
+ for (const auto& channel : channels_) {
+ shared_ptr<data::SignalBase> b(channel.second);
+ assert(b);
+ data.insert(b->logic_data());
+ }
+
+ return data;
+}
+
+srd_decoder_inst* Decoder::create_decoder_inst(srd_session *session) const
+{
+ GHashTable *const opt_hash = g_hash_table_new_full(g_str_hash,
+ g_str_equal, g_free, (GDestroyNotify)g_variant_unref);
+
+ for (const auto& option : options_) {
+ GVariant *const value = option.second;
+ g_variant_ref(value);
+ g_hash_table_replace(opt_hash, (void*)g_strdup(
+ option.first.c_str()), value);
+ }
+