SNode.C
|
#include <Mqtt.h>
Public Member Functions | |
Mqtt (const std::string &connectionName, const std::shared_ptr< broker::Broker > &broker) | |
~Mqtt () override | |
void | sendConnack (uint8_t returnCode, uint8_t flags) const |
void | sendSuback (uint16_t packetIdentifier, const std::list< uint8_t > &returnCodes) const |
void | sendUnsuback (uint16_t packetIdentifier) const |
void | sendPingresp () const |
std::string | getProtocol () const |
uint8_t | getLevel () const |
uint8_t | getConnectFlags () const |
uint16_t | getKeepAlive () const |
std::string | getClientId () const |
std::string | getWillTopic () const |
std::string | getWillMessage () const |
std::string | getUsername () const |
std::string | getPassword () const |
bool | getUsernameFlag () const |
bool | getPasswordFlag () const |
bool | getWillRetain () const |
uint8_t | getWillQoS () const |
bool | getWillFlag () const |
bool | getCleanSession () const |
bool | getReflect () 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 |
Protected Attributes | |
std::string | protocol |
uint8_t | level = 0 |
uint8_t | connectFlags = 0 |
uint16_t | keepAlive = 0 |
std::string | willTopic |
std::string | willMessage |
std::string | username |
std::string | password |
bool | usernameFlag = false |
bool | passwordFlag = false |
bool | willRetain = false |
uint8_t | willQoS = 0 |
bool | willFlag = false |
bool | cleanSession = false |
bool | reflect = true |
std::shared_ptr< iot::mqtt::server::broker::Broker > | broker |
![]() | |
std::string | connectionName |
std::string | clientId |
MqttContext * | mqttContext = nullptr |
Private Types | |
using | Super = iot::mqtt::Mqtt |
Additional Inherited Members | |
![]() | |
static std::string | toHexString (const std::vector< char > &data) |
static std::string | toHexString (const std::string &data) |
|
private |
|
explicit |
Definition at line 51 of file Mqtt.cpp.
|
overridevirtual |
Reimplemented from iot::mqtt::Mqtt.
Definition at line 56 of file Mqtt.cpp.
References releaseSession(), and willFlag.
|
private |
Definition at line 191 of file Mqtt.cpp.
References cleanSession, connectFlags, initSession(), keepAlive, level, passwordFlag, reflect, sendConnack(), usernameFlag, willFlag, willQoS, and willRetain.
|
private |
Definition at line 318 of file Mqtt.cpp.
References releaseSession(), and willFlag.
|
private |
Definition at line 312 of file Mqtt.cpp.
References sendPingresp().
|
private |
Definition at line 257 of file Mqtt.cpp.
|
private |
Definition at line 265 of file Mqtt.cpp.
|
private |
Definition at line 290 of file Mqtt.cpp.
References sendUnsuback().
|
finalprivatevirtual |
Implements iot::mqtt::Mqtt.
Definition at line 69 of file Mqtt.cpp.
|
overrideprivatevirtual |
Implements iot::mqtt::Mqtt.
Definition at line 121 of file Mqtt.cpp.
bool iot::mqtt::server::Mqtt::getCleanSession | ( | ) | const |
Definition at line 398 of file Mqtt.cpp.
References cleanSession.
std::string iot::mqtt::server::Mqtt::getClientId | ( | ) | const |
uint8_t iot::mqtt::server::Mqtt::getConnectFlags | ( | ) | const |
Definition at line 350 of file Mqtt.cpp.
References connectFlags.
uint16_t iot::mqtt::server::Mqtt::getKeepAlive | ( | ) | const |
uint8_t iot::mqtt::server::Mqtt::getLevel | ( | ) | const |
std::string iot::mqtt::server::Mqtt::getPassword | ( | ) | const |
bool iot::mqtt::server::Mqtt::getPasswordFlag | ( | ) | const |
Definition at line 382 of file Mqtt.cpp.
References passwordFlag.
std::string iot::mqtt::server::Mqtt::getProtocol | ( | ) | const |
bool iot::mqtt::server::Mqtt::getReflect | ( | ) | const |
Definition at line 402 of file Mqtt.cpp.
References reflect.
Referenced by iot::mqtt::server::broker::Session::sendPublish().
std::string iot::mqtt::server::Mqtt::getUsername | ( | ) | const |
bool iot::mqtt::server::Mqtt::getUsernameFlag | ( | ) | const |
Definition at line 378 of file Mqtt.cpp.
References usernameFlag.
bool iot::mqtt::server::Mqtt::getWillFlag | ( | ) | const |
std::string iot::mqtt::server::Mqtt::getWillMessage | ( | ) | const |
uint8_t iot::mqtt::server::Mqtt::getWillQoS | ( | ) | const |
bool iot::mqtt::server::Mqtt::getWillRetain | ( | ) | const |
std::string iot::mqtt::server::Mqtt::getWillTopic | ( | ) | const |
|
private |
Definition at line 125 of file Mqtt.cpp.
References cleanSession, sendConnack(), and willFlag.
Referenced by _onConnect().
|
private |
Definition at line 83 of file Mqtt.cpp.
|
privatevirtual |
|
privatevirtual |
|
privatevirtual |
|
overrideprotectedvirtual |
|
privatevirtual |
|
privatevirtual |
|
private |
Definition at line 162 of file Mqtt.cpp.
References cleanSession.
Referenced by _onDisconnect(), and ~Mqtt().
void iot::mqtt::server::Mqtt::sendConnack | ( | uint8_t | returnCode, |
uint8_t | flags ) const |
Definition at line 326 of file Mqtt.cpp.
Referenced by _onConnect(), and initSession().
void iot::mqtt::server::Mqtt::sendPingresp | ( | ) | const |
Definition at line 338 of file Mqtt.cpp.
Referenced by _onPingreq().
void iot::mqtt::server::Mqtt::sendSuback | ( | uint16_t | packetIdentifier, |
const std::list< uint8_t > & | returnCodes ) const |
void iot::mqtt::server::Mqtt::sendUnsuback | ( | uint16_t | packetIdentifier | ) | const |
Definition at line 334 of file Mqtt.cpp.
Referenced by _onUnsubscribe().
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
protected |
|
protected |
Definition at line 138 of file Mqtt.h.
Referenced by _onConnect(), getCleanSession(), initSession(), and releaseSession().
|
protected |
Definition at line 125 of file Mqtt.h.
Referenced by _onConnect(), and getConnectFlags().
|
protected |
Definition at line 126 of file Mqtt.h.
Referenced by _onConnect(), and getKeepAlive().
|
protected |
Definition at line 124 of file Mqtt.h.
Referenced by _onConnect(), and getLevel().
|
protected |
Definition at line 134 of file Mqtt.h.
Referenced by _onConnect(), and getPasswordFlag().
|
protected |
Definition at line 139 of file Mqtt.h.
Referenced by _onConnect(), and getReflect().
|
protected |
Definition at line 133 of file Mqtt.h.
Referenced by _onConnect(), and getUsernameFlag().
|
protected |
Definition at line 137 of file Mqtt.h.
Referenced by _onConnect(), _onDisconnect(), getWillFlag(), initSession(), onSignal(), and ~Mqtt().
|
protected |
Definition at line 136 of file Mqtt.h.
Referenced by _onConnect(), and getWillQoS().
|
protected |
Definition at line 135 of file Mqtt.h.
Referenced by _onConnect(), and getWillRetain().