|
AWS IoT Device SDK C++ v2 1.44.2
AWS IoT Device SDK C++ v2
|
#include <Mqtt5Packets.h>
Public Member Functions | |
| ConnectPacket (Allocator *allocator=ApiAllocator()) noexcept | |
| PacketType | getType () override |
| ConnectPacket & | WithKeepAliveIntervalSec (uint16_t keepAliveInteralSeconds) noexcept |
| ConnectPacket & | WithClientId (Crt::String clientId) noexcept |
| ConnectPacket & | WithUserName (Crt::String username) noexcept |
| ConnectPacket & | WithPassword (ByteCursor password) noexcept |
| ConnectPacket & | WithSessionExpiryIntervalSec (uint32_t sessionExpiryIntervalSeconds) noexcept |
| ConnectPacket & | WithRequestResponseInformation (bool requestResponseInformation) noexcept |
| ConnectPacket & | WithRequestProblemInformation (bool requestProblemInformation) noexcept |
| ConnectPacket & | WithReceiveMaximum (uint16_t receiveMaximum) noexcept |
| ConnectPacket & | WithMaximumPacketSizeBytes (uint32_t maximumPacketSizeBytes) noexcept |
| ConnectPacket & | WithWillDelayIntervalSec (uint32_t willDelayIntervalSeconds) noexcept |
| ConnectPacket & | WithWill (std::shared_ptr< PublishPacket > will) noexcept |
| ConnectPacket & | WithUserProperties (const Vector< UserProperty > &userProperties) noexcept |
| ConnectPacket & | WithUserProperties (Vector< UserProperty > &&userProperties) noexcept |
| ConnectPacket & | WithUserProperty (UserProperty &&property) noexcept |
| uint16_t | getKeepAliveIntervalSec () const noexcept |
| const Crt::String & | getClientId () const noexcept |
| const Crt::Optional< Crt::String > & | getUsername () const noexcept |
| const Crt::Optional< Crt::ByteCursor > & | getPassword () const noexcept |
| const Crt::Optional< uint32_t > & | getSessionExpiryIntervalSec () const noexcept |
| const Crt::Optional< bool > & | getRequestResponseInformation () const noexcept |
| const Crt::Optional< bool > & | getRequestProblemInformation () const noexcept |
| const Crt::Optional< uint16_t > & | getReceiveMaximum () const noexcept |
| const Crt::Optional< uint32_t > & | getMaximumPacketSizeBytes () const noexcept |
| const Crt::Optional< uint32_t > & | getMaximumPacketSizeToServer () const noexcept |
| const Crt::Optional< uint32_t > & | getWillDelayIntervalSec () const noexcept |
| const Crt::Optional< std::shared_ptr< PublishPacket > > & | getWill () const noexcept |
| const Crt::Vector< UserProperty > & | getUserProperties () const noexcept |
| bool | initializeRawOptions (aws_mqtt5_packet_connect_view &raw_options, Allocator *allocator) noexcept |
| virtual | ~ConnectPacket () |
| ConnectPacket (const ConnectPacket &)=delete | |
| ConnectPacket (ConnectPacket &&) noexcept=delete | |
| ConnectPacket & | operator= (const ConnectPacket &)=delete |
| ConnectPacket & | operator= (ConnectPacket &&) noexcept=delete |
| Public Member Functions inherited from Aws::Crt::Mqtt5::IPacket | |
| virtual | ~IPacket ()=default |
Data model of an MQTT5 CONNECT packet.
|
noexcept |
|
virtual |
|
delete |
|
deletenoexcept |
|
noexcept |
A unique string identifying the client to the server. Used to restore session state between connections.
If left empty, the broker will auto-assign a unique client id. When reconnecting, the mqtt5 client will always use the auto-assigned client id.
|
noexcept |
The maximum time interval, in seconds, that is permitted to elapse between the point at which the client finishes transmitting one MQTT packet and the point it starts sending the next. The client will use PINGREQ packets to maintain this property.
If the responding CONNACK contains a keep alive property value, then that is the negotiated keep alive value. Otherwise, the keep alive sent by the client is the negotiated value.
See MQTT5 Keep Alive
|
noexcept |
Notifies the server of the maximum packet size the client is willing to handle. If omitted or null, then no limit beyond the natural limits of MQTT packet size is requested.
|
noexcept |
Notifies the server of the maximum packet size the client is willing to handle. If omitted or null, then no limit beyond the natural limits of MQTT packet size is requested.
|
noexcept |
Opaque binary data that the server may use for client authentication and authorization.
See MQTT5 Password
|
noexcept |
Notifies the server of the maximum number of in-flight QoS 1 and 2 messages the client is willing to handle. If omitted or null, then no limit is requested.
|
noexcept |
If true, requests that the server send additional diagnostic information (via response string or user properties) in DISCONNECT or CONNACK packets from the server.
See MQTT5 Request Problem Information
|
noexcept |
If true, requests that the server send response information in the subsequent CONNACK. This response information may be used to set up request-response implementations over MQTT, but doing so is outside the scope of the MQTT5 spec and client.
See MQTT5 Request Response Information
|
noexcept |
A time interval, in seconds, that the client requests the server to persist this connection's MQTT session state for. Has no meaning if the client has not been configured to rejoin sessions. Must be non-zero in order to successfully rejoin a session.
If the responding CONNACK contains a session expiry property value, then that is the negotiated session expiry value. Otherwise, the session expiry sent by the client is the negotiated value.
See MQTT5 Session Expiry Interval
|
inlineoverridevirtual |
Implements Aws::Crt::Mqtt5::IPacket.
|
noexcept |
A string value that the server may use for client authentication and authorization.
See MQTT5 User Name
|
noexcept |
|
noexcept |
The definition of a message to be published when the connection's session is destroyed by the server or when the will delay interval has elapsed, whichever comes first. If null, then nothing will be sent.
See MQTT5 Will
|
noexcept |
A time interval, in seconds, that the server should wait (for a session reconnection) before sending the will message associated with the connection's session. If omitted or null, the server will send the will when the associated session is destroyed. If the session is destroyed before a will delay interval has elapsed, then the will must be sent at the time of session destruction.
|
noexcept |
Intended for internal use only. Initializes the C aws_mqtt5_packet_connack_view from PacketConnect
| raw_options | - output parameter containing low level client options to be passed to the C |
| allocator | - memory Allocator |
|
deletenoexcept |
|
delete |
|
noexcept |
Sets the unique string identifying the client to the server. Used to restore session state between connections.
If left empty, the broker will auto-assign a unique client id. When reconnecting, the mqtt5 client will always use the auto-assigned client id.
| clientId | A unique string identifying the client to the server. |
|
noexcept |
Sets the maximum time interval, in seconds, that is permitted to elapse between the point at which the client finishes transmitting one MQTT packet and the point it starts sending the next. The client will use PINGREQ packets to maintain this property.
If the responding CONNACK contains a keep alive property value, then that is the negotiated keep alive value. Otherwise, the keep alive sent by the client is the negotiated value.
See MQTT5 Keep Alive
NOTE: The keepAliveIntervalSeconds HAS to be larger than the pingTimeoutMs time set in the Mqtt5ClientOptions.
| keepAliveInteralSeconds | the maximum time interval, in seconds, that is permitted to elapse between the point at which the client finishes transmitting one MQTT packet and the point it starts sending the next. |
|
noexcept |
Sets the maximum packet size the client is willing to handle. If omitted, then no limit beyond the natural limits of MQTT packet size is requested.
| maximumPacketSizeBytes | The maximum packet size the client is willing to handle |
|
noexcept |
Sets the opaque binary data that the server may use for client authentication and authorization.
See MQTT5 Password
| password | Opaque binary data that the server may use for client authentication and authorization. |
|
noexcept |
Sets the maximum number of in-flight QoS 1 and 2 messages the client is willing to handle. If omitted, then no limit is requested.
| receiveMaximum | The maximum number of in-flight QoS 1 and 2 messages the client is willing to handle. |
|
noexcept |
Sets whether requests that the server send additional diagnostic information (via response string or user properties) in DISCONNECT or CONNACK packets from the server.
See MQTT5 Request Problem Information
| requestProblemInformation | If true, requests that the server send additional diagnostic information (via response string or user properties) in DISCONNECT or CONNACK packets from the server. |
|
noexcept |
Sets whether requests that the server send response information in the subsequent CONNACK. This response information may be used to set up request-response implementations over MQTT, but doing so is outside the scope of the MQTT5 spec and client.
See MQTT5 Request Response Information
| requestResponseInformation | If true, requests that the server send response information in the subsequent CONNACK. |
|
noexcept |
Sets the time interval, in seconds, that the client requests the server to persist this connection's MQTT session state for. Has no meaning if the client has not been configured to rejoin sessions. Must be non-zero in order to successfully rejoin a session.
If the responding CONNACK contains a session expiry property value, then that is the negotiated session expiry value. Otherwise, the session expiry sent by the client is the negotiated value.
See MQTT5 Session Expiry Interval
| sessionExpiryIntervalSeconds | A time interval, in seconds, that the client requests the server to persist this connection's MQTT session state for. |
|
noexcept |
Sets the string value that the server may use for client authentication and authorization.
See MQTT5 User Name
| username | The string value that the server may use for client authentication and authorization. |
|
noexcept |
Sets the list of MQTT5 user properties included with the packet.
| userProperties | List of MQTT5 user properties included with the packet. |
|
noexcept |
Sets the list of MQTT5 user properties included with the packet.
| userProperties | List of MQTT5 user properties included with the packet. |
|
noexcept |
Put a MQTT5 user property to the back of the packet user property vector/list
| property | set of userProperty of MQTT5 user properties included with the packet. |
|
noexcept |
Sets the definition of a message to be published when the connection's session is destroyed by the server or when the will delay interval has elapsed, whichever comes first. If null, then nothing will be sent.
See MQTT5 Will
| will | The message to be published when the connection's session is destroyed by the server or when the will delay interval has elapsed, whichever comes first. |
|
noexcept |
Sets the time interval, in seconds, that the server should wait (for a session reconnection) before sending the will message associated with the connection's session. If omitted, the server will send the will when the associated session is destroyed. If the session is destroyed before a will delay interval has elapsed, then the will must be sent at the time of session destruction.
| willDelayIntervalSeconds | A time interval, in seconds, that the server should wait (for a session reconnection) before sending the will message associated with the connection's session. |