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

Method connectedBluetoothLE

app/src/IO/ConnectionManager.cpp:366–378  ·  view source on GitHub ↗

* @brief Returns the BLE driver that owns the live connection, or the UI-config instance when * none is open. Project mode connects through a per-source driver, so GATT operations * (writes, service/characteristic selection) must resolve this instance, not the UI one. */

Source from the content-addressed store, hash-verified

364 * (writes, service/characteristic selection) must resolve this instance, not the UI one.
365 */
366IO::Drivers::BluetoothLE* IO::ConnectionManager::connectedBluetoothLE() const noexcept
367{
368 for (const auto& [deviceId, dm] : m_devices) {
369 if (!dm)
370 continue;
371
372 auto* ble = qobject_cast<IO::Drivers::BluetoothLE*>(dm->driver());
373 if (ble && ble->isOpen())
374 return ble;
375 }
376
377 return m_bluetoothLEUi.get();
378}
379
380#ifdef BUILD_COMMERCIAL
381/**

Callers 9

selectServiceMethod · 0.80
selectServiceByUuidMethod · 0.80
writeCharacteristicMethod · 0.80
getServiceListMethod · 0.80
getCharacteristicListMethod · 0.80
getConfigurationMethod · 0.80
getStatusMethod · 0.80

Calls 3

driverMethod · 0.45
isOpenMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected