CommsChampion Ecosystem MQTT v5 Client
MQTT v5 Client Library.
Functions
client.h File Reference

Functions of the CommsChampion MQTT5 client library. More...

#include "cc_mqtt5_client/common.h"

Go to the source code of this file.

Functions

CC_Mqtt5ClientHandle cc_mqtt5_client_alloc ()
 Allocate new client. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_connect_add_user_prop (CC_Mqtt5ConnectHandle handle, const CC_Mqtt5UserProp *prop)
 Add user property to the configuration of the "connect" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_connect_add_will_user_prop (CC_Mqtt5ConnectHandle handle, const CC_Mqtt5UserProp *prop)
 Add user property to the will configuration of the "connect" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_connect_cancel (CC_Mqtt5ConnectHandle handle)
 Cancel the allocated "connect" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_connect_config_auth (CC_Mqtt5ConnectHandle handle, const CC_Mqtt5AuthConfig *config)
 Perform authentication handshake configuration of the "connect" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_connect_config_basic (CC_Mqtt5ConnectHandle handle, const CC_Mqtt5ConnectBasicConfig *config)
 Perform basic configuration of the "connect" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_connect_config_extra (CC_Mqtt5ConnectHandle handle, const CC_Mqtt5ConnectExtraConfig *config)
 Perform extra properties configuration of the "connect" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_connect_config_will (CC_Mqtt5ConnectHandle handle, const CC_Mqtt5ConnectWillConfig *config)
 Perform will configuration of the "connect" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_connect_full (CC_Mqtt5ClientHandle handle, const CC_Mqtt5ConnectBasicConfig *basicConfig, const CC_Mqtt5ConnectWillConfig *willConfig, const CC_Mqtt5ConnectExtraConfig *extraConfig, const CC_Mqtt5AuthConfig *authConfig, CC_Mqtt5ConnectCompleteCb cb, void *cbData)
 Prepare, configure, and send "connect" request in one go (full version) More...
 
unsigned cc_mqtt5_client_connect_get_response_timeout (CC_Mqtt5ConnectHandle handle)
 Retrieve the configured the broker response timeout for the "connect" operation. More...
 
void cc_mqtt5_client_connect_init_auth_info (CC_Mqtt5AuthInfo *info)
 Intialize the CC_Mqtt5AuthInfo configuration structure. More...
 
void cc_mqtt5_client_connect_init_config_auth (CC_Mqtt5AuthConfig *config)
 Intialize the CC_Mqtt5AuthConfig configuration structure. More...
 
void cc_mqtt5_client_connect_init_config_basic (CC_Mqtt5ConnectBasicConfig *config)
 Intialize the CC_Mqtt5ConnectBasicConfig configuration structure. More...
 
void cc_mqtt5_client_connect_init_config_extra (CC_Mqtt5ConnectExtraConfig *config)
 Intialize the CC_Mqtt5ConnectExtraConfig configuration structure. More...
 
void cc_mqtt5_client_connect_init_config_will (CC_Mqtt5ConnectWillConfig *config)
 Intialize the CC_Mqtt5ConnectWillConfig configuration structure. More...
 
CC_Mqtt5ConnectHandle cc_mqtt5_client_connect_prepare (CC_Mqtt5ClientHandle handle, CC_Mqtt5ErrorCode *ec)
 Prepare "connect" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_connect_send (CC_Mqtt5ConnectHandle handle, CC_Mqtt5ConnectCompleteCb cb, void *cbData)
 Send the configured "connect" operation to broker. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_connect_set_response_timeout (CC_Mqtt5ConnectHandle handle, unsigned ms)
 Configure the broker response timeout for the "connect" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_connect_simple (CC_Mqtt5ClientHandle handle, const CC_Mqtt5ConnectBasicConfig *basicConfig, CC_Mqtt5ConnectCompleteCb cb, void *cbData)
 Prepare, configure, and send "connect" request in one go (simple version) More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_disconnect (CC_Mqtt5ClientHandle handle, const CC_Mqtt5DisconnectConfig *config)
 Prepare, configure, and send "disconnect" request in one go. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_disconnect_add_user_prop (CC_Mqtt5DisconnectHandle handle, const CC_Mqtt5UserProp *prop)
 Add user property to the configuration of the "disconnect" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_disconnect_cancel (CC_Mqtt5DisconnectHandle handle)
 Cancel the allocated "disconnect" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_disconnect_config (CC_Mqtt5DisconnectHandle handle, const CC_Mqtt5DisconnectConfig *config)
 Perform configuration of the "disconnect" operation. More...
 
