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

Method selectServiceByUuid

app/src/IO/Drivers/BluetoothLE.cpp:1027–1041  ·  view source on GitHub ↗

* @brief Selects the discovered service whose UUID matches, by delegating to selectService. */

Source from the content-addressed store, hash-verified

1025 * @brief Selects the discovered service whose UUID matches, by delegating to selectService.
1026 */
1027bool IO::Drivers::BluetoothLE::selectServiceByUuid(const QString& uuid)
1028{
1029 const QBluetoothUuid target = bleUuidFromString(uuid);
1030 if (target.isNull())
1031 return false;
1032
1033 for (int i = 0; i < m_serviceUuids.count(); ++i) {
1034 if (QBluetoothUuid(m_serviceUuids.at(i)) == target) {
1035 selectService(i + 1);
1036 return true;
1037 }
1038 }
1039
1040 return false;
1041}
1042
1043/**
1044 * @brief Subscribes to the notify characteristic with the given UUID, by index delegation.

Callers

nothing calls this directly

Calls 2

bleUuidFromStringFunction · 0.85
countMethod · 0.45

Tested by

no test coverage detected