32 #ifndef _AWS_MQTT_AGENT_H_ 33 #define _AWS_MQTT_AGENT_H_ 42 #include "aws_lib_init.h" 128 #define mqttagentURL_IS_IP_ADDRESS 0x00000001 129 #define mqttagentREQUIRE_TLS 0x00000002 130 #define mqttagentUSE_AWS_IOT_ALPN_443 0x00000004 135 typedef struct MQTTAgentConnectParams 159 #if( mqttconfigENABLE_SUBSCRIPTION_MANAGEMENT == 1 ) 160 void * pvPublishCallbackContext;
161 MQTTPublishCallback_t pxPublishCallback;
247 TickType_t xTimeoutTicks );
264 TickType_t xTimeoutTicks );
302 TickType_t xTimeoutTicks );
321 TickType_t xTimeoutTicks );
340 TickType_t xTimeoutTicks );
357 MQTTBufferHandle_t xBufferHandle );
struct MQTTAgentSubscribeParams MQTTAgentSubscribeParams_t
Parameters passed to the MQTT_AGENT_Subscribe API.
struct MQTTAgentPublishParams MQTTAgentPublishParams_t
Parameters passed to the MQTT_AGENT_Publish API.
struct MQTTAgentConnectParams MQTTAgentConnectParams_t
Parameters passed to the MQTT_AGENT_Connect API.
MQTTAgentReturnCode_t MQTT_AGENT_Delete(MQTTAgentHandle_t xMQTTHandle)
Deletes the already created MQTT client.
MQTTAgentReturnCode_t MQTT_AGENT_ReturnBuffer(MQTTAgentHandle_t xMQTTHandle, MQTTBufferHandle_t xBufferHandle)
Returns the buffer provided in the publish callback.
The data sent by the MQTT library in the user supplied callback when a publish message from the broke...
void * MQTTAgentHandle_t
Opaque handle to represent an MQTT client.
MQTTQoS_t
Quality of Service (QoS).
struct MQTTAgentCallbackParams MQTTAgentCallbackParams_t
Passed by the library in the callback to inform the user of various events.
MQTTAgentEvent_t xMQTTEvent
MQTTAgentReturnCode_t MQTT_AGENT_Subscribe(MQTTAgentHandle_t xMQTTHandle, const MQTTAgentSubscribeParams_t *const pxSubscribeParams, TickType_t xTimeoutTicks)
Subscribes to a given topic.
const uint8_t * pucClientId
MQTTAgentReturnCode_t MQTT_AGENT_Publish(MQTTAgentHandle_t xMQTTHandle, const MQTTAgentPublishParams_t *const pxPublishParams, TickType_t xTimeoutTicks)
Publishes a message to a given topic.
MQTT Core Library interface.
BaseType_t(* MQTTAgentCallback_t)(void *pvUserData, const MQTTAgentCallbackParams_t *const pxCallbackParams)
Signature of the callback registered by the user to get notified of various events.
uint16_t usClientIdLength
Parameters passed to the MQTT_AGENT_Publish API.
Passed by the library in the callback to inform the user of various events.
MQTTAgentReturnCode_t MQTT_AGENT_Unsubscribe(MQTTAgentHandle_t xMQTTHandle, const MQTTAgentUnsubscribeParams_t *const pxUnsubscribeParams, TickType_t xTimeoutTicks)
Unsubscribes from a given topic.
uint32_t ulCertificateSize
BaseType_t xSecuredConnection
struct MQTTAgentUnsubscribeParams MQTTAgentUnsubscribeParams_t
Parameters passed to the MQTT_AGENT_Unsubscribe API.
Parameters passed to the MQTT_AGENT_Connect API.
MQTTAgentReturnCode_t MQTT_AGENT_Create(MQTTAgentHandle_t *const pxMQTTHandle)
Creates a new MQTT client.
MQTTAgentReturnCode_t MQTT_AGENT_Disconnect(MQTTAgentHandle_t xMQTTHandle, TickType_t xTimeoutTicks)
Disconnects the connection with the MQTT broker.
Parameters passed to the MQTT_AGENT_Unsubscribe API.
Parameters passed to the MQTT_AGENT_Subscribe API.
MQTTAgentReturnCode_t
Return codes.
MQTTPublishData_t xPublishData
MQTTAgentReturnCode_t MQTT_AGENT_Connect(MQTTAgentHandle_t xMQTTHandle, const MQTTAgentConnectParams_t *const pxConnectParams, TickType_t xTimeoutTicks)
Establishes a connection with the MQTT broker.
MQTTAgentCallback_t pxCallback
lib_initDECLARE_LIB_INIT(MQTT_AGENT_Init)
MQTT library Init function.
MQTTAgentEvent_t
Various events reported by the library in the callback.
BaseType_t xURLIsIPAddress