void cc_mqtt5_client_disconnect_init_config (CC_Mqtt5DisconnectConfig *config)
 Intialize the CC_Mqtt5DisconnectConfig configuration structure. More...
 
CC_Mqtt5DisconnectHandle cc_mqtt5_client_disconnect_prepare (CC_Mqtt5ClientHandle handle, CC_Mqtt5ErrorCode *ec)
 Prepare "disconnect" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_disconnect_send (CC_Mqtt5DisconnectHandle handle)
 Send the configured "disconnect" operation to broker. More...
 
void cc_mqtt5_client_free (CC_Mqtt5ClientHandle handle)
 Free previously allocated client. More...
 
unsigned cc_mqtt5_client_get_default_response_timeout (CC_Mqtt5ClientHandle handle)
 Retrieved currently configured default response timeout period. More...
 
bool cc_mqtt5_client_get_verify_incoming_msg_subscribed (CC_Mqtt5ClientHandle handle)
 Retrieve current incoming message being correctly subscribed control. More...
 
bool cc_mqtt5_client_get_verify_incoming_topic_enabled (CC_Mqtt5ClientHandle handle)
 Retrieve current incoming topic format verification control. More...
 
bool cc_mqtt5_client_get_verify_outgoing_topic_enabled (CC_Mqtt5ClientHandle handle)
 Retrieve current outgoing topic format verification control. More...
 
void cc_mqtt5_client_init_user_prop (CC_Mqtt5UserProp *prop)
 Intialize the CC_Mqtt5UserProp structure. More...
 
bool cc_mqtt5_client_is_connected (CC_Mqtt5ClientHandle handle)
 Check the inner state of the library of whether it's connected to the broker. More...
 
bool cc_mqtt5_client_is_network_disconnected (CC_Mqtt5ClientHandle handle)
 Check current network disconnected status. More...
 
void cc_mqtt5_client_notify_network_disconnected (CC_Mqtt5ClientHandle handle)
 Report network disconnected. More...
 
unsigned cc_mqtt5_client_process_data (CC_Mqtt5ClientHandle handle, const unsigned char *buf, unsigned bufLen)
 Provide data (received over I/O link), to the library for processing. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_pub_topic_alias_alloc (CC_Mqtt5ClientHandle handle, const char *topic, unsigned qos0RegsCount)
 Allocate alias for topic. More...
 
unsigned cc_mqtt5_client_pub_topic_alias_count (CC_Mqtt5ClientHandle handle)
 Get amount of allocated topic aliases. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_pub_topic_alias_free (CC_Mqtt5ClientHandle handle, const char *topic)
 Free alias for topic for another use. More...
 
bool cc_mqtt5_client_pub_topic_alias_is_allocated (CC_Mqtt5ClientHandle handle, const char *topic)
 Check if topic alias is allocated for topic. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_publish_add_user_prop (CC_Mqtt5PublishHandle handle, const CC_Mqtt5UserProp *prop)
 Add user property to the configuration of the "publish" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_publish_cancel (CC_Mqtt5PublishHandle handle)
 Cancel the allocated "publish" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_publish_config_basic (CC_Mqtt5PublishHandle handle, const CC_Mqtt5PublishBasicConfig *config)
 Perform basic configuration of the "publish" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_publish_config_extra (CC_Mqtt5PublishHandle handle, const CC_Mqtt5PublishExtraConfig *config)
 Perform extra properties configuration of the "publish" operation. More...
 
unsigned cc_mqtt5_client_publish_count (CC_Mqtt5ClientHandle handle)
 Get amount incomplete "publish" operations. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_publish_full (CC_Mqtt5ClientHandle handle, const CC_Mqtt5PublishBasicConfig *basicConfig, const CC_Mqtt5PublishExtraConfig *extraConfig, CC_Mqtt5PublishCompleteCb cb, void *cbData)
 Prepare, configure, and send "publish" request in one go (full version) More...
 
CC_Mqtt5PublishOrdering cc_mqtt5_client_publish_get_ordering (CC_Mqtt5ClientHandle handle)
 Retrieve the configured the publish operations ordering. More...
 
unsigned cc_mqtt5_client_publish_get_resend_attempts (CC_Mqtt5PublishHandle handle)
 Retrieve the configured the amount of resend attempts for the "publish" operation. More...
 
unsigned cc_mqtt5_client_publish_get_response_timeout (CC_Mqtt5PublishHandle handle)
 Retrieve the configured the broker response timeout for the "publish" operation. More...
 
void cc_mqtt5_client_publish_init_config_basic (CC_Mqtt5PublishBasicConfig *config)
 Intialize the CC_Mqtt5PublishBasicConfig configuration structure. More...
 
