MQTTSuite
Loading...
Searching...
No Matches
mqtt::mqttcli::lib Namespace Reference

Classes

class  Mqtt

Functions

static uint8_t getQos (const std::string &qoSString)

Function Documentation

◆ getQos()

uint8_t mqtt::mqttcli::lib::getQos ( const std::string & qoSString)
static

Definition at line 275 of file Mqtt.cpp.

275 {
276 unsigned long qoS = std::stoul(qoSString);
277
278 if (qoS > 2) {
279 throw std::out_of_range("qos " + qoSString + " not in range [0..2]");
280 }
281
282 return static_cast<uint8_t>(qoS);
283 }

Referenced by mqtt::mqttcli::lib::Mqtt::onConnack().

Here is the caller graph for this function: