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

Method set_cur_snap_samplerate

DSView/pv/sigsession.cpp:399–437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

397 }
398
399 void SigSession::set_cur_snap_samplerate(uint64_t samplerate)
400 {
401 assert(samplerate != 0);
402
403 _capture_data->_cur_snap_samplerate = samplerate;
404 _capture_data->get_logic()->set_samplerate(samplerate);
405 _capture_data->get_analog()->set_samplerate(samplerate);
406 _capture_data->get_dso()->set_samplerate(samplerate);
407
408 int mode = _device_agent.get_work_mode();
409
410 if (mode == DSO)
411 {
412 for(auto s : _signals){
413 if (s->get_type() == SR_CHANNEL_DSO){
414 view::DsoSignal *ch = (view::DsoSignal*)s;
415 uint64_t k = ch->get_vDial()->get_value();
416 _capture_data->get_dso()->set_measure_voltage_factor(k, ch->get_index());
417 _capture_data->get_dso()->set_data_scale(ch->get_scale(), ch->get_index());
418 }
419 }
420 }
421
422 // DecoderStack
423 for (auto d : _decode_traces)
424 {
425 d->decoder()->set_samplerate(samplerate);
426 }
427
428 // Math
429 if (_math_trace && _math_trace->enabled())
430 _math_trace->get_math_stack()->set_samplerate(_device_agent.get_sample_rate());
431 // SpectrumStack
432 for (auto m : _spectrum_traces){
433 m->get_spectrum_stack()->set_samplerate(samplerate);
434 }
435
436 _callback->cur_snap_samplerate_changed();
437 }
438
439 void SigSession::set_cur_samplelimits(uint64_t samplelimits)
440 {

Callers

nothing calls this directly

Calls 15

get_logicMethod · 0.80
get_analogMethod · 0.80
get_dsoMethod · 0.80
get_work_modeMethod · 0.80
set_data_scaleMethod · 0.80
get_math_stackMethod · 0.80
get_spectrum_stackMethod · 0.80
set_samplerateMethod · 0.45
get_typeMethod · 0.45
get_valueMethod · 0.45

Tested by

no test coverage detected