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

Method get_capture_status

DSView/pv/sigsession.cpp:802–835  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

800 }
801
802 bool SigSession::get_capture_status(bool &triggered, int &progress)
803 {
804 uint64_t sample_limits = cur_samplelimits();
805 sr_status status;
806
807 if (_device_agent.get_device_status(status, true))
808 {
809 triggered = status.trig_hit & 0x01;
810 uint64_t captured_cnt = status.trig_hit >> 2;
811
812 captured_cnt = ((uint64_t)status.captured_cnt0 +
813 ((uint64_t)status.captured_cnt1 << 8) +
814 ((uint64_t)status.captured_cnt2 << 16) +
815 ((uint64_t)status.captured_cnt3 << 24) +
816 (captured_cnt << 32));
817
818 int mode = _device_agent.get_work_mode();
819
820 if (mode == DSO)
821 captured_cnt = captured_cnt * _signals.size() / get_ch_num(SR_CHANNEL_DSO);
822
823 if (triggered)
824 progress = (sample_limits - captured_cnt) * 100.0 / sample_limits;
825 else
826 progress = captured_cnt * 100.0 / sample_limits;
827
828 if (progress == 100 && mode == LOGIC && _capture_data->get_logic()->have_data() == false){
829 progress = 0;
830 }
831
832 return true;
833 }
834 return false;
835 }
836
837 std::vector<view::Signal *> &SigSession::get_signals()
838 {

Callers 2

doPaintMethod · 0.80
paintProgressMethod · 0.80

Calls 5

get_device_statusMethod · 0.80
get_work_modeMethod · 0.80
sizeMethod · 0.80
have_dataMethod · 0.80
get_logicMethod · 0.80

Tested by

no test coverage detected