AWS IoT Device SDK C++ v2  1.34.0
AWS IoT Device SDK C++ v2
Public Member Functions | List of all members
Aws::Crt::Mqtt5::DisconnectPacket Class Reference

#include <Mqtt5Packets.h>

Inheritance diagram for Aws::Crt::Mqtt5::DisconnectPacket:
Aws::Crt::Mqtt5::IPacket

Public Member Functions

 DisconnectPacket (Allocator *allocator=ApiAllocator()) noexcept
 
 DisconnectPacket (const aws_mqtt5_packet_disconnect_view &raw_options, Allocator *allocator=ApiAllocator()) noexcept
 
PacketType getType () override
 
bool initializeRawOptions (aws_mqtt5_packet_disconnect_view &raw_options) noexcept
 
DisconnectPacketWithReasonCode (const DisconnectReasonCode reasonCode) noexcept
 
DisconnectPacketWithSessionExpiryIntervalSec (const uint32_t sessionExpiryIntervalSeconds) noexcept
 
DisconnectPacketWithReasonString (Crt::String reasonString) noexcept
 
DisconnectPacketWithServerReference (Crt::String serverReference) noexcept
 
DisconnectPacketWithUserProperties (const Vector< UserProperty > &userProperties) noexcept
 
DisconnectPacketWithUserProperties (Vector< UserProperty > &&userProperties) noexcept
 
DisconnectPacketWithUserProperty (UserProperty &&property) noexcept
 
DisconnectReasonCode getReasonCode () const noexcept
 
const Crt::Optional< uint32_t > & getSessionExpiryIntervalSec () const noexcept
 
const Crt::Optional< Crt::String > & getReasonString () const noexcept
 
const Crt::Optional< Crt::String > & getServerReference () const noexcept
 
const Crt::Vector< UserProperty > & getUserProperties () const noexcept
 
virtual ~DisconnectPacket ()
 
 DisconnectPacket (const DisconnectPacket &)=delete
 
 DisconnectPacket (DisconnectPacket &&) noexcept=delete
 
DisconnectPacketoperator= (const DisconnectPacket &)=delete
 
DisconnectPacketoperator= (DisconnectPacket &&) noexcept=delete
 

Detailed Description

Data model of an MQTT5 DISCONNECT packet.

Constructor & Destructor Documentation

◆ DisconnectPacket() [1/4]

Aws::Crt::Mqtt5::DisconnectPacket::DisconnectPacket ( Allocator allocator = ApiAllocator())
noexcept

◆ DisconnectPacket() [2/4]

Aws::Crt::Mqtt5::DisconnectPacket::DisconnectPacket ( const aws_mqtt5_packet_disconnect_view &  raw_options,
Allocator allocator = ApiAllocator() 
)
noexcept

◆ ~DisconnectPacket()

Aws::Crt::Mqtt5::DisconnectPacket::~DisconnectPacket ( )
virtual

◆ DisconnectPacket() [3/4]

Aws::Crt::Mqtt5::DisconnectPacket::DisconnectPacket ( const DisconnectPacket )
delete

◆ DisconnectPacket() [4/4]

Aws::Crt::Mqtt5::DisconnectPacket::DisconnectPacket ( DisconnectPacket &&  )
deletenoexcept

Member Function Documentation

◆ getReasonCode()

DisconnectReasonCode Aws::Crt::Mqtt5::DisconnectPacket::getReasonCode ( ) const
noexcept

Value indicating the reason that the sender is closing the connection

See MQTT5 Disconnect Reason Code

Returns
Value indicating the reason that the sender is closing the connection

◆ getReasonString()

const Crt::Optional< Crt::String > & Aws::Crt::Mqtt5::DisconnectPacket::getReasonString ( ) const
noexcept

Additional diagnostic information about the reason that the sender is closing the connection

See MQTT5 Reason String

Returns
Additional diagnostic information about the reason that the sender is closing the connection

◆ getServerReference()

const Crt::Optional< Crt::String > & Aws::Crt::Mqtt5::DisconnectPacket::getServerReference ( ) const
noexcept

Property indicating an alternate server that the client may temporarily or permanently attempt to connect to instead of the configured endpoint. Will only be set if the reason code indicates another server may be used (ServerMoved, UseAnotherServer).

See MQTT5 Server Reference

Returns
Property indicating an alternate server that the client may temporarily or permanently attempt to connect to instead of the configured endpoint.

◆ getSessionExpiryIntervalSec()

const Crt::Optional< uint32_t > & Aws::Crt::Mqtt5::DisconnectPacket::getSessionExpiryIntervalSec ( ) const
noexcept

