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

#include <Suback.h>

Inheritance diagram for iot::mqtt::packets::Suback:
Collaboration diagram for iot::mqtt::packets::Suback:

Public Member Functions

 Suback ()
 
 Suback (uint16_t packetIdentifier, const std::list< uint8_t > &returnCodes)
 
uint16_t getPacketIdentifier () const
 
const std::list< uint8_t > & getReturnCodes () 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
 
uint8_t getType () const
 
uint8_t getFlags () const
 

Protected Attributes

iot::mqtt::types::UInt16 packetIdentifier
 
iot::mqtt::types::UInt8 returnCode
 
std::list< uint8_t > returnCodes
 
int state = 0
 
- Protected Attributes inherited from iot::mqtt::ControlPacket
uint8_t flags = 0
 

Private Member Functions

std::vector< char > serializeVP () const override
 

Detailed Description

Definition at line 58 of file Suback.h.

Constructor & Destructor Documentation

◆ Suback() [1/2]

iot::mqtt::packets::Suback::Suback ( )

Definition at line 53 of file Suback.cpp.

55 }
#define MQTT_SUBACK
Definition Suback.h:58

References iot::mqtt::ControlPacket::ControlPacket().

Referenced by Suback().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Suback() [2/2]

iot::mqtt::packets::Suback::Suback ( uint16_t  packetIdentifier,
const std::list< uint8_t > &  returnCodes 
)

Definition at line 57 of file Suback.cpp.

58 : Suback() {
61 }
iot::mqtt::types::UInt16 packetIdentifier
Definition Suback.h:71
std::list< uint8_t > returnCodes
Definition Suback.h:73

References iot::mqtt::types::UInt16::operator=(), packetIdentifier, returnCodes, and Suback().

Referenced by iot::mqtt::server::Mqtt::sendSuback().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ getPacketIdentifier()

uint16_t iot::mqtt::packets::Suback::getPacketIdentifier ( ) const

Definition at line 71 of file Suback.cpp.

71 {
72 return packetIdentifier;
73 }

References packetIdentifier.

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

Here is the caller graph for this function:

◆ getReturnCodes()

const std::list< uint8_t > & iot::mqtt::packets::Suback::getReturnCodes ( ) const

Definition at line 75 of file Suback.cpp.

75 {
76 return returnCodes;
77 }

References returnCodes.

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

Here is the caller graph for this function:

◆ serializeVP()

std::vector< char > iot::mqtt::packets::Suback::serializeVP ( ) const
overrideprivatevirtual

Implements iot::mqtt::ControlPacket.

Definition at line 63 of file Suback.cpp.

63 {
64 std::vector<char> packet(packetIdentifier.serialize());
65
66 packet.insert(packet.end(), returnCodes.begin(), returnCodes.end());
67
68 return packet;
69 }
virtual std::vector< char > serialize() const
Definition TypeBase.hpp:83

References packetIdentifier, returnCodes, and iot::mqtt::types::TypeBase< ValueTypeT >::serialize().

Here is the call graph for this function:

Member Data Documentation

◆ packetIdentifier

iot::mqtt::types::UInt16 iot::mqtt::packets::Suback::packetIdentifier
protected

◆ returnCode

iot::mqtt::types::UInt8 iot::mqtt::packets::Suback::returnCode
protected

Definition at line 72 of file Suback.h.

Referenced by iot::mqtt::client::packets::Suback::deserializeVP().

◆ returnCodes

std::list<uint8_t> iot::mqtt::packets::Suback::returnCodes
protected

◆ state

int iot::mqtt::packets::Suback::state = 0
protected

Definition at line 75 of file Suback.h.


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