this is fork and i will modify for STM32
Fork of AWS-test by
aws_iot_mqtt_client.h File Reference
Client definition for MQTT. More...
Go to the source code of this file.
Data Structures | |
struct | IoT_Publish_Message_Params |
Publish Message Parameters Type. More... | |
struct | IoT_MQTT_Will_Options |
Last Will and Testament Definition. More... | |
struct | IoT_Client_Connect_Params |
MQTT Connection Parameters. More... | |
struct | IoT_Client_Init_Params |
MQTT Initialization Parameters. More... | |
struct | _MessageHandlers |
MQTT Message Handler. More... | |
struct | _ClientStatus |
MQTT Client Status. More... | |
struct | _ClientData |
MQTT Client Data. More... | |
struct | _Client |
MQTT Client. More... | |
Typedefs | |
typedef enum QoS | QoS |
Quality of Service Type. | |
typedef void(* | iot_disconnect_handler )(AWS_IoT_Client *, void *) |
Disconnect Callback Handler Type. | |
typedef enum _ClientState | ClientState |
MQTT Client State Type. | |
typedef void(* | pApplicationHandler_t )(AWS_IoT_Client *pClient, char *pTopicName, uint16_t topicNameLen, IoT_Publish_Message_Params *pParams, void *pClientData) |
Application Callback Handler Type. | |
typedef struct _MessageHandlers | MessageHandlers |
MQTT Message Handler. | |
typedef struct _ClientStatus | ClientStatus |
MQTT Client Status. | |
typedef struct _ClientData | ClientData |
MQTT Client Data. | |
Enumerations | |
enum | QoS |
Quality of Service Type. More... | |
enum | MQTT_Ver_t { MQTT_3_1_1 = 4 } |
MQTT Version Type. More... | |
enum | _ClientState |
MQTT Client State Type. More... | |
Functions | |
uint16_t | aws_iot_mqtt_get_next_packet_id (AWS_IoT_Client *pClient) |
What is the next available packet Id. | |
IoT_Error_t | aws_iot_mqtt_set_connect_params (AWS_IoT_Client *pClient, IoT_Client_Connect_Params *pNewConnectParams) |
Set the connection parameters for the IoT Client. | |
bool | aws_iot_mqtt_is_client_connected (AWS_IoT_Client *pClient) |
Is the MQTT client currently connected? | |
ClientState | aws_iot_mqtt_get_client_state (AWS_IoT_Client *pClient) |
Get the current state of the client. | |
bool | aws_iot_is_autoreconnect_enabled (AWS_IoT_Client *pClient) |
Is the MQTT client set to reconnect automatically? | |
IoT_Error_t | aws_iot_mqtt_set_disconnect_handler (AWS_IoT_Client *pClient, iot_disconnect_handler pDisconnectHandler, void *pDisconnectHandlerData) |
Set the IoT Client disconnect handler. | |
IoT_Error_t | aws_iot_mqtt_autoreconnect_set_status (AWS_IoT_Client *pClient, bool newStatus) |
Enable or Disable AutoReconnect on Network Disconnect. | |
uint32_t | aws_iot_mqtt_get_network_disconnected_count (AWS_IoT_Client *pClient) |
Get count of Network Disconnects. | |
void | aws_iot_mqtt_reset_network_disconnected_count (AWS_IoT_Client *pClient) |
Reset Network Disconnect conter. |
Detailed Description
Client definition for MQTT.
Definition in file aws_iot_mqtt_client.h.
Typedef Documentation
typedef struct _ClientData ClientData |
MQTT Client Data.
Defining a type for MQTT Client Data Contains data used by the MQTT Client
typedef enum _ClientState ClientState |
MQTT Client State Type.
Defining a type for MQTT Client State
typedef struct _ClientStatus ClientStatus |
MQTT Client Status.
Defining a type for MQTT Client Status Contains information about the state of the MQTT Client
typedef void(* iot_disconnect_handler)(AWS_IoT_Client *, void *) |
Disconnect Callback Handler Type.
Defining a TYPE for definition of disconnect callback function pointers.
Definition at line 156 of file aws_iot_mqtt_client.h.
typedef struct _MessageHandlers MessageHandlers |
MQTT Message Handler.
Defining a type for MQTT Message Handlers. Used to pass incoming data back to the application
typedef void(* pApplicationHandler_t)(AWS_IoT_Client *pClient, char *pTopicName, uint16_t topicNameLen, IoT_Publish_Message_Params *pParams, void *pClientData) |
Application Callback Handler Type.
Defining a TYPE for definition of application callback function pointers. Used to send incoming data to the application
Definition at line 220 of file aws_iot_mqtt_client.h.
Quality of Service Type.
Defining a QoS type.
- Note:
- QoS 2 is NOT supported by the AWS IoT Service at the time of this SDK release.
Enumeration Type Documentation
enum _ClientState |
MQTT Client State Type.
Defining a type for MQTT Client State
Definition at line 196 of file aws_iot_mqtt_client.h.
enum MQTT_Ver_t |
MQTT Version Type.
Defining an MQTT version type. Only 3.1.1 is supported at this time
Definition at line 101 of file aws_iot_mqtt_client.h.
enum QoS |
Quality of Service Type.
Defining a QoS type.
- Note:
- QoS 2 is NOT supported by the AWS IoT Service at the time of this SDK release.
Definition at line 75 of file aws_iot_mqtt_client.h.
Function Documentation
bool aws_iot_is_autoreconnect_enabled | ( | AWS_IoT_Client * | pClient ) |
Is the MQTT client set to reconnect automatically?
Called to determine if the MQTT client is set to reconnect automatically. Used to support logic in the device application around reconnecting
- Parameters:
-
pClient Reference to the IoT Client
- Returns:
- true = enabled, false = disabled
Definition at line 268 of file aws_iot_mqtt_client.cpp.
IoT_Error_t aws_iot_mqtt_autoreconnect_set_status | ( | AWS_IoT_Client * | pClient, |
bool | newStatus | ||
) |
Enable or Disable AutoReconnect on Network Disconnect.
Called to enable or disabled the auto reconnect features provided with the SDK
- Parameters:
-
pClient Reference to the IoT Client newStatus set to true for enabling and false for disabling
- Returns:
- IoT_Error_t Type defining successful/failed API call
Definition at line 278 of file aws_iot_mqtt_client.cpp.
ClientState aws_iot_mqtt_get_client_state | ( | AWS_IoT_Client * | pClient ) |
Get the current state of the client.
Called to get the current state of the client
- Parameters:
-
pClient Reference to the IoT Client
- Returns:
- ClientState value equal to the current state of the client
Definition at line 53 of file aws_iot_mqtt_client.cpp.
uint32_t aws_iot_mqtt_get_network_disconnected_count | ( | AWS_IoT_Client * | pClient ) |
Get count of Network Disconnects.
Called to get the number of times a network disconnect occurred due to errors
- Parameters:
-
pClient Reference to the IoT Client
- Returns:
- uint32_t the disconnect count
Definition at line 299 of file aws_iot_mqtt_client.cpp.
uint16_t aws_iot_mqtt_get_next_packet_id | ( | AWS_IoT_Client * | pClient ) |
What is the next available packet Id.
Called to retrieve the next packet id to be used for outgoing packets. Automatically increments the last sent packet id variable
- Parameters:
-
pClient Reference to the IoT Client
- Returns:
- next packet id as a 16 bit unsigned integer
Definition at line 226 of file aws_iot_mqtt_client.cpp.
bool aws_iot_mqtt_is_client_connected | ( | AWS_IoT_Client * | pClient ) |
Is the MQTT client currently connected?
Called to determine if the MQTT client is currently connected. Used to support logic in the device application around reconnecting and managing offline state.
- Parameters:
-
pClient Reference to the IoT Client
- Returns:
- true = connected, false = not currently connected
Definition at line 231 of file aws_iot_mqtt_client.cpp.
void aws_iot_mqtt_reset_network_disconnected_count | ( | AWS_IoT_Client * | pClient ) |
Reset Network Disconnect conter.
Called to reset the Network Disconnect counter to zero
- Parameters:
-
pClient Reference to the IoT Client
Definition at line 303 of file aws_iot_mqtt_client.cpp.
IoT_Error_t aws_iot_mqtt_set_connect_params | ( | AWS_IoT_Client * | pClient, |
IoT_Client_Connect_Params * | pNewConnectParams | ||
) |
Set the connection parameters for the IoT Client.
Called to set the connection parameters for the IoT Client. Used to update the connection parameters provided before the last connect. Won't take effect until the next time connect is called
- Parameters:
-
pClient Reference to the IoT Client pNewConnectParams Reference to the new Connection Parameters structure
- Returns:
- IoT_Error_t Type defining successful/failed API call
Definition at line 129 of file aws_iot_mqtt_client.cpp.
IoT_Error_t aws_iot_mqtt_set_disconnect_handler | ( | AWS_IoT_Client * | pClient, |
iot_disconnect_handler | pDisconnectHandler, | ||
void * | pDisconnectHandlerData | ||
) |
Set the IoT Client disconnect handler.
Called to set the IoT Client disconnect handler The disconnect handler is called whenever the client disconnects with error
- Parameters:
-
pClient Reference to the IoT Client pConnectHandler Reference to the new Disconnect Handler pDisconnectHandlerData Reference to the data to be passed as argument when disconnect handler is called
- Returns:
- IoT_Error_t Type defining successful/failed API call
Definition at line 287 of file aws_iot_mqtt_client.cpp.
Generated on Tue Jul 12 2022 11:16:38 by 1.7.2