MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / handleMissingDataset

Method handleMissingDataset

app/src/UI/Dashboard.cpp:1533–1572  ·  view source on GitHub ↗

* @brief Handles the case where a dataset UID is not in m_datasetReferences. */

Source from the content-addressed store, hash-verified

1531 * @brief Handles the case where a dataset UID is not in m_datasetReferences.
1532 */
1533void UI::Dashboard::handleMissingDataset(const DataModel::Frame& frame)
1534{
1535 Q_ASSERT(!frame.groups.empty());
1536 Q_ASSERT(frame.sourceId >= 0);
1537
1538 if (m_updateRetryInProgress) {
1539 qWarning() << "Failed to build dashboard widget model";
1540
1541 auto& connMgr = IO::ConnectionManager::instance();
1542 if (connMgr.isConnected()) {
1543 connMgr.disconnectDevice();
1544 return;
1545 }
1546
1547 if (CSV::Player::instance().isOpen()) {
1548 CSV::Player::instance().closeFile();
1549 return;
1550 }
1551
1552 if (MDF4::Player::instance().isOpen()) {
1553 MDF4::Player::instance().closeFile();
1554 return;
1555 }
1556
1557#ifdef BUILD_COMMERCIAL
1558 if (Sessions::Player::instance().isOpen()) {
1559 Sessions::Player::instance().closeFile();
1560 return;
1561 }
1562#endif
1563 return;
1564 }
1565
1566 m_sourceRawFrames[frame.sourceId] = frame;
1567 reconfigureDashboard(combineSourceFrames(frame));
1568
1569 m_updateRetryInProgress = true;
1570 updateDashboardData(frame);
1571 m_updateRetryInProgress = false;
1572}
1573
1574/**
1575 * @brief Updates dataset values and plot data based on the given frame.

Callers

nothing calls this directly

Calls 5

emptyMethod · 0.80
disconnectDeviceMethod · 0.80
isConnectedMethod · 0.45
isOpenMethod · 0.45
closeFileMethod · 0.45

Tested by

no test coverage detected