void cc_mqtt5_client_publish_init_config_extra (CC_Mqtt5PublishExtraConfig *config)
 Intialize the CC_Mqtt5PublishExtraConfig configuration structure. More...
 
CC_Mqtt5PublishHandle cc_mqtt5_client_publish_prepare (CC_Mqtt5ClientHandle handle, CC_Mqtt5ErrorCode *ec)
 Prepare "publish" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_publish_send (CC_Mqtt5PublishHandle handle, CC_Mqtt5PublishCompleteCb cb, void *cbData)
 Send the configured "publish" operation to broker. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_publish_set_ordering (CC_Mqtt5ClientHandle handle, CC_Mqtt5PublishOrdering ordering)
 Configure the ordering of the published messages. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_publish_set_resend_attempts (CC_Mqtt5PublishHandle handle, unsigned attempts)
 Configure the amount of attempts to resend "publish" operation until the acknowledgement is received. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_publish_set_response_timeout (CC_Mqtt5PublishHandle handle, unsigned ms)
 Configure the broker response timeout for the "publish" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_publish_simple (CC_Mqtt5ClientHandle handle, const CC_Mqtt5PublishBasicConfig *basicConfig, CC_Mqtt5PublishCompleteCb cb, void *cbData)
 Prepare, configure, and send "publish" request in one go (simple version) More...
 
bool cc_mqtt5_client_publish_was_initiated (CC_Mqtt5PublishHandle handle)
 Check whether the "publish" operation was actually initiated (PUBLISH was sent) More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_reauth (CC_Mqtt5ClientHandle handle, const CC_Mqtt5AuthConfig *config, CC_Mqtt5ReauthCompleteCb cb, void *cbData)
 Prepare, configure, and send "reauth" request in one go. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_reauth_add_user_prop (CC_Mqtt5ReauthHandle handle, const CC_Mqtt5UserProp *prop)
 Add user property to the configuration of the "reauth" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_reauth_cancel (CC_Mqtt5ReauthHandle handle)
 Cancel the allocated "reauth" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_reauth_config_auth (CC_Mqtt5ReauthHandle handle, const CC_Mqtt5AuthConfig *config)
 Perform authentication handshake configuration of the "reauth" operation. More...
 
unsigned cc_mqtt5_client_reauth_get_response_timeout (CC_Mqtt5ReauthHandle handle)
 Retrieve the configured the broker response timeout for the "reauth" operation. More...
 
void cc_mqtt5_client_reauth_init_config_auth (CC_Mqtt5AuthConfig *config)
 Intialize the CC_Mqtt5AuthConfig configuration structure. More...
 
CC_Mqtt5ReauthHandle cc_mqtt5_client_reauth_prepare (CC_Mqtt5ClientHandle handle, CC_Mqtt5ErrorCode *ec)
 Prepare "reauth" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_reauth_send (CC_Mqtt5ReauthHandle handle, CC_Mqtt5ReauthCompleteCb cb, void *cbData)
 Send the configured "reauth" operation to broker. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_reauth_set_response_timeout (CC_Mqtt5ReauthHandle handle, unsigned ms)
 Configure the broker response timeout for the "reauth" operation. More...
 
void cc_mqtt5_client_set_broker_disconnect_report_callback (CC_Mqtt5ClientHandle handle, CC_Mqtt5BrokerDisconnectReportCb cb, void *data)
 Set callback to report unsolicited disconnection of the broker. More...
 
void cc_mqtt5_client_set_cancel_next_tick_wait_callback (CC_Mqtt5ClientHandle handle, CC_Mqtt5CancelNextTickWaitCb cb, void *data)
 Set callback to terminate current time measurement. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_set_default_response_timeout (CC_Mqtt5ClientHandle handle, unsigned ms)
 Configure default response timeout period. More...
 
void cc_mqtt5_client_set_error_log_callback (CC_Mqtt5ClientHandle handle, CC_Mqtt5ErrorLogCb cb, void *data)
 Set callback to report error messages. More...
 
void cc_mqtt5_client_set_message_received_report_callback (CC_Mqtt5ClientHandle handle, CC_Mqtt5MessageReceivedReportCb cb, void *data)
 Set callback to report received message from the broker. More...
 
void cc_mqtt5_client_set_next_tick_program_callback (CC_Mqtt5ClientHandle handle, CC_Mqtt5NextTickProgramCb cb, void *data)
 Set callback to call when time measurement is required. More...
 
