SNode.C
|
#include <Connect.h>
Public Member Functions | |
Connect (const std::string &clientId, const std::string &protocol="MQTT", uint8_t version=4, uint8_t flags=0, uint16_t keepAlive=0x003C) | |
Connect (iot::mqtt_fast::ControlPacketFactory &controlPacketFactory) | |
std::string | getProtocol () const |
uint8_t | getLevel () const |
uint8_t | getFlags () const |
uint16_t | getKeepAlive () const |
const std::string & | getClientId () const |
bool | getUsernameFlag () const |
bool | getPasswordFlag () const |
bool | getWillRetain () const |
uint8_t | getWillQoS () const |
bool | getWillFlag () const |
bool | getCleanSession () const |
const std::string & | getWillTopic () const |
const std::string & | getWillMessage () const |
const std::string & | getUsername () const |
const std::string & | getPassword () const |
![]() | |
ControlPacket (uint8_t type, uint8_t reserved=0) | |
ControlPacket (iot::mqtt_fast::ControlPacketFactory &controlPacketFactory) | |
ControlPacket (const ControlPacket &)=delete | |
ControlPacket (ControlPacket &&)=delete | |
ControlPacket & | operator= (const ControlPacket &)=delete |
ControlPacket & | operator= (ControlPacket &&)=delete |
uint8_t | getType () const |
uint8_t | getReserved () const |
uint64_t | getRemainingLength () const |
std::vector< char > | getPacket () |
bool | isError () const |
Private Attributes | |
std::string | protocol |
uint8_t | level = 0 |
uint8_t | flags = 0 |
uint16_t | keepAlive = 0 |
std::string | clientId |
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 | reserved = false |
Additional Inherited Members | |
![]() | |
std::vector< char > & | getValue () |
uint8_t | getInt8 () |
uint16_t | getInt16 () |
uint32_t | getInt32 () |
uint64_t | getInt64 () |
uint32_t | getIntV () |
std::string | getString () |
std::string | getStringRaw () |
std::list< uint8_t > | getUint8ListRaw () |
void | putInt8 (uint8_t value) |
void | putInt16 (uint16_t value) |
void | putInt32 (uint32_t value) |
void | putInt64 (uint64_t value) |
void | putIntV (uint32_t value) |
void | putString (const std::string &value) |
void | putStringRaw (const std::string &value) |
void | putUint8ListRaw (const std::list< uint8_t > &value) |
bool | isError () |
![]() | |
bool | error = false |
|
explicit |
Definition at line 50 of file Connect.cpp.
References clientId, iot::mqtt_fast::ControlPacket::ControlPacket(), flags, keepAlive, level, protocol, iot::mqtt_fast::ControlPacket::putInt16(), iot::mqtt_fast::ControlPacket::putInt8(), and iot::mqtt_fast::ControlPacket::putString().
Referenced by iot::mqtt_fast::SocketContext::sendConnect().
|
explicit |
Definition at line 67 of file Connect.cpp.
References cleanSession, clientId, iot::mqtt_fast::ControlPacket::ControlPacket(), iot::mqtt_fast::ControlPacket::error, flags, iot::mqtt_fast::ControlPacket::getInt16(), iot::mqtt_fast::ControlPacket::getInt8(), iot::mqtt_fast::ControlPacket::getString(), iot::mqtt_fast::ControlPacket::isError(), keepAlive, level, password, passwordFlag, protocol, reserved, username, usernameFlag, willFlag, willMessage, willQoS, willRetain, and willTopic.
Referenced by iot::mqtt_fast::SocketContext::onReceivedFromPeer().
bool iot::mqtt_fast::packets::Connect::getCleanSession | ( | ) | const |
Definition at line 144 of file Connect.cpp.
References cleanSession.
const std::string & iot::mqtt_fast::packets::Connect::getClientId | ( | ) | const |
uint8_t iot::mqtt_fast::packets::Connect::getFlags | ( | ) | const |
uint16_t iot::mqtt_fast::packets::Connect::getKeepAlive | ( | ) | const |
uint8_t iot::mqtt_fast::packets::Connect::getLevel | ( | ) | const |
const std::string & iot::mqtt_fast::packets::Connect::getPassword | ( | ) | const |
bool iot::mqtt_fast::packets::Connect::getPasswordFlag | ( | ) | const |
Definition at line 128 of file Connect.cpp.
References passwordFlag.
std::string iot::mqtt_fast::packets::Connect::getProtocol | ( | ) | const |
const std::string & iot::mqtt_fast::packets::Connect::getUsername | ( | ) | const |
bool iot::mqtt_fast::packets::Connect::getUsernameFlag | ( | ) | const |
Definition at line 124 of file Connect.cpp.
References usernameFlag.
bool iot::mqtt_fast::packets::Connect::getWillFlag | ( | ) | const |
const std::string & iot::mqtt_fast::packets::Connect::getWillMessage | ( | ) | const |
Definition at line 152 of file Connect.cpp.
References willMessage.
uint8_t iot::mqtt_fast::packets::Connect::getWillQoS | ( | ) | const |
bool iot::mqtt_fast::packets::Connect::getWillRetain | ( | ) | const |
Definition at line 132 of file Connect.cpp.
References willRetain.
const std::string & iot::mqtt_fast::packets::Connect::getWillTopic | ( | ) | const |
|
private |
Definition at line 109 of file Connect.h.
Referenced by Connect(), and getCleanSession().
|
private |
Definition at line 98 of file Connect.h.
Referenced by Connect(), Connect(), and getClientId().
|
private |
Definition at line 95 of file Connect.h.
Referenced by Connect(), Connect(), and getFlags().
|
private |
Definition at line 96 of file Connect.h.
Referenced by Connect(), Connect(), and getKeepAlive().
|
private |
Definition at line 94 of file Connect.h.
Referenced by Connect(), Connect(), and getLevel().
|
private |
Definition at line 102 of file Connect.h.
Referenced by Connect(), and getPassword().
|
private |
Definition at line 105 of file Connect.h.
Referenced by Connect(), and getPasswordFlag().
|
private |
Definition at line 93 of file Connect.h.
Referenced by Connect(), Connect(), and getProtocol().
|
private |
|
private |
Definition at line 101 of file Connect.h.
Referenced by Connect(), and getUsername().
|
private |
Definition at line 104 of file Connect.h.
Referenced by Connect(), and getUsernameFlag().
|
private |
Definition at line 108 of file Connect.h.
Referenced by Connect(), and getWillFlag().
|
private |
Definition at line 100 of file Connect.h.
Referenced by Connect(), and getWillMessage().
|
private |
Definition at line 107 of file Connect.h.
Referenced by Connect(), and getWillQoS().
|
private |
Definition at line 106 of file Connect.h.
Referenced by Connect(), and getWillRetain().
|
private |
Definition at line 99 of file Connect.h.
Referenced by Connect(), and getWillTopic().