Crate paho_mqtt_c_sys

Source

Structs§

Constants§

Statics§

Functions§

Type Aliases§

  • Structure to hold all data for one list element
  • A handle representing an MQTT client. A valid client handle is available following a successful call to MQTTAsync_create().
  • This is a callback function, which will be called when the client library successfully connects. This is superfluous when the connection is made in response to a MQTTAsync_connect call, because the onSuccess callback can be used. It is intended for use when automatic reconnect is enabled, so that when a reconnection attempt succeeds in the background, the application is notified and can take any required actions. @param context A pointer to the context value originally passed to MQTTAsync_setCallbacks(), which contains any application-specific context. @param cause The reason for the disconnection. Currently, cause is always set to NULL.
  • This is a callback function. The client application must provide an implementation of this function to enable asynchronous notification of the loss of connection to the server. The function is registered with the client library by passing it as an argument to MQTTAsync_setCallbacks(). It is called by the client library if the client loses its connection to the server. The client application must take appropriate action, such as trying to reconnect or reporting the problem. This function is executed on a separate thread to the one on which the client application is running. @param context A pointer to the context value originally passed to MQTTAsync_setCallbacks(), which contains any application-specific context. @param cause The reason for the disconnection. Currently, cause is always set to NULL.
  • This is a callback function. The client application must provide an implementation of this function to enable asynchronous notification of delivery of messages to the server. The function is registered with the client library by passing it as an argument to MQTTAsync_setCallbacks(). It is called by the client library after the client application has published a message to the server. It indicates that the necessary handshaking and acknowledgements for the requested quality of service (see MQTTAsync_message.qos) have been completed. This function is executed on a separate thread to the one on which the client application is running. @param context A pointer to the context value originally passed to MQTTAsync_setCallbacks(), which contains any application-specific context. @param token The ::MQTTAsync_token associated with the published message. Applications can check that all messages have been correctly published by matching the tokens returned from calls to MQTTAsync_send() and MQTTAsync_sendMessage() with the tokens passed to this callback.
  • This is a callback function, which will be called when the client library receives a disconnect packet. @param context A pointer to the context value originally passed to MQTTAsync_setCallbacks(), which contains any application-specific context. @param properties the properties in the disconnect packet. @param properties the reason code from the disconnect packet Currently, cause is always set to NULL.
  • This is a callback function. The client application must provide an implementation of this function to enable asynchronous receipt of messages. The function is registered with the client library by passing it as an argument to MQTTAsync_setCallbacks(). It is called by the client library when a new message that matches a client subscription has been received from the server. This function is executed on a separate thread to the one on which the client application is running. @param context A pointer to the context value originally passed to MQTTAsync_setCallbacks(), which contains any application-specific context. @param topicName The topic associated with the received message. @param topicLen The length of the topic if there are one more NULL characters embedded in topicName, otherwise topicLen is 0. If topicLen is 0, the value returned by strlen(topicName) can be trusted. If topicLen is greater than 0, the full topic name can be retrieved by accessing topicName as a byte array of length topicLen. @param message The MQTTAsync_message structure for the received message. This structure contains the message payload and attributes. @return This function must return a boolean value indicating whether or not the message has been safely received by the client application. Returning true indicates that the message has been successfully handled. Returning false indicates that there was a problem. In this case, the client library will reinvoke MQTTAsync_messageArrived() to attempt to deliver the message to the application again.
  • This is a callback function. The client application must provide an implementation of this function to enable asynchronous notification of the unsuccessful completion of an API call. The function is registered with the client library by passing it as an argument in ::MQTTAsync_responseOptions. @param context A pointer to the context value originally passed to ::MQTTAsync_responseOptions, which contains any application-specific context. @param response Failure data associated with the API completion.
  • This is a callback function, the MQTT V5 version of ::MQTTAsync_onFailure. The application must provide an implementation of this function to enable asynchronous notification of the unsuccessful completion of an API call. The function is registered with the client library by passing it as an argument in ::MQTTAsync_responseOptions. @param context A pointer to the context value originally passed to ::MQTTAsync_responseOptions, which contains any application-specific context. @param response Failure data associated with the API completion.
  • This is a callback function. The client application must provide an implementation of this function to enable asynchronous notification of the successful completion of an API call. The function is registered with the client library by passing it as an argument in ::MQTTAsync_responseOptions. @param context A pointer to the context value originally passed to ::MQTTAsync_responseOptions, which contains any application-specific context. @param response Any success data associated with the API completion.
  • This is a callback function, the MQTT V5 version of ::MQTTAsync_onSuccess. The client application must provide an implementation of this function to enable asynchronous notification of the successful completion of an API call. The function is registered with the client library by passing it as an argument in ::MQTTAsync_responseOptions. @param context A pointer to the context value originally passed to ::MQTTAsync_responseOptions, which contains any application-specific context. @param response Any success data associated with the API completion.
  • A value representing an MQTT message. A token is returned to the client application when a message is published. The token can then be used to check that the message was successfully delivered to its destination (see MQTTAsync_publish(), MQTTAsync_publishMessage(), MQTTAsync_deliveryComplete(), and MQTTAsync_getPendingTokens()).
  • This is a callback function prototype which must be implemented if you want to receive trace information. @param level the trace level of the message returned @param meesage the trace message. This is a pointer to a static buffer which will be overwritten on each call. You must copy the data if you want to keep it for later.
  • A handle representing an MQTT client. A valid client handle is available following a successful call to MQTTClient_create().
  • This is a callback function. The client application must provide an implementation of this function to enable asynchronous notification of the loss of connection to the server. The function is registered with the client library by passing it as an argument to MQTTClient_setCallbacks(). It is called by the client library if the client loses its connection to the server. The client application must take appropriate action, such as trying to reconnect or reporting the problem. This function is executed on a separate thread to the one on which the client application is running. @param context A pointer to the context value originally passed to MQTTClient_setCallbacks(), which contains any application-specific context. @param cause The reason for the disconnection. Currently, cause is always set to NULL.
  • This is a callback function. The client application must provide an implementation of this function to enable asynchronous notification of delivery of messages. The function is registered with the client library by passing it as an argument to MQTTClient_setCallbacks(). It is called by the client library after the client application has published a message to the server. It indicates that the necessary handshaking and acknowledgements for the requested quality of service (see MQTTClient_message.qos) have been completed. This function is executed on a separate thread to the one on which the client application is running. Note:MQTTClient_deliveryComplete() is not called when messages are published at QoS0. @param context A pointer to the context value originally passed to MQTTClient_setCallbacks(), which contains any application-specific context. @param dt The ::MQTTClient_deliveryToken associated with the published message. Applications can check that all messages have been correctly published by matching the delivery tokens returned from calls to MQTTClient_publish() and MQTTClient_publishMessage() with the tokens passed to this callback.
  • A value representing an MQTT message. A delivery token is returned to the client application when a message is published. The token can then be used to check that the message was successfully delivered to its destination (see MQTTClient_publish(), MQTTClient_publishMessage(), MQTTClient_deliveryComplete(), MQTTClient_waitForCompletion() and MQTTClient_getPendingDeliveryTokens()).
  • This is a callback function, which will be called when the a disconnect packet is received from the server. This applies to MQTT V5 and above only. @param context A pointer to the context value originally passed to ::MQTTAsync_setDisconnected(), which contains any application-specific context. @param properties The MQTT V5 properties received with the disconnect, if any. @param reasonCode The MQTT V5 reason code received with the disconnect. Currently, cause is always set to NULL.
  • This is a callback function. The client application must provide an implementation of this function to enable asynchronous receipt of messages. The function is registered with the client library by passing it as an argument to MQTTClient_setCallbacks(). It is called by the client library when a new message that matches a client subscription has been received from the server. This function is executed on a separate thread to the one on which the client application is running. @param context A pointer to the context value originally passed to MQTTClient_setCallbacks(), which contains any application-specific context. @param topicName The topic associated with the received message. @param topicLen The length of the topic if there are one more NULL characters embedded in topicName, otherwise topicLen is 0. If topicLen is 0, the value returned by strlen(topicName) can be trusted. If topicLen is greater than 0, the full topic name can be retrieved by accessing topicName as a byte array of length topicLen. @param message The MQTTClient_message structure for the received message. This structure contains the message payload and attributes. @return This function must return a boolean value indicating whether or not the message has been safely received by the client application. Returning true indicates that the message has been successfully handled. Returning false indicates that there was a problem. In this case, the client library will reinvoke MQTTClient_messageArrived() to attempt to deliver the message to the application again.
  • This is a callback function, the MQTT V5 version of MQTTClient_deliveryComplete(). The client application must provide an implementation of this function to enable asynchronous notification of the completed delivery of messages. It is called by the client library after the client application has published a message to the server. It indicates that the necessary handshaking and acknowledgements for the requested quality of service (see MQTTClient_message.qos) have been completed. This function is executed on a separate thread to the one on which the client application is running. Note: It is not called when messages are published at QoS0. @param context A pointer to the context value originally passed to MQTTClient_setCallbacks(), which contains any application-specific context. @param dt The ::MQTTClient_deliveryToken associated with the published message. Applications can check that all messages have been correctly published by matching the delivery tokens returned from calls to MQTTClient_publish() and MQTTClient_publishMessage() with the tokens passed to this callback. @param packet_type the last received packet type for this completion. For QoS 1 always PUBACK. For QoS 2 could be PUBREC or PUBCOMP. @param properties the MQTT V5 properties returned with the last packet from the server @param reasonCode the reason code returned from the server
  • This is a callback function prototype which must be implemented if you want to receive trace information. @param level the trace level of the message returned @param meesage the trace message. This is a pointer to a static buffer which will be overwritten on each call. You must copy the data if you want to keep it for later.
  • The one byte MQTT V5 property indicator
  • The one byte MQTT V5 property type
  • The MQTT V5 one byte reason code
  • @brief Clears the persistence store, so that it no longer contains any persisted data.
  • @brief Close the persistent store referred to by the handle.
  • @brief Returns whether any data has been persisted using the specified key.
  • @brief Retrieve the specified data from the persistent store.
  • @brief Returns the keys in this persistent data store.
  • @brief Initialize the persistent store.
  • @brief Put the specified data into the persistent store.
  • @brief Remove the data for the specified key from the store.

Unions§