void cc_mqtt5_client_set_send_output_data_callback (CC_Mqtt5ClientHandle handle, CC_Mqtt5SendOutputDataCb cb, void *data)
 Set callback to send raw data over I/O link. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_set_verify_incoming_msg_subscribed (CC_Mqtt5ClientHandle handle, bool enabled)
 Control verification of the incoming message being correctly subscribed. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_set_verify_incoming_topic_enabled (CC_Mqtt5ClientHandle handle, bool enabled)
 Control incoming topic format verification. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_set_verify_outgoing_topic_enabled (CC_Mqtt5ClientHandle handle, bool enabled)
 Control outgoing topic format verification. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_subscribe_add_user_prop (CC_Mqtt5SubscribeHandle handle, const CC_Mqtt5UserProp *prop)
 Add user property to the configuration of the "subscribe" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_subscribe_cancel (CC_Mqtt5SubscribeHandle handle)
 Cancel the allocated "subscribe" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_subscribe_config_extra (CC_Mqtt5SubscribeHandle handle, const CC_Mqtt5SubscribeExtraConfig *config)
 Perform extra properties configuration of the "subscribe" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_subscribe_config_topic (CC_Mqtt5SubscribeHandle handle, const CC_Mqtt5SubscribeTopicConfig *config)
 Add topic configuration of the "subscribe" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_subscribe_full (CC_Mqtt5ClientHandle handle, const CC_Mqtt5SubscribeTopicConfig *topicConfigs, unsigned topicConfigsCount, const CC_Mqtt5SubscribeExtraConfig *extraConfig, CC_Mqtt5SubscribeCompleteCb cb, void *cbData)
 Prepare, configure, and send "subscribe" request in one go (full version) More...
 
unsigned cc_mqtt5_client_subscribe_get_response_timeout (CC_Mqtt5SubscribeHandle handle)
 Retrieve the configured the broker response timeout for the "subscribe" operation. More...
 
void cc_mqtt5_client_subscribe_init_config_extra (CC_Mqtt5SubscribeExtraConfig *config)
 Intialize the CC_Mqtt5SubscribeExtraConfig configuration structure. More...
 
void cc_mqtt5_client_subscribe_init_config_topic (CC_Mqtt5SubscribeTopicConfig *config)
 Intialize the CC_Mqtt5SubscribeTopicConfig configuration structure. More...
 
CC_Mqtt5SubscribeHandle cc_mqtt5_client_subscribe_prepare (CC_Mqtt5ClientHandle handle, CC_Mqtt5ErrorCode *ec)
 Prepare "subscribe" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_subscribe_send (CC_Mqtt5SubscribeHandle handle, CC_Mqtt5SubscribeCompleteCb cb, void *cbData)
 Send the configured "subscribe" operation to broker. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_subscribe_set_response_timeout (CC_Mqtt5SubscribeHandle handle, unsigned ms)
 Configure the broker response timeout for the "subscribe" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_subscribe_simple (CC_Mqtt5ClientHandle handle, const CC_Mqtt5SubscribeTopicConfig *topicConfig, CC_Mqtt5SubscribeCompleteCb cb, void *cbData)
 Prepare, configure, and send "subscribe" request in one go (simple version) More...
 
void cc_mqtt5_client_tick (CC_Mqtt5ClientHandle handle, unsigned ms)
 Notify client about requested time expiry. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_unsubscribe_add_user_prop (CC_Mqtt5UnsubscribeHandle handle, const CC_Mqtt5UserProp *prop)
 Add user property to the configuration of the "unsubscribe" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_unsubscribe_cancel (CC_Mqtt5UnsubscribeHandle handle)
 Cancel the allocated "unsubscribe" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_unsubscribe_config_topic (CC_Mqtt5UnsubscribeHandle handle, const CC_Mqtt5UnsubscribeTopicConfig *config)
 Add topic configuration of the "unsubscribe" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_unsubscribe_full (CC_Mqtt5ClientHandle handle, const CC_Mqtt5UnsubscribeTopicConfig *topicConfigs, unsigned topicConfigsCount, CC_Mqtt5UnsubscribeCompleteCb cb, void *cbData)
 Prepare, configure, and send "unsubscribe" request in one go (full version) More...
 
unsigned cc_mqtt5_client_unsubscribe_get_response_timeout (CC_Mqtt5UnsubscribeHandle handle)
 Retrieve the configured the broker response timeout for the "unsubscribe" operation. More...
 
void cc_mqtt5_client_unsubscribe_init_config_topic (CC_Mqtt5UnsubscribeTopicConfig *config)
 Intialize the CC_Mqtt5UnsubscribeTopicConfig configuration structure. More...
 
