MCPcopy Index your code
hub / github.com/DreamSourceLab/DSView / capture_init

Method capture_init

DSView/pv/sigsession.cpp:445–498  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443 }
444
445 void SigSession::capture_init()
446 {
447 // update instant setting
448 _device_agent.set_config_bool(SR_CONF_INSTANT, _is_instant);
449 _callback->update_capture();
450
451 set_cur_snap_samplerate(_device_agent.get_sample_rate());
452 set_cur_samplelimits(_device_agent.get_sample_limit());
453
454 _data_updated = false;
455 _trigger_flag = false;
456 _trigger_ch = 0;
457 _hw_replied = false;
458 _rt_refresh_time_id = 0;
459 _rt_ck_refresh_time_id = 0;
460 _noData_cnt = 0;
461
462 data_unlock();
463
464 // Init data container
465 _capture_data->clear();
466
467 int mode = _device_agent.get_work_mode();
468 if (mode == DSO)
469 {
470 for (auto m : _spectrum_traces){
471 m->get_spectrum_stack()->init();
472 }
473
474 if (_math_trace){
475 _math_trace->get_math_stack()->init();
476 }
477 }
478
479 // update current hw offset
480 for (auto s : _signals)
481 {
482 if (s->signal_type() == SR_CHANNEL_DSO){
483 auto sig = (view::DsoSignal*)s;
484 sig->set_zero_ratio(sig->get_zero_ratio());
485 sig->set_stop_scale(1);
486 }
487 else if (s->signal_type() == SR_CHANNEL_ANALOG){
488 auto sig = (view::AnalogSignal*)s;
489 sig->set_zero_ratio(sig->get_zero_ratio());
490 }
491 }
492
493 // Start timer
494 if (mode == DSO || mode == ANALOG)
495 _feed_timer.Start(FeedInterval);
496 else
497 _feed_timer.Stop();
498 }
499
500 bool SigSession::start_capture(bool instant)
501 {

Callers

nothing calls this directly

Calls 15

set_config_boolMethod · 0.80
update_captureMethod · 0.80
get_sample_limitMethod · 0.80
get_work_modeMethod · 0.80
get_spectrum_stackMethod · 0.80
get_math_stackMethod · 0.80
signal_typeMethod · 0.80
set_stop_scaleMethod · 0.80
get_sample_rateMethod · 0.45
clearMethod · 0.45
initMethod · 0.45
set_zero_ratioMethod · 0.45

Tested by

no test coverage detected