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

Method exec_capture

DSView/pv/sigsession.cpp:622–728  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

620 }
621
622 bool SigSession::exec_capture()
623 {
624 if (_device_agent.is_collecting())
625 {
626 dsv_err("Error!Device is running.");
627 return false;
628 }
629
630 if (_device_agent.have_enabled_channel() == false)
631 {
632 QString err_str(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_NO_ENABLED_CHANNEL), "No channels enabled!"));
633 MsgBox::Show(err_str);
634 return false;
635 }
636
637 _capture_times++;
638 _is_triged = false;
639
640 int mode = _device_agent.get_work_mode();
641 bool bAddDecoder = false;
642 bool bSwapBuffer = false;
643
644 if (mode == DSO || mode == ANALOG)
645 {
646 // reset measure of dso signal
647 for (auto s : _signals){
648 if (s->signal_type() == SR_CHANNEL_DSO){
649 view::DsoSignal *dsoSig = (view::DsoSignal*)s;
650 dsoSig->set_mValid(false);
651 }
652 }
653 }
654 else
655 {
656 if (is_single_mode())
657 {
658 if (_is_stream_mode)
659 bAddDecoder = true;
660 }
661 else if (is_repeat_mode())
662 {
663 if (_is_stream_mode)
664 {
665 if (_capture_times == 1)
666 bAddDecoder = true;
667 else
668 bSwapBuffer = true;
669 }
670 else{
671 bSwapBuffer = true;
672 }
673 }
674 else if (is_loop_mode())
675 {
676
677 }
678 }
679

Callers

nothing calls this directly

Calls 15

ShowFunction · 0.85
is_collectingMethod · 0.80
have_enabled_channelMethod · 0.80
get_work_modeMethod · 0.80
signal_typeMethod · 0.80
set_mValidMethod · 0.80
is_hardwareMethod · 0.80
sizeMethod · 0.80
get_sample_limitMethod · 0.80
set_capture_end_flagMethod · 0.80
StartMethod · 0.45

Tested by

no test coverage detected