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

Method disconnectDevice

app/src/IO/ConnectionManager.cpp:708–725  ·  view source on GitHub ↗

* @brief Disconnects the primary device and any other project sources. */

Source from the content-addressed store, hash-verified

706 * @brief Disconnects the primary device and any other project sources.
707 */
708void IO::ConnectionManager::disconnectDevice()
709{
710 QApplication::setOverrideCursor(Qt::WaitCursor);
711
712 disconnectDevice(0);
713
714 if (AppState::instance().operationMode() == SerialStudio::ProjectFile) {
715 for (auto& [id, dm] : m_devices)
716 if (id > 0)
717 disconnectDevice(id);
718 }
719
720 DataModel::FrameBuilder::instance().registerQuickPlotHeaders(QStringList());
721
722 QApplication::restoreOverrideCursor();
723 Q_EMIT driverChanged();
724 Q_EMIT connectedChanged();
725}
726
727/**
728 * @brief Recreates the FrameReader for device 0 with the current settings.

Callers 15

onProcessFinishedMethod · 0.80
onProcessErrorMethod · 0.80
onPipeErrorMethod · 0.80
onReadErrorMethod · 0.80
handleErrorMethod · 0.80
doCloseMethod · 0.80
connectWithRetryMethod · 0.80
onReadErrorMethod · 0.80
onErrorOccurredMethod · 0.80
checkAndUpdateDeviceListFunction · 0.80
doCloseMethod · 0.80
disconnectMethod · 0.80

Calls 5

operationModeMethod · 0.80
findMethod · 0.80
closeMethod · 0.45
driverMethod · 0.45

Tested by

no test coverage detected