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

Method isConnected

app/src/IO/ConnectionManager.cpp:180–192  ·  view source on GitHub ↗

* @brief Returns true when at least one device is currently connected. */

Source from the content-addressed store, hash-verified

178 * @brief Returns true when at least one device is currently connected.
179 */
180bool IO::ConnectionManager::isConnected() const
181{
182 if (AppState::instance().operationMode() == SerialStudio::ProjectFile) {
183 for (const auto& [id, dm] : m_devices)
184 if (dm && dm->isOpen())
185 return true;
186
187 return false;
188 }
189
190 auto it = m_devices.find(0);
191 return it != m_devices.end() && it->second && it->second->isOpen();
192}
193
194/**
195 * @brief Returns whether the device with the given source ID is currently open.

Callers 4

fileOpenMethod · 0.45
beginTransmissionMethod · 0.45
sendLineMethod · 0.45
sendRawBlockMethod · 0.45

Calls 3

operationModeMethod · 0.80
findMethod · 0.80
isOpenMethod · 0.45

Tested by

no test coverage detected