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

Method action_start_capture

DSView/pv/sigsession.cpp:508–620  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

506 }
507
508 bool SigSession::action_start_capture(bool instant)
509 {
510 assert(_callback);
511
512 dsv_info("Start collect.");
513
514 if (_is_working)
515 {
516 dsv_err("Error! Is working now.");
517 return false;
518 }
519
520 if (_signals.empty()){
521 dsv_info("ERROR: channel list is empty, unable to capture data.");
522 return false;
523 }
524
525 // Check that a device instance has been selected.
526 if (_device_agent.have_instance() == false)
527 {
528 dsv_err("Error!No device selected");
529 assert(false);
530 }
531 if (_device_status == ST_RUNNING || _device_agent.is_collecting())
532 {
533 dsv_err("Error!Device is running.");
534 return false;
535 }
536
537 clear_all_decode_task2();
538 clear_decode_result();
539
540 _capture_data->clear();
541 _view_data->clear();
542 _is_stream_mode = false;
543 _capture_times = 0;
544 _dso_packet_count = 0;
545 _dso_status_valid = false;
546
547 _capture_data = _view_data;
548 set_cur_snap_samplerate(_device_agent.get_sample_rate());
549 set_cur_samplelimits(_device_agent.get_sample_limit());
550
551 set_session_time(QDateTime::currentDateTime());
552
553 int mode = _device_agent.get_work_mode();
554 if (mode == LOGIC)
555 {
556 if (is_repeat_mode()
557 && _device_agent.is_hardware()
558 && _device_agent.is_stream_mode()){
559 set_repeat_intvl(0.1);
560 }
561
562 if (_device_agent.is_hardware()){
563 _is_stream_mode = _device_agent.is_stream_mode();
564 }
565 else if (_device_agent.is_demo() || _device_agent.is_file()){

Callers

nothing calls this directly

Calls 15

emptyMethod · 0.80
have_instanceMethod · 0.80
is_collectingMethod · 0.80
get_sample_limitMethod · 0.80
get_work_modeMethod · 0.80
is_hardwareMethod · 0.80
is_stream_modeMethod · 0.80
is_demoMethod · 0.80
set_config_boolMethod · 0.80
get_config_uint32Method · 0.80
set_ref_rangeMethod · 0.80

Tested by

no test coverage detected