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
42#ifndef IOT_MQTT_CLIENT_PACKETS_DESERIALIZER_UNSUBACK_H
43#define IOT_MQTT_CLIENT_PACKETS_DESERIALIZER_UNSUBACK_H
45#include "iot/mqtt/client/ControlPacketDeserializer.h"
46#include "iot/mqtt/packets/Unsuback.h"
48#ifndef DOXYGEN_SHOULD_SKIP_THIS
55namespace iot::mqtt::client::
packets {
58 :
public iot::mqtt::
packets::Unsuback
59 ,
public iot::mqtt::client::ControlPacketDeserializer {
61 Unsuback(uint32_t remainingLength, uint8_t flags);
64 std::size_t deserializeVP(iot::mqtt::MqttContext* mqttContext)
override;
65 void deliverPacket(iot::mqtt::client::
Mqtt* mqtt)
override;
MqttContext * mqttContext
const std::string & getConnectionName() const
virtual void onConnected()
static std::string toHexString(const std::vector< char > &data)
virtual void onPubcomp(const iot::mqtt::packets::Pubcomp &pubcomp)
virtual void onPublish(const iot::mqtt::packets::Publish &publish)
core::timer::Timer keepAliveTimer
iot::mqtt::FixedHeader fixedHeader
const MqttContext * getMqttContext() const
std::size_t onReceivedFromPeer()
virtual void onDisconnected()
void send(const std::vector< char > &data) const
void setMqttContext(MqttContext *mqttContext)
void sendPuback(uint16_t packetIdentifier) const
virtual void onPuback(const iot::mqtt::packets::Puback &puback)
std::string connectionName
void _onPubrec(const iot::mqtt::packets::Pubrec &pubrec)
virtual void deliverPacket(iot::mqtt::ControlPacketDeserializer *controlPacketDeserializer)=0
void sendPubrel(uint16_t packetIdentifier) const
uint16_t getPacketIdentifier()
bool _onPublish(const iot::mqtt::packets::Publish &publish)
virtual iot::mqtt::ControlPacketDeserializer * createControlPacketDeserializer(iot::mqtt::FixedHeader &staticHeader)=0
Mqtt & operator=(Mqtt &&)=delete
void printFixedHeader(const iot::mqtt::FixedHeader &fixedHeader) const
uint16_t _packetIdentifier
Mqtt(const Mqtt &)=delete
void _onPubrel(const iot::mqtt::packets::Pubrel &pubrel)
virtual void onPubrec(const iot::mqtt::packets::Pubrec &pubrec)
virtual void onPubrel(const iot::mqtt::packets::Pubrel &pubrel)
void send(const iot::mqtt::ControlPacket &controlPacket) const
virtual bool onSignal(int sig)=0
void initSession(Session *session, utils::Timeval keepAlive)
Mqtt & operator=(const Mqtt &)=delete
void printVP(const iot::mqtt::ControlPacket &packet) const
iot::mqtt::ControlPacketDeserializer * controlPacketDeserializer
void sendPubcomp(uint16_t packetIdentifier) const
void sendPubrec(uint16_t packetIdentifier) const
void _onPubcomp(const iot::mqtt::packets::Pubcomp &pubcomp)
void _onPuback(const iot::mqtt::packets::Puback &puback)
void _onPublish(const iot::mqtt::client::packets::Publish &publish)
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)
iot::mqtt::Session session
std::string sessionStoreFileName
Mqtt(const std::string &connectionName, const std::string &clientId, const std::string &sessionStoreFileName)
void _onPingresp(const iot::mqtt::client::packets::Pingresp &pingresp)
virtual void onConnack(const iot::mqtt::packets::Connack &connack)
virtual void onPingresp(const iot::mqtt::packets::Pingresp &pingresp)
void sendSubscribe(const std::list< Topic > &topics)
iot::mqtt::ControlPacketDeserializer * createControlPacketDeserializer(iot::mqtt::FixedHeader &fixedHeader) final
void _onSuback(const iot::mqtt::client::packets::Suback &suback)
virtual void onUnsuback(const iot::mqtt::packets::Unsuback &unsuback)
void _onConnack(const iot::mqtt::client::packets::Connack &connack)
void _onUnsuback(const iot::mqtt::client::packets::Unsuback &unsuback)
void sendUnsubscribe(const std::list< std::string > &topics)
bool onSignal(int sig) override
virtual void onSuback(const iot::mqtt::packets::Suback &suback)
void deliverPacket(iot::mqtt::ControlPacketDeserializer *controlPacketDeserializer) override
void sendDisconnect() const
core::timer::Timer pingTimer
iot::mqtt::types::UInt16 packetIdentifier
uint16_t getPacketIdentifier() const
std::vector< char > serializeVP() const override
Puback(uint16_t packetIdentifier)
uint16_t getPacketIdentifier() const
Pubcomp(uint16_t packetIdentifier)
std::vector< char > serializeVP() const override
iot::mqtt::types::UInt16 packetIdentifier
Pubrec(uint16_t packetIdentifier)
iot::mqtt::types::UInt16 packetIdentifier
std::vector< char > serializeVP() const override
uint16_t getPacketIdentifier() const
iot::mqtt::types::UInt16 packetIdentifier
Pubrel(uint16_t packetIdentifier)
uint16_t getPacketIdentifier() const
std::vector< char > serializeVP() const override
UInt8 & operator=(const uint8_t &newValue)
UInt8(UInt8 &&) noexcept=default
UInt8 & operator=(UInt8 &&) noexcept=default
UInt8 & operator=(const UInt8 &)=default
UInt8(const UInt8 &)=default
UIntV & operator=(UIntV &&) noexcept=default
std::size_t deserialize(iot::mqtt::MqttContext *mqttContext) override
UIntV & operator=(const uint32_t &newValue)
operator uint32_t() const
UIntV(UIntV &&) noexcept=default
UIntV(const UIntV &)=default
UIntV & operator=(const UIntV &)=default
void reset(std::size_t size=sizeof(ValueType)) override
#define MQTT_CONNACK_ACCEPT