mqtt_client.h
MqttClientPublishCallback publishCallback
PUBLISH message received callback.
Definition: mqtt_client.h:280
void(* MqttClientPubAckCallback)(MqttClientContext *context, uint16_t packetId)
PUBACK message received callback.
Definition: mqtt_client.h:195
MqttClientPubAckCallback pubAckCallback
PUBACK message received callback.
Definition: mqtt_client.h:281
error_t(* MqttClientTlsInitCallback)(MqttClientContext *context, TlsContext *tlsContext)
TLS initialization callback.
Definition: mqtt_client.h:253
error_t mqttClientTask(MqttClientContext *context, systime_t timeout)
Process MQTT client events.
Definition: mqtt_client.c:1076
void mqttClientDeinit(MqttClientContext *context)
Release MQTT client context.
Definition: mqtt_client.c:1229
WebSocket API (client and server)
error_t mqttClientInit(MqttClientContext *context)
Initialize MQTT client context.
Definition: mqtt_client.c:52
MqttClientPubAckCallback subAckCallback
SUBACK message received callback.
Definition: mqtt_client.h:285
void(* MqttClientPubRelCallback)(MqttClientContext *context, uint16_t packetId)
PUBREL message received callback.
Definition: mqtt_client.h:211
MqttClientPubAckCallback unsubAckCallback
UNSUBACK message received callback.
Definition: mqtt_client.h:286
error_t mqttClientSetIdentifier(MqttClientContext *context, const char_t *clientId)
Set client identifier.
Definition: mqtt_client.c:329
MqttClientPubAckCallback pubRecCallback
PUBREC message received callback.
Definition: mqtt_client.h:282
void(* MqttClientPubRecCallback)(MqttClientContext *context, uint16_t packetId)
PUBREC message received callback.
Definition: mqtt_client.h:203
error_t mqttClientSetTimeout(MqttClientContext *context, systime_t timeout)
Set communication timeout.
Definition: mqtt_client.c:231
error_t mqttClientUnsubscribe(MqttClientContext *context, const char_t *topic, uint16_t *packetId)
Unsubscribe from topic.
Definition: mqtt_client.c:850
void(* MqttClientConnAckCallback)(MqttClientContext *context, uint8_t connectAckFlags, uint8_t connectReturnCode)
CONNACK message received callback.
Definition: mqtt_client.h:178
error_t mqttClientProcessEvents(MqttClientContext *context, systime_t timeout)
Process MQTT client events.
Definition: mqtt_client_misc.c:67
error_t mqttClientConnect(MqttClientContext *context, const IpAddr *serverIpAddr, uint16_t serverPort, bool_t cleanSession)
Establish connection with the MQTT server.
Definition: mqtt_client.c:471
error_t mqttClientClose(MqttClientContext *context)
Close the connection with the MQTT server.
Definition: mqtt_client.c:1208
void(* MqttClientSubAckCallback)(MqttClientContext *context, uint16_t packetId)
SUBACK message received callback.
Definition: mqtt_client.h:227
error_t mqttClientRegisterTlsInitCallback(MqttClientContext *context, MqttClientTlsInitCallback callback)
Register TLS initialization callback function.
Definition: mqtt_client.c:184
error_t mqttClientSetVersion(MqttClientContext *context, MqttVersion version)
Set the MQTT protocol version to be used.
Definition: mqtt_client.c:138
MqttClientPingRespCallback pingRespCallback
PINGRESP message received callback.
Definition: mqtt_client.h:287
MqttClientConnAckCallback connAckCallback
CONNACK message received callback.
Definition: mqtt_client.h:279
error_t mqttClientPublish(MqttClientContext *context, const char_t *topic, const void *message, size_t length, MqttQosLevel qos, bool_t retain, uint16_t *packetId)
Publish message.
Definition: mqtt_client.c:609
MqttClientPubAckCallback pubRelCallback
PUBREL message received callback.
Definition: mqtt_client.h:283
General definitions for cryptographic algorithms.
error_t mqttClientSetTransportProtocol(MqttClientContext *context, MqttTransportProtocol transportProtocol)
Set the transport protocol to be used.
Definition: mqtt_client.c:160
error_t mqttClientPing(MqttClientContext *context, systime_t *rtt)
Send ping request.
Definition: mqtt_client.c:962
error_t mqttClientSetUri(MqttClientContext *context, const char_t *uri)
Set the name of the resource being requested.
Definition: mqtt_client.c:302
Definitions common to MQTT client and server.
void(* MqttClientPingRespCallback)(MqttClientContext *context)
PINGRESP message received callback.
Definition: mqtt_client.h:243
error_t mqttClientSetAuthInfo(MqttClientContext *context, const char_t *username, const char_t *password)
Set authentication information.
Definition: mqtt_client.c:356
error_t mqttClientSetWillMessage(MqttClientContext *context, const char_t *topic, const void *message, size_t length, MqttQosLevel qos, bool_t retain)
Specify the Will message.
Definition: mqtt_client.c:392
void mqttClientInitCallbacks(MqttClientCallbacks *callbacks)
Initialize callback structure.
Definition: mqtt_client.c:102
error_t mqttClientRegisterPublishCallback(MqttClientContext *context, MqttClientPublishCallback callback)
Register publish callback function.
Definition: mqtt_client.c:209
error_t mqttClientSetKeepAlive(MqttClientContext *context, uint16_t keepAlive)
Set keep-alive value.
Definition: mqtt_client.c:254
error_t mqttClientBindToInterface(MqttClientContext *context, NetInterface *interface)
Bind the MQTT client to a particular network interface.
Definition: mqtt_client.c:445
MqttClientPubAckCallback pubCompCallback
PUBCOMP message received callback.
Definition: mqtt_client.h:284
void(* MqttClientPublishCallback)(MqttClientContext *context, const char_t *topic, const uint8_t *message, size_t length, bool_t dup, MqttQosLevel qos, bool_t retain, uint16_t packetId)
PUBLISH message received callback.
Definition: mqtt_client.h:186
void(* MqttClientUnsubAckCallback)(MqttClientContext *context, uint16_t packetId)
UNSUBACK message received callback.
Definition: mqtt_client.h:235
TLS (Transport Layer Security)
void(* MqttClientPubCompCallback)(MqttClientContext *context, uint16_t packetId)
PUBCOMP message received callback.
Definition: mqtt_client.h:219
error_t mqttClientSubscribe(MqttClientContext *context, const char_t *topic, MqttQosLevel qos, uint16_t *packetId)
Subscribe to topic.
Definition: mqtt_client.c:737
#define MQTT_CLIENT_MAX_WILL_PAYLOAD_LEN
Definition: mqtt_client.h:117
TCP/IP stack core.
error_t mqttClientSetHost(MqttClientContext *context, const char_t *host)
Set the domain name of the server (for virtual hosting)
Definition: mqtt_client.c:275
error_t mqttClientDisconnect(MqttClientContext *context)
Gracefully disconnect from the MQTT server.
Definition: mqtt_client.c:1105
error_t mqttClientRegisterCallbacks(MqttClientContext *context, const MqttClientCallbacks *callbacks)
Register MQTT client callbacks.
Definition: mqtt_client.c:116