SNode.C
Loading...
Searching...
No Matches
iot::mqtt::client::packets::Pubrel Class Reference

#include <Pubrel.h>

Inheritance diagram for iot::mqtt::client::packets::Pubrel:
Collaboration diagram for iot::mqtt::client::packets::Pubrel:

Public Member Functions

 Pubrel (uint32_t remainingLength, uint8_t flags)
Public Member Functions inherited from iot::mqtt::packets::Pubrel
 Pubrel ()
 Pubrel (uint16_t packetIdentifier)
uint16_t getPacketIdentifier () const
Public Member Functions inherited from iot::mqtt::ControlPacket
 ControlPacket (uint8_t type, const std::string &name)
 ControlPacket (const ControlPacket &)=default
 ControlPacket (ControlPacket &&)=default
virtual ~ControlPacket ()
ControlPacketoperator= (const ControlPacket &)=default
ControlPacketoperator= (ControlPacket &&)=default
std::vector< char > serialize () const
const std::string & getName () const
Public Member Functions inherited from iot::mqtt::client::ControlPacketDeserializer
 ~ControlPacketDeserializer () override
 ControlPacketDeserializer ()=default
 ControlPacketDeserializer (uint32_t remainingLength, uint8_t flags, uint8_t mustFlags)
Public Member Functions inherited from iot::mqtt::ControlPacketDeserializer
 ControlPacketDeserializer ()=default
 ControlPacketDeserializer (uint32_t remainingLength, uint8_t flags, uint8_t mustFlags)
ControlPacketDeserializeroperator= (const ControlPacketDeserializer &)=default
std::size_t deserialize (iot::mqtt::MqttContext *mqttContext)
uint32_t getRemainingLength () const
bool isComplete () const
bool isError () const
std::size_t getConsumed () const

Private Member Functions

std::size_t deserializeVP (iot::mqtt::MqttContext *mqttContext) override
void deliverPacket (iot::mqtt::client::Mqtt *mqtt) override

Additional Inherited Members

Protected Member Functions inherited from iot::mqtt::ControlPacket
uint8_t getType () const
uint8_t getFlags () const
Protected Attributes inherited from iot::mqtt::packets::Pubrel
iot::mqtt::types::UInt16 packetIdentifier
Protected Attributes inherited from iot::mqtt::ControlPacket
uint8_t flags = 0
Protected Attributes inherited from iot::mqtt::ControlPacketDeserializer
bool complete = false
bool error = false
uint32_t remainingLength = 0
std::size_t consumed = 0

Detailed Description

Definition at line 57 of file Pubrel.h.

Constructor & Destructor Documentation

◆ Pubrel()

iot::mqtt::client::packets::Pubrel::Pubrel ( uint32_t remainingLength,
uint8_t flags )

Definition at line 52 of file Pubrel.cpp.

53 : iot::mqtt::client::ControlPacketDeserializer(remainingLength, flags, MQTT_PUBREL_FLAGS) {
54 this->flags = flags;
55 }
#define MQTT_PUBREL_FLAGS

References iot::mqtt::ControlPacket::flags.

Referenced by iot::mqtt::client::Mqtt::createControlPacketDeserializer().

Here is the caller graph for this function:

Member Function Documentation

◆ deliverPacket()

void iot::mqtt::client::packets::Pubrel::deliverPacket ( iot::mqtt::client::Mqtt * mqtt)
overrideprivatevirtual

Implements iot::mqtt::client::ControlPacketDeserializer.

Definition at line 67 of file Pubrel.cpp.

67 {
68 mqtt->printVP(*this);
69 mqtt->_onPubrel(*this);
70 }
void _onPubrel(const iot::mqtt::packets::Pubrel &pubrel)
Definition Mqtt.cpp:337
void printVP(const iot::mqtt::ControlPacket &packet) const
Definition Mqtt.cpp:368

References iot::mqtt::Mqtt::_onPubrel(), and iot::mqtt::Mqtt::printVP().

Here is the call graph for this function:

◆ deserializeVP()

std::size_t iot::mqtt::client::packets::Pubrel::deserializeVP ( iot::mqtt::MqttContext * mqttContext)
overrideprivatevirtual

Implements iot::mqtt::ControlPacketDeserializer.

Definition at line 57 of file Pubrel.cpp.

57 {
58 // V-Header
59 const std::size_t consumed = packetIdentifier.deserialize(mqttContext);
60 complete = packetIdentifier.isComplete();
61
62 // no Payload
63
64 return consumed;
65 }
iot::mqtt::types::UInt16 packetIdentifier
Definition Pubrel.h:68

References iot::mqtt::ControlPacketDeserializer::complete, iot::mqtt::types::TypeBase< ValueTypeT >::deserialize(), iot::mqtt::types::TypeBase< ValueTypeT >::isComplete(), and iot::mqtt::packets::Pubrel::packetIdentifier.

Here is the call graph for this function:

The documentation for this class was generated from the following files: