SNode.C
|
#include <ControlPacket.h>
Public Member Functions | |
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 |
Protected Member Functions | |
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 () |
Protected Attributes | |
bool | error = false |
Private Attributes | |
uint8_t | type |
uint8_t | reserved |
iot::mqtt_fast::types::Binary | data |
Definition at line 62 of file ControlPacket.h.
|
explicit |
Definition at line 54 of file ControlPacket.cpp.
References reserved, and type.
Referenced by iot::mqtt_fast::packets::Connack::Connack(), iot::mqtt_fast::packets::Connect::Connect(), iot::mqtt_fast::packets::Disconnect::Disconnect(), iot::mqtt_fast::packets::Pingreq::Pingreq(), iot::mqtt_fast::packets::Pingresp::Pingresp(), iot::mqtt_fast::packets::Puback::Puback(), iot::mqtt_fast::packets::Pubcomp::Pubcomp(), iot::mqtt_fast::packets::Publish::Publish(), iot::mqtt_fast::packets::Pubrec::Pubrec(), iot::mqtt_fast::packets::Pubrel::Pubrel(), iot::mqtt_fast::packets::Suback::Suback(), iot::mqtt_fast::packets::Subscribe::Subscribe(), iot::mqtt_fast::packets::Unsuback::Unsuback(), and iot::mqtt_fast::packets::Unsubscribe::Unsubscribe().
|
explicit |
Definition at line 59 of file ControlPacket.cpp.
References data, iot::mqtt_fast::ControlPacketFactory::getPacket(), iot::mqtt_fast::ControlPacketFactory::getPacketFlags(), iot::mqtt_fast::ControlPacketFactory::getPacketType(), reserved, and type.
Referenced by iot::mqtt_fast::packets::Connack::Connack(), iot::mqtt_fast::packets::Connect::Connect(), iot::mqtt_fast::packets::Disconnect::Disconnect(), iot::mqtt_fast::packets::Pingreq::Pingreq(), iot::mqtt_fast::packets::Pingresp::Pingresp(), iot::mqtt_fast::packets::Puback::Puback(), iot::mqtt_fast::packets::Pubcomp::Pubcomp(), iot::mqtt_fast::packets::Publish::Publish(), iot::mqtt_fast::packets::Pubrec::Pubrec(), iot::mqtt_fast::packets::Pubrel::Pubrel(), iot::mqtt_fast::packets::Suback::Suback(), iot::mqtt_fast::packets::Subscribe::Subscribe(), iot::mqtt_fast::packets::Unsuback::Unsuback(), and iot::mqtt_fast::packets::Unsubscribe::Unsubscribe().
|
delete |
|
delete |
|
protected |
Definition at line 109 of file ControlPacket.cpp.
References data, and iot::mqtt_fast::types::Binary::getInt16().
Referenced by iot::mqtt_fast::packets::Connect::Connect(), iot::mqtt_fast::packets::Puback::Puback(), iot::mqtt_fast::packets::Pubcomp::Pubcomp(), iot::mqtt_fast::packets::Publish::Publish(), iot::mqtt_fast::packets::Pubrec::Pubrec(), iot::mqtt_fast::packets::Pubrel::Pubrel(), iot::mqtt_fast::packets::Suback::Suback(), iot::mqtt_fast::packets::Subscribe::Subscribe(), iot::mqtt_fast::packets::Unsuback::Unsuback(), and iot::mqtt_fast::packets::Unsubscribe::Unsubscribe().
|
protected |
Definition at line 113 of file ControlPacket.cpp.
References data, and iot::mqtt_fast::types::Binary::getInt32().
|
protected |
Definition at line 117 of file ControlPacket.cpp.
References data, and iot::mqtt_fast::types::Binary::getInt64().
|
protected |
Definition at line 105 of file ControlPacket.cpp.
References data, and iot::mqtt_fast::types::Binary::getInt8().
Referenced by iot::mqtt_fast::packets::Connack::Connack(), iot::mqtt_fast::packets::Connect::Connect(), and iot::mqtt_fast::packets::Subscribe::Subscribe().
|
protected |
Definition at line 121 of file ControlPacket.cpp.
References data, and iot::mqtt_fast::types::Binary::getIntV().
std::vector< char > iot::mqtt_fast::ControlPacket::getPacket | ( | ) |
Definition at line 77 of file ControlPacket.cpp.
References data, iot::mqtt_fast::types::Binary::getLength(), iot::mqtt_fast::types::Binary::getValue(), reserved, and type.
Referenced by iot::mqtt_fast::SocketContext::send(), and iot::mqtt_fast::SocketContext::send().
uint64_t iot::mqtt_fast::ControlPacket::getRemainingLength | ( | ) | const |
Definition at line 73 of file ControlPacket.cpp.
References data, and iot::mqtt_fast::types::Binary::getLength().
uint8_t iot::mqtt_fast::ControlPacket::getReserved | ( | ) | const |
|
protected |
Definition at line 125 of file ControlPacket.cpp.
References data, and iot::mqtt_fast::types::Binary::getString().
Referenced by iot::mqtt_fast::packets::Connect::Connect(), iot::mqtt_fast::packets::Publish::Publish(), iot::mqtt_fast::packets::Subscribe::Subscribe(), and iot::mqtt_fast::packets::Unsubscribe::Unsubscribe().
|
protected |
Definition at line 129 of file ControlPacket.cpp.
References data, and iot::mqtt_fast::types::Binary::getStringRaw().
Referenced by iot::mqtt_fast::packets::Publish::Publish().
uint8_t iot::mqtt_fast::ControlPacket::getType | ( | ) | const |
|
protected |
Definition at line 133 of file ControlPacket.cpp.
References data, and iot::mqtt_fast::types::Binary::getUint8ListRaw().
Referenced by iot::mqtt_fast::packets::Suback::Suback().
|
protected |
Definition at line 101 of file ControlPacket.cpp.
References data, and iot::mqtt_fast::types::Binary::getValue().
|
protected |
Definition at line 169 of file ControlPacket.cpp.
References data, and iot::mqtt_fast::types::TypeBase::isError().
Referenced by iot::mqtt_fast::packets::Connack::Connack(), iot::mqtt_fast::packets::Connect::Connect(), iot::mqtt_fast::packets::Disconnect::Disconnect(), iot::mqtt_fast::packets::Pingreq::Pingreq(), iot::mqtt_fast::packets::Pingresp::Pingresp(), iot::mqtt_fast::packets::Puback::Puback(), iot::mqtt_fast::packets::Pubcomp::Pubcomp(), iot::mqtt_fast::packets::Publish::Publish(), iot::mqtt_fast::packets::Pubrec::Pubrec(), iot::mqtt_fast::packets::Pubrel::Pubrel(), iot::mqtt_fast::packets::Suback::Suback(), iot::mqtt_fast::packets::Subscribe::Subscribe(), iot::mqtt_fast::packets::Unsuback::Unsuback(), and iot::mqtt_fast::packets::Unsubscribe::Unsubscribe().
bool iot::mqtt_fast::ControlPacket::isError | ( | ) | const |
|
delete |
|
delete |
|
protected |
Definition at line 141 of file ControlPacket.cpp.
References data, and iot::mqtt_fast::types::Binary::putInt16().
Referenced by iot::mqtt_fast::packets::Connect::Connect(), iot::mqtt_fast::packets::Puback::Puback(), iot::mqtt_fast::packets::Pubcomp::Pubcomp(), iot::mqtt_fast::packets::Publish::Publish(), iot::mqtt_fast::packets::Pubrec::Pubrec(), iot::mqtt_fast::packets::Pubrel::Pubrel(), iot::mqtt_fast::packets::Suback::Suback(), iot::mqtt_fast::packets::Subscribe::Subscribe(), iot::mqtt_fast::packets::Unsuback::Unsuback(), and iot::mqtt_fast::packets::Unsubscribe::Unsubscribe().
|
protected |
Definition at line 145 of file ControlPacket.cpp.
References data, and iot::mqtt_fast::types::Binary::putInt32().
|
protected |
Definition at line 149 of file ControlPacket.cpp.
References data, and iot::mqtt_fast::types::Binary::putInt64().
|
protected |
Definition at line 137 of file ControlPacket.cpp.
References data, and iot::mqtt_fast::types::Binary::putInt8().
Referenced by iot::mqtt_fast::packets::Connack::Connack(), iot::mqtt_fast::packets::Connect::Connect(), and iot::mqtt_fast::packets::Subscribe::Subscribe().
|
protected |
Definition at line 153 of file ControlPacket.cpp.
References data, and iot::mqtt_fast::types::Binary::putIntV().
|
protected |
Definition at line 157 of file ControlPacket.cpp.
References data, and iot::mqtt_fast::types::Binary::putString().
Referenced by iot::mqtt_fast::packets::Connect::Connect(), iot::mqtt_fast::packets::Publish::Publish(), iot::mqtt_fast::packets::Subscribe::Subscribe(), and iot::mqtt_fast::packets::Unsubscribe::Unsubscribe().
|
protected |
Definition at line 161 of file ControlPacket.cpp.
References data, and iot::mqtt_fast::types::Binary::putStringRaw().
Referenced by iot::mqtt_fast::packets::Publish::Publish().
|
protected |
Definition at line 165 of file ControlPacket.cpp.
References data, and iot::mqtt_fast::types::Binary::putUint8ListRaw().
Referenced by iot::mqtt_fast::packets::Suback::Suback().
|
private |
Definition at line 107 of file ControlPacket.h.
Referenced by ControlPacket(), getInt16(), getInt32(), getInt64(), getInt8(), getIntV(), getPacket(), getRemainingLength(), getString(), getStringRaw(), getUint8ListRaw(), getValue(), isError(), putInt16(), putInt32(), putInt64(), putInt8(), putIntV(), putString(), putStringRaw(), and putUint8ListRaw().
|
protected |
Definition at line 110 of file ControlPacket.h.
Referenced by iot::mqtt_fast::packets::Connack::Connack(), iot::mqtt_fast::packets::Connect::Connect(), iot::mqtt_fast::packets::Disconnect::Disconnect(), isError(), iot::mqtt_fast::packets::Pingreq::Pingreq(), iot::mqtt_fast::packets::Pingresp::Pingresp(), iot::mqtt_fast::packets::Puback::Puback(), iot::mqtt_fast::packets::Pubcomp::Pubcomp(), iot::mqtt_fast::packets::Publish::Publish(), iot::mqtt_fast::packets::Pubrec::Pubrec(), iot::mqtt_fast::packets::Pubrel::Pubrel(), iot::mqtt_fast::packets::Suback::Suback(), iot::mqtt_fast::packets::Subscribe::Subscribe(), iot::mqtt_fast::packets::Unsuback::Unsuback(), and iot::mqtt_fast::packets::Unsubscribe::Unsubscribe().
|
private |
Definition at line 105 of file ControlPacket.h.
Referenced by ControlPacket(), ControlPacket(), getPacket(), and getReserved().
|
private |
Definition at line 104 of file ControlPacket.h.
Referenced by ControlPacket(), ControlPacket(), getPacket(), and getType().