MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / set_receive_len

Method set_receive_len

DSView/pv/view/viewport.cpp:1495–1557  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1493}
1494
1495void Viewport::set_receive_len(quint64 length)
1496{
1497 if (length == 0) {
1498 _sample_received = 0;
1499 start_trigger_timer(333);
1500 _tigger_wait_times = 0;
1501 _is_checked_trig = false;
1502 }
1503 else {
1504 stop_trigger_timer();
1505
1506 if (_sample_received + length > _view.session().cur_samplelimits())
1507 _sample_received = _view.session().cur_samplelimits();
1508 else
1509 _sample_received += length;
1510 }
1511
1512 int mode = _view.session().get_device()->get_work_mode();
1513
1514 if (mode == LOGIC)
1515 {
1516 if (_view.session().get_device()->is_file() == false)
1517 {
1518 if (!_is_checked_trig && _view.session().is_triged()){
1519 _view.get_viewstatus()->set_trig_time(_view.session().get_trig_time());
1520 _view.get_viewstatus()->update();
1521 _is_checked_trig = true;
1522 }
1523 }
1524
1525 if (_view.session().is_repeat_mode())
1526 {
1527 double progress = 0;
1528 int progress100 = 0;
1529 get_captured_progress(progress, progress100);
1530 _view.show_captured_progress(_transfer_started, progress100);
1531
1532 if (_view.session().is_single_buffer()){
1533 if (_view.session().have_new_realtime_refresh(true) == false){
1534 return;
1535 }
1536 }
1537 else{
1538 return;
1539 }
1540 }
1541 else if (_view.session().is_realtime_refresh())
1542 {
1543 if (_view.session().have_new_realtime_refresh(true) == false){
1544 return;
1545 }
1546 }
1547 }
1548
1549 if (mode == LOGIC && AppConfig::Instance().appOptions.autoScrollLatestData
1550 && _view.session().is_realtime_refresh())
1551 {
1552 _view.scroll_to_logic_last_data_time();

Callers

nothing calls this directly

Calls 15

cur_samplelimitsMethod · 0.80
sessionMethod · 0.80
get_work_modeMethod · 0.80
get_deviceMethod · 0.80
is_trigedMethod · 0.80
set_trig_timeMethod · 0.80
get_viewstatusMethod · 0.80
get_trig_timeMethod · 0.80
is_repeat_modeMethod · 0.80
is_single_bufferMethod · 0.80

Tested by

no test coverage detected