| 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 | { |
nothing calls this directly
no test coverage detected