#include "Mqtt.h"#include <iot/mqtt/Topic.h>#include <iot/mqtt/packets/Connack.h>#include <iot/mqtt/packets/Publish.h>#include <iot/mqtt/packets/Suback.h>#include <nlohmann/json.hpp>Go to the source code of this file.
Namespaces | |
| namespace | mqtt |
| namespace | mqtt::mqttcli |
| namespace | mqtt::mqttcli::lib |
Functions | |
| static int | getTerminalWidth () |
| static std::vector< std::string > | wrapParagraph (const std::string &text, std::size_t width) |
| static std::vector< std::string > | myformat (const std::string &prefix, const std::string &headLine, const std::string &message, std::size_t initialPrefixLength=0) |
| static const std::string | formatAsLogString (const std::string &prefix, const std::string &headLine, const std::string &message) |
| static uint8_t | mqtt::mqttcli::lib::getQos (const std::string &qoSString) |
|
static |
Definition at line 201 of file Mqtt.cpp.
References myformat().
Referenced by mqtt::mqttcli::lib::Mqtt::onPublish().
|
static |
Definition at line 73 of file Mqtt.cpp.
Referenced by myformat().
|
static |
Formats: prefix ┬ headLine ├ <first message line> │ <middle lines> └ <last message line>
If message parses as JSON, we pretty‐print it (indent=2). Otherwise we wrap it to the terminal width.
Returns the whole formatted string (with trailing newline on each line).
Definition at line 119 of file Mqtt.cpp.
References getTerminalWidth(), and wrapParagraph().
Referenced by formatAsLogString().
|
static |
Definition at line 85 of file Mqtt.cpp.
Referenced by myformat().