CC_Mqtt5UnsubscribeHandle cc_mqtt5_client_unsubscribe_prepare (CC_Mqtt5ClientHandle handle, CC_Mqtt5ErrorCode *ec)
 Prepare "unsubscribe" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_unsubscribe_send (CC_Mqtt5UnsubscribeHandle handle, CC_Mqtt5UnsubscribeCompleteCb cb, void *cbData)
 Send the configured "unsubscribe" operation to broker. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_unsubscribe_set_response_timeout (CC_Mqtt5UnsubscribeHandle handle, unsigned ms)
 Configure the broker response timeout for the "unsubscribe" operation. More...
 
CC_Mqtt5ErrorCode cc_mqtt5_client_unsubscribe_simple (CC_Mqtt5ClientHandle handle, const CC_Mqtt5UnsubscribeTopicConfig *topicConfig, CC_Mqtt5UnsubscribeCompleteCb cb, void *cbData)
 Prepare, configure, and send "unsubscribe" request in one go (simple version) More...
 

Detailed Description

Functions of the CommsChampion MQTT5 client library.

Function Documentation

◆ cc_mqtt5_client_set_broker_disconnect_report_callback()

void cc_mqtt5_client_set_broker_disconnect_report_callback ( CC_Mqtt5ClientHandle  handle,
CC_Mqtt5BrokerDisconnectReportCb  cb,
void *  data 
)

Set callback to report unsolicited disconnection of the broker.

Parameters
[in]handleHandle returned by cc_mqtt5_client_alloc() function.
[in]cbCallback function.
[in]dataPointer to any user data structure. It will passed as one of the parameters in callback invocation. May be NULL.

◆ cc_mqtt5_client_set_cancel_next_tick_wait_callback()

void cc_mqtt5_client_set_cancel_next_tick_wait_callback ( CC_Mqtt5ClientHandle  handle,
CC_Mqtt5CancelNextTickWaitCb  cb,
void *  data 
)

Set callback to terminate current time measurement.

The client may request termination of currently running time measurement, previously requested via callback, which was set using cc_mqtt5_client_set_next_tick_program_callback() function. This function sets appropriate callback. When invoked, it must return number of elapsed milliseconds since previoius time measurement request.

Parameters
[in]handleHandle returned by cc_mqtt5_client_alloc() function.
[in]cbCallback function.
[in]dataPointer to any user data structure. It will passed as one of the parameters in callback invocation. May be NULL.

◆ cc_mqtt5_client_set_error_log_callback()

void cc_mqtt5_client_set_error_log_callback ( CC_Mqtt5ClientHandle  handle,
CC_Mqtt5ErrorLogCb  cb,
void *  data 
)

Set callback to report error messages.

Parameters
[in]handleHandle returned by cc_mqtt5_client_alloc() function.
[in]cbCallback function.
[in]dataPointer to any user data structure. It will passed as one of the parameters in callback invocation. May be NULL.

◆ cc_mqtt5_client_set_message_received_report_callback()

void cc_mqtt5_client_set_message_received_report_callback ( CC_Mqtt5ClientHandle  handle,
CC_Mqtt5MessageReceivedReportCb  cb,
void *  data 
)

Set callback to report received message from the broker.

Parameters
[in]handleHandle returned by cc_mqtt5_client_alloc() function.
[in]cbCallback function.
[in]dataPointer to any user data structure. It will passed as one of the parameters in callback invocation. May be NULL.

◆ cc_mqtt5_client_set_next_tick_program_callback()

void cc_mqtt5_client_set_next_tick_program_callback ( CC_Mqtt5ClientHandle  handle,
CC_Mqtt5NextTickProgramCb  cb,
void *  data 
)

Set callback to call when time measurement is required.

The MQTT5 client may require to measure time. When such measurement is required, the provided callback will be invoked with the timeout duration in milliseconds. After requested time expires, the cc_mqtt5_client_tick() function must be invoked.

Parameters
[in]handleHandle returned by cc_mqtt5_client_alloc() function.
[in]cbCallback function.
[in]dataPointer to any user data structure. It will passed as one of the parameters in callback invocation. May be NULL.

◆ cc_mqtt5_client_set_send_output_data_callback()

void cc_mqtt5_client_set_send_output_data_callback ( CC_Mqtt5ClientHandle  handle,
CC_Mqtt5SendOutputDataCb  cb,
void *  data 
)

Set callback to send raw data over I/O link.

The callback is invoked when there is a need to send data to the broker. The callback is invoked for every single message that need to be sent.

Parameters
[in]handleHandle returned by cc_mqtt5_client_alloc() function.
[in]cbCallback function.
[in]dataPointer to any user data structure. It will passed as one of the parameters in callback invocation. May be NULL.