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

Method mqttVersion

app/src/MQTT/Publisher.cpp:932–943  ·  view source on GitHub ↗

* @brief Returns the selected MQTT protocol version index. */

Source from the content-addressed store, hash-verified

930 * @brief Returns the selected MQTT protocol version index.
931 */
932quint8 MQTT::Publisher::mqttVersion() const noexcept
933{
934 quint8 index = 0;
935 for (auto i = m_mqttVersions.begin(); i != m_mqttVersions.end(); ++i) {
936 if (i.value() == m_protocolVersion)
937 break;
938
939 ++index;
940 }
941
942 return index;
943}
944
945/**
946 * @brief Returns the selected SSL protocol index.

Callers 3

publisherGetConfigMethod · 0.45
subscriberGetConfigMethod · 0.45

Calls 2

beginMethod · 0.80
valueMethod · 0.45

Tested by

no test coverage detected