A change to the session expiry interval negotiated at connection time as part of the disconnect. Only valid for DISCONNECT packets sent from client to server. It is not valid to attempt to change session expiry from zero to a non-zero value.

See MQTT5 Session Expiry Interval

Returns
A change to the session expiry interval negotiated at connection time as part of the disconnect.

◆ getType()

PacketType Aws::Crt::Mqtt5::DisconnectPacket::getType ( )
inlineoverridevirtual

◆ getUserProperties()

const Crt::Vector< UserProperty > & Aws::Crt::Mqtt5::DisconnectPacket::getUserProperties ( ) const
noexcept

List of MQTT5 user properties included with the packet.

See MQTT5 User Property

Returns
List of MQTT5 user properties included with the packet.

◆ initializeRawOptions()

bool Aws::Crt::Mqtt5::DisconnectPacket::initializeRawOptions ( aws_mqtt5_packet_disconnect_view &  raw_options)
noexcept

◆ operator=() [1/2]

DisconnectPacket& Aws::Crt::Mqtt5::DisconnectPacket::operator= ( const DisconnectPacket )
delete

◆ operator=() [2/2]

DisconnectPacket& Aws::Crt::Mqtt5::DisconnectPacket::operator= ( DisconnectPacket &&  )
deletenoexcept

◆ WithReasonCode()

DisconnectPacket & Aws::Crt::Mqtt5::DisconnectPacket::WithReasonCode ( const DisconnectReasonCode  reasonCode)
noexcept

Sets the value indicating the reason that the sender is closing the connection

See MQTT5 Disconnect Reason Code

Parameters
reasonCodeValue indicating the reason that the sender is closing the connection
Returns
The DisconnectPacket Object after setting the reason code.

◆ WithReasonString()

DisconnectPacket & Aws::Crt::Mqtt5::DisconnectPacket::WithReasonString ( Crt::String  reasonString)
noexcept

Sets the additional diagnostic information about the reason that the sender is closing the connection

See MQTT5 Reason String

Parameters
reasonStringAdditional diagnostic information about the reason that the sender is closing the connection
Returns
The DisconnectPacket Object after setting the reason string.

◆ WithServerReference()

DisconnectPacket & Aws::Crt::Mqtt5::DisconnectPacket::WithServerReference ( Crt::String  serverReference)
noexcept

Sets the property indicating an alternate server that the client may temporarily or permanently attempt to connect to instead of the configured endpoint. Will only be set if the reason code indicates another server may be used (ServerMoved, UseAnotherServer).

See MQTT5 Server Reference

Parameters
serverReferenceProperty indicating an alternate server that the client may temporarily or permanently attempt to connect to instead of the configured endpoint.
Returns
The DisconnectPacket Object after setting the server reference.

◆ WithSessionExpiryIntervalSec()

DisconnectPacket & Aws::Crt::Mqtt5::DisconnectPacket::WithSessionExpiryIntervalSec ( const uint32_t  sessionExpiryIntervalSeconds)
noexcept

Sets the change to the session expiry interval negotiated at connection time as part of the disconnect. Only valid for DISCONNECT packets sent from client to server. It is not valid to attempt to change session expiry from zero to a non-zero value.

See MQTT5 Session Expiry Interval

Parameters
sessionExpiryIntervalSeconds
Returns
The DisconnectPacket Object after setting the session expiry interval.

◆ WithUserProperties() [1/2]

DisconnectPacket & Aws::Crt::Mqtt5::DisconnectPacket::WithUserProperties ( const Vector< UserProperty > &  userProperties)
noexcept

Sets the list of MQTT5 user properties included with the packet.

See MQTT5 User Property

Parameters
userPropertiesList of MQTT5 user properties included with the packet.
Returns
The DisconnectPacket Object after setting the user properties.

◆ WithUserProperties() [2/2]

DisconnectPacket & Aws::Crt::Mqtt5::DisconnectPacket::WithUserProperties ( Vector< UserProperty > &&  userProperties)
noexcept

Sets the list of MQTT5 user properties included with the packet.

See MQTT5 User Property

Parameters
userPropertiesList of MQTT5 user properties included with the packet.
Returns
The DisconnectPacket Object after setting the user properties.

◆ WithUserProperty()

DisconnectPacket & Aws::Crt::Mqtt5::DisconnectPacket::WithUserProperty ( UserProperty &&  property)
noexcept

Put a MQTT5 user property to the back of the packet user property vector/list

See MQTT5 User Property

Parameters
propertyset of userProperty of MQTT5 user properties included with the packet.
Returns
The ConnectPacket Object after setting the user property

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