SNode.C
|
#include <Mqtt.h>
Public Types | |
using | Super = iot::mqtt::Mqtt |
Public Member Functions | |
Mqtt (const std::string &connectionName, const std::string &clientId) | |
~Mqtt () override | |
void | sendConnect (uint16_t keepAlive, const std::string &clientId, bool cleanSession, const std::string &willTopic, const std::string &willMessage, uint8_t willQoS, bool willRetain, const std::string &username, const std::string &password, bool loopPrevention=false) |
void | sendSubscribe (const std::list< Topic > &topics) |
void | sendUnsubscribe (const std::list< std::string > &topics) |
void | sendPingreq () const |
void | sendDisconnect () const |
![]() | |
Mqtt (const std::string &connectionName) | |
Mqtt (const std::string &connectionName, const std::string &clientId) | |
Mqtt (Mqtt &&)=delete | |
Mqtt (const Mqtt &)=delete | |
Mqtt & | operator= (Mqtt &&)=delete |
Mqtt & | operator= (const Mqtt &)=delete |
virtual void | onConnected () |
virtual void | onDisconnected () |
const std::string & | getConnectionName () const |
const MqttContext * | getMqttContext () const |
void | sendPublish (const std::string &topic, const std::string &message, uint8_t qoS, bool retain) |
void | sendPuback (uint16_t packetIdentifier) const |
void | sendPubrec (uint16_t packetIdentifier) const |
void | sendPubrel (uint16_t packetIdentifier) const |
void | sendPubcomp (uint16_t packetIdentifier) const |
Private Member Functions | |
iot::mqtt::ControlPacketDeserializer * | createControlPacketDeserializer (iot::mqtt::FixedHeader &fixedHeader) final |
void | deliverPacket (iot::mqtt::ControlPacketDeserializer *controlPacketDeserializer) override |
virtual void | onConnack (const iot::mqtt::packets::Connack &connack) |
virtual void | onSuback (const iot::mqtt::packets::Suback &suback) |
virtual void | onUnsuback (const iot::mqtt::packets::Unsuback &unsuback) |
virtual void | onPingresp (const iot::mqtt::packets::Pingresp &pingresp) |
void | _onConnack (const iot::mqtt::client::packets::Connack &connack) |
void | _onPublish (const iot::mqtt::client::packets::Publish &publish) |
void | _onSuback (const iot::mqtt::client::packets::Suback &suback) |
void | _onUnsuback (const iot::mqtt::client::packets::Unsuback &unsuback) |
void | _onPingresp (const iot::mqtt::client::packets::Pingresp &pingresp) |
Private Attributes | |
uint16_t | keepAlive = 0 |
std::string | sessionStoreFileName |
iot::mqtt::Session | session |
core::timer::Timer | pingTimer |
Additional Inherited Members | |
![]() | |
static std::string | toHexString (const std::vector< char > &data) |
static std::string | toHexString (const std::string &data) |
![]() | |
std::string | connectionName |
std::string | clientId |
MqttContext * | mqttContext = nullptr |
|
explicit |
Definition at line 57 of file Mqtt.cpp.
References Mqtt().
Referenced by Mqtt().
|
overridevirtual |
Reimplemented from iot::mqtt::Mqtt.
Definition at line 91 of file Mqtt.cpp.
|
private |
Definition at line 172 of file Mqtt.cpp.
References onConnack().
|
private |
Definition at line 236 of file Mqtt.cpp.
References onPingresp().
|
private |
Definition at line 192 of file Mqtt.cpp.
|
private |
Definition at line 198 of file Mqtt.cpp.
References onSuback().
|
private |
Definition at line 224 of file Mqtt.cpp.
References onUnsuback().
|
finalprivatevirtual |
Implements iot::mqtt::Mqtt.
Definition at line 113 of file Mqtt.cpp.
|
overrideprivatevirtual |
Implements iot::mqtt::Mqtt.
Definition at line 152 of file Mqtt.cpp.
|
privatevirtual |
Definition at line 160 of file Mqtt.cpp.
Referenced by _onConnack().
|
privatevirtual |
Definition at line 169 of file Mqtt.cpp.
Referenced by _onPingresp().
|
overrideprotectedvirtual |
|
privatevirtual |
Definition at line 163 of file Mqtt.cpp.
Referenced by _onSuback().
|
privatevirtual |
Definition at line 166 of file Mqtt.cpp.
Referenced by _onUnsuback().
void iot::mqtt::client::Mqtt::sendConnect | ( | uint16_t | keepAlive, |
const std::string & | clientId, | ||
bool | cleanSession, | ||
const std::string & | willTopic, | ||
const std::string & | willMessage, | ||
uint8_t | willQoS, | ||
bool | willRetain, | ||
const std::string & | username, | ||
const std::string & | password, | ||
bool | loopPrevention = false ) |
Definition at line 240 of file Mqtt.cpp.
References keepAlive.
void iot::mqtt::client::Mqtt::sendDisconnect | ( | ) | const |
void iot::mqtt::client::Mqtt::sendPingreq | ( | ) | const |
void iot::mqtt::client::Mqtt::sendSubscribe | ( | const std::list< Topic > & | topics | ) |
void iot::mqtt::client::Mqtt::sendUnsubscribe | ( | const std::list< std::string > & | topics | ) |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
private |
Definition at line 116 of file Mqtt.h.
Referenced by sendConnect().
|
private |
|
private |
|
private |