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

Method isDeviceConnected

app/src/IO/ConnectionManager.cpp:197–201  ·  view source on GitHub ↗

* @brief Returns whether the device with the given source ID is currently open. */

Source from the content-addressed store, hash-verified

195 * @brief Returns whether the device with the given source ID is currently open.
196 */
197bool IO::ConnectionManager::isDeviceConnected(int deviceId) const
198{
199 auto it = m_devices.find(deviceId);
200 return it != m_devices.end() && it->second && it->second->isOpen();
201}
202
203/**
204 * @brief Returns the number of currently open devices.

Callers

nothing calls this directly

Calls 2

findMethod · 0.80
isOpenMethod · 0.45

Tested by

no test coverage detected