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

Method action_stop_capture

DSView/pv/sigsession.cpp:738–790  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

736 }
737
738 bool SigSession::action_stop_capture()
739 {
740 if (!_is_working)
741 return false;
742
743 dsv_info("Stop collect.");
744
745 if (_bClose)
746 {
747 _is_working = false;
748 _repeat_timer.Stop();
749 _repeat_wait_prog_timer.Stop();
750 _refresh_rt_timer.Stop();
751 exit_capture();
752 return true;
753 }
754
755 bool wait_upload = false;
756 if (is_single_mode() && _device_agent.get_work_mode() == LOGIC)
757 {
758 _device_agent.get_config_bool(SR_CONF_WAIT_UPLOAD, wait_upload);
759 }
760
761 if (!wait_upload)
762 {
763 _is_working = false;
764 _repeat_timer.Stop();
765 _repeat_wait_prog_timer.Stop();
766 _refresh_rt_timer.Stop();
767
768 if (_repeat_hold_prg != 0 && is_repeat_mode()){
769 _repeat_hold_prg = 0;
770 _callback->repeat_hold(_repeat_hold_prg);
771 }
772
773 _callback->trigger_message(DSV_MSG_END_COLLECT_WORK_PREV);
774
775 exit_capture();
776
777 data_unlock();
778
779 if (is_repeat_mode() && _device_status != ST_RUNNING){
780 _callback->trigger_message(DSV_MSG_END_COLLECT_WORK);
781 }
782
783 return true;
784 }
785 else
786 {
787 dsv_info("Data is uploading from device data buffer, waiting for stop.");
788 }
789 return false;
790 }
791
792 void SigSession::exit_capture()
793 {

Callers

nothing calls this directly

Calls 5

get_work_modeMethod · 0.80
get_config_boolMethod · 0.80
repeat_holdMethod · 0.80
trigger_messageMethod · 0.80
StopMethod · 0.45

Tested by

no test coverage detected