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

Method characteristicIndex

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

* @brief Returns the index of the characteristic selected by this instance. */

Source from the content-addressed store, hash-verified

731 * @brief Returns the index of the characteristic selected by this instance.
732 */
733int IO::Drivers::BluetoothLE::characteristicIndex() const
734{
735 if (m_selectedCharacteristic >= 0)
736 return m_selectedCharacteristic + 1;
737
738 for (auto* inst : std::as_const(s_instances))
739 if (inst != this && inst->m_deviceIndex == m_deviceIndex && inst->m_selectedCharacteristic >= 0)
740 return inst->m_selectedCharacteristic + 1;
741
742 return 0;
743}
744
745/**
746 * @brief Returns the discovered BLE devices with a leading placeholder entry.

Callers 2

getCharacteristicListMethod · 0.80
getConfigurationMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected