2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
47#ifndef DOXYGEN_SHOULD_SKIP_THIS
51#include <iot/mqtt/packets/Connack.h>
52#include <log/Logger.h>
53#include <utils/system/signal.h>
57namespace mqtt::bridge::
lib {
60 : iot::
mqtt::client::Mqtt(connectionName,
65 VLOG(1) <<
"Client Id: " << clientId;
66 VLOG(1) <<
" Keep Alive: " << keepAlive;
71 VLOG(1) <<
" Will QoS: " <<
static_cast<uint16_t>(broker
.getWillQoS());
83 VLOG(1) <<
"MQTT: Initiating Session";
97 VLOG(1) <<
"MQTT: Disconnected";
101 VLOG(1) <<
"MQTT: On Exit due to '" << strsignal(signum) <<
"' (SIG" << utils::system::sigabbrev_np(signum) <<
" = " << signum
106 return Super::onSignal(signum);
110 if (connack.getReturnCode() == 0) {
void addMqtt(mqtt::bridge::lib::Mqtt *mqtt)
void publish(const mqtt::bridge::lib::Mqtt *originMqtt, const iot::mqtt::packets::Publish &publish)
void removeMqtt(mqtt::bridge::lib::Mqtt *mqtt)
bool getLoopPrevention() const
const std::string & getWillTopic() const
bool getWillRetain() const
const std::list< iot::mqtt::Topic > & getTopics() const
uint16_t getKeepAlive() const
const std::string & getWillMessage() const
const std::string & getSessionStoreFileName() const
const std::string & getClientId() const
const std::string & getUsername() const
bool getCleanSession() const
const std::string & getPassword() const
Bridge & getBridge() const
const std::string & getPrefix() const
uint8_t getWillQoS() const
iot::mqtt::client::Mqtt Super
void onDisconnected() final
bool onSignal(int signum) final
void onPublish(const iot::mqtt::packets::Publish &publish) final
void onConnack(const iot::mqtt::packets::Connack &connack) final
Mqtt(const std::string &connectionName, const Broker &broker)
const Broker & getBroker() const