MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / commit_decoder_probes

Method commit_decoder_probes

DSView/pv/dialogs/decoderoptionsdlg.cpp:492–521  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

490}
491
492void DecoderOptionsDlg::commit_decoder_probes(data::decode::Decoder *dec)
493{
494 assert(dec);
495
496 std::map<const srd_channel*, int> probe_map;
497 const auto &sigs = AppControl::Instance()->GetSession()->get_signals();
498
499 std::list<int> index_list;
500
501 for(auto &p : _probe_selectors)
502 {
503 if(p._decoder != dec)
504 break;
505
506 const int selection = p._combo->itemData(p._combo->currentIndex()).value<int>();
507
508 for(auto s : sigs){
509 if(s->get_index() == selection) {
510 probe_map[p._pdch] = selection;
511 index_list.push_back(selection);
512 break;
513 }
514 }
515 }
516
517 dec->set_probes(probe_map);
518
519 if (index_list.size())
520 _trace->set_index_list(index_list);
521}
522
523void DecoderOptionsDlg::on_accept()
524{

Callers

nothing calls this directly

Calls 5

GetSessionMethod · 0.80
set_probesMethod · 0.80
sizeMethod · 0.80
set_index_listMethod · 0.80
get_indexMethod · 0.45

Tested by

no test coverage detected