CommsChampion Ecosystem MQTT-SN Client
MQTT-SN client library.
Loading...
Searching...
No Matches
Functions
client.h File Reference

Functions of MQTT-SN client library. More...

#include "cc_mqttsn_client/common.h"

Go to the source code of this file.

Functions

CC_MqttsnClientHandle cc_mqttsn_client_alloc ()
 Allocate new client.
 
CC_MqttsnErrorCode cc_mqttsn_client_asleep_check_messages (CC_MqttsnClientHandle client)
 Check messages when in "asleep" state.
 
CC_MqttsnErrorCode cc_mqttsn_client_connect (CC_MqttsnClientHandle client, const CC_MqttsnConnectConfig *config, const CC_MqttsnWillConfig *willConfig, CC_MqttsnConnectCompleteCb cb, void *cbData)
 Prepare and send "connect" request in one go.
 
CC_MqttsnErrorCode cc_mqttsn_client_connect_cancel (CC_MqttsnConnectHandle handle)
 Cancel the allocated "connect" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_connect_config (CC_MqttsnConnectHandle handle, const CC_MqttsnConnectConfig *config)
 Perform configuration of the "connect" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_connect_config_will (CC_MqttsnConnectHandle handle, const CC_MqttsnWillConfig *config)
 Perform will configuration of the "connect" operation.
 
unsigned cc_mqttsn_client_connect_get_retry_count (CC_MqttsnConnectHandle handle)
 Retrieve the configured retry count for the "connect" operation.
 
unsigned cc_mqttsn_client_connect_get_retry_period (CC_MqttsnConnectHandle handle)
 Retrieve the configured retry period for the "connect" operation.
 
void cc_mqttsn_client_connect_init_config (CC_MqttsnConnectConfig *config)
 Intialize the CC_MqttsnConnectConfig configuration structure.
 
void cc_mqttsn_client_connect_init_config_will (CC_MqttsnWillConfig *config)
 Intialize the CC_MqttsnWillConfig configuration structure.
 
CC_MqttsnConnectHandle cc_mqttsn_client_connect_prepare (CC_MqttsnClientHandle client, CC_MqttsnErrorCode *ec)
 Prepare "connect" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_connect_send (CC_MqttsnConnectHandle handle, CC_MqttsnConnectCompleteCb cb, void *cbData)
 Send the "connect" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_connect_set_retry_count (CC_MqttsnConnectHandle handle, unsigned count)
 Configure the retry count for the "connect" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_connect_set_retry_period (CC_MqttsnConnectHandle handle, unsigned ms)
 Configure the retry period for the "connect" operation.
 
void cc_mqttsn_client_discard_all_gateway_infos (CC_MqttsnClientHandle client)
 Discard stored information on all available gateways.
 
CC_MqttsnErrorCode cc_mqttsn_client_discard_available_gateway_info (CC_MqttsnClientHandle client, unsigned char gwId)
 Discard stored available gateway information.
 
CC_MqttsnErrorCode cc_mqttsn_client_disconnect (CC_MqttsnClientHandle client, CC_MqttsnDisconnectCompleteCb cb, void *cbData)
 Prepare and send "disconnect" request in one go.
 
CC_MqttsnErrorCode cc_mqttsn_client_disconnect_cancel (CC_MqttsnDisconnectHandle handle)
 Cancel the allocated "disconnect" operation.
 
unsigned cc_mqttsn_client_disconnect_get_retry_count (CC_MqttsnDisconnectHandle handle)
 Retrieve the configured retry count for the "disconnect" operation.
 
unsigned cc_mqttsn_client_disconnect_get_retry_period (CC_MqttsnDisconnectHandle handle)
 Retrieve the configured retry period for the "disconnect" operation.
 
CC_MqttsnDisconnectHandle cc_mqttsn_client_disconnect_prepare (CC_MqttsnClientHandle client, CC_MqttsnErrorCode *ec)
 Prepare "disconnect" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_disconnect_send (CC_MqttsnDisconnectHandle handle, CC_MqttsnDisconnectCompleteCb cb, void *cbData)
 Send the "disconnect" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_disconnect_set_retry_count (CC_MqttsnDisconnectHandle handle, unsigned count)
 Configure the retry count for the "disconnect" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_disconnect_set_retry_period (CC_MqttsnDisconnectHandle handle, unsigned ms)
 Configure the retry period for the "disconnect" operation.
 
void cc_mqttsn_client_free (CC_MqttsnClientHandle client)
 Free previously allocated client.
 
unsigned cc_mqttsn_client_get_allowed_adv_losses (CC_MqttsnClientHandle client)
 Get current configuration of allowed ADVERTISE message misses.
 
CC_MqttsnErrorCode cc_mqttsn_client_get_available_gateway_info (CC_MqttsnClientHandle client, unsigned idx, CC_MqttsnGatewayInfo *info)
 Retrieve stored available gateway information.
 
unsigned cc_mqttsn_client_get_available_gateways_count (CC_MqttsnClientHandle client)
 Get number of available gateways.
 
CC_MqttsnConnectionStatus cc_mqttsn_client_get_connection_status (CC_MqttsnClientHandle client)
 Check the inner state of the library of whether it's connected to the gateway.
 
unsigned cc_mqttsn_client_get_default_broadcast_radius (CC_MqttsnClientHandle client)
 Get current broadcast radius configuration.
 
unsigned cc_mqttsn_client_get_default_gw_adv_duration (CC_MqttsnClientHandle client)
 Get current default gateway advertise configuration.
 
unsigned cc_mqttsn_client_get_default_retry_count (CC_MqttsnClientHandle client)
 Get configured number of retry attempts to perform before reporting unsuccessful result of the operation (Nretry from spec).
 
unsigned cc_mqttsn_client_get_default_retry_period (CC_MqttsnClientHandle client)
 Set configured retry period to wait between resending unacknowledged message to the gateway (Tretry from spec).
 
unsigned long long cc_mqttsn_client_get_incoming_topic_id_storage_limit (CC_MqttsnClientHandle client)
 Retrieve currently configured limit of the topic IDs stored for the incoming messages.
 
unsigned long long cc_mqttsn_client_get_outgoing_topic_id_storage_limit (CC_MqttsnClientHandle client)
 Retrieve currently configured limit of the topic IDs stored for the outgoing messages.
 
bool cc_mqttsn_client_get_verify_incoming_msg_subscribed (CC_MqttsnClientHandle client)
 Retrieve current incoming message being correctly subscribed control.
 
bool cc_mqttsn_client_get_verify_incoming_topic_enabled (CC_MqttsnClientHandle client)
 Retrieve current incoming topic format verification control.
 
bool cc_mqttsn_client_get_verify_outgoing_topic_enabled (CC_MqttsnClientHandle client)
 Retrieve current outgoing topic format verification control.
 
void cc_mqttsn_client_init_gateway_info (CC_MqttsnGatewayInfo *info)
 Initialize the CC_MqttsnGatewayInfo structure.
 
void cc_mqttsn_client_process_data (CC_MqttsnClientHandle client, const unsigned char *buf, unsigned bufLen, CC_MqttsnDataOrigin origin)
 Provide data, received over I/O link, to the library for processing.
 
CC_MqttsnErrorCode cc_mqttsn_client_publish (CC_MqttsnClientHandle client, const CC_MqttsnPublishConfig *config, CC_MqttsnPublishCompleteCb cb, void *cbData)
 Prepare and send "publish" request in one go.
 
CC_MqttsnErrorCode cc_mqttsn_client_publish_cancel (CC_MqttsnPublishHandle handle)
 Cancel the allocated "publish" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_publish_config (CC_MqttsnPublishHandle handle, const CC_MqttsnPublishConfig *config)
 Perform configuration of the "publish" operation.
 
unsigned cc_mqttsn_client_publish_get_retry_count (CC_MqttsnPublishHandle handle)
 Retrieve the configured retry count for the "publish" operation.
 
unsigned cc_mqttsn_client_publish_get_retry_period (CC_MqttsnPublishHandle handle)
 Retrieve the configured retry period for the "publish" operation.
 
void cc_mqttsn_client_publish_init_config (CC_MqttsnPublishConfig *config)
 Intialize the CC_MqttsnPublishConfig configuration structure.
 
CC_MqttsnPublishHandle cc_mqttsn_client_publish_prepare (CC_MqttsnClientHandle client, CC_MqttsnErrorCode *ec)
 Prepare "publish" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_publish_send (CC_MqttsnPublishHandle handle, CC_MqttsnPublishCompleteCb cb, void *cbData)
 Send the "publish" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_publish_set_retry_count (CC_MqttsnPublishHandle handle, unsigned count)
 Configure the retry count for the "publish" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_publish_set_retry_period (CC_MqttsnPublishHandle handle, unsigned ms)
 Configure the retry period for the "publish" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_search (CC_MqttsnClientHandle handle, CC_MqttsnSearchCompleteCb cb, void *cbData)
 Prepare and send "search" request in one go.
 
CC_MqttsnErrorCode cc_mqttsn_client_search_cancel (CC_MqttsnSearchHandle handle)
 Cancel the allocated "search" operation.
 
unsigned cc_mqttsn_client_search_get_broadcast_radius (CC_MqttsnSearchHandle handle)
 Retrieve the configured broadcast radius for the "search" operation.
 
unsigned cc_mqttsn_client_search_get_retry_count (CC_MqttsnSearchHandle handle)
 Retrieve the configured retry count for the "search" operation.
 
unsigned cc_mqttsn_client_search_get_retry_period (CC_MqttsnSearchHandle handle)
 Retrieve the configured retry period for the "search" operation.
 
CC_MqttsnSearchHandle cc_mqttsn_client_search_prepare (CC_MqttsnClientHandle client, CC_MqttsnErrorCode *ec)
 Prepare "search" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_search_send (CC_MqttsnSearchHandle handle, CC_MqttsnSearchCompleteCb cb, void *cbData)
 Send the "search" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_search_set_broadcast_radius (CC_MqttsnSearchHandle handle, unsigned broadcastRadius)
 Configure the broadcast radius for the "search" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_search_set_retry_count (CC_MqttsnSearchHandle handle, unsigned count)
 Configure the retry count for the "search" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_search_set_retry_period (CC_MqttsnSearchHandle handle, unsigned ms)
 Configure the retry period for the "search" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_set_allowed_adv_losses (CC_MqttsnClientHandle client, unsigned count)
 Set number of allowed ADVERTISE message misses.
 
CC_MqttsnErrorCode cc_mqttsn_client_set_available_gateway_info (CC_MqttsnClientHandle client, const CC_MqttsnGatewayInfo *info)
 Update stored available gateway information.
 
void cc_mqttsn_client_set_cancel_next_tick_wait_callback (CC_MqttsnClientHandle client, CC_MqttsnCancelNextTickWaitCb cb, void *data)
 Set callback to terminate current time measurement.
 
CC_MqttsnErrorCode cc_mqttsn_client_set_default_broadcast_radius (CC_MqttsnClientHandle client, unsigned value)
 Set broadcast radius.
 
CC_MqttsnErrorCode cc_mqttsn_client_set_default_gw_adv_duration (CC_MqttsnClientHandle client, unsigned ms)
 Set default gateway advertise duration.
 
CC_MqttsnErrorCode cc_mqttsn_client_set_default_retry_count (CC_MqttsnClientHandle client, unsigned value)
 Set number of retry attempts to perform before reporting unsuccessful result of the operation (Nretry from spec).
 
CC_MqttsnErrorCode cc_mqttsn_client_set_default_retry_period (CC_MqttsnClientHandle client, unsigned value)
 Set retry period to wait between resending unacknowledged message to the gateway (Tretry from spec).
 
void cc_mqttsn_client_set_error_log_callback (CC_MqttsnClientHandle client, CC_MqttsnErrorLogCb cb, void *data)
 Set callback to report error messages.
 
void cc_mqttsn_client_set_gw_disconnect_report_callback (CC_MqttsnClientHandle client, CC_MqttsnGwDisconnectedReportCb cb, void *data)
 Set callback to report unsolicited disconnection of the gateway.
 
void cc_mqttsn_client_set_gw_status_report_callback (CC_MqttsnClientHandle client, CC_MqttsnGwStatusReportCb cb, void *data)
 Set callback to report status of the gateway.
 
void cc_mqttsn_client_set_gwinfo_delay_request_callback (CC_MqttsnClientHandle client, CC_MqttsnGwinfoDelayRequestCb cb, void *data)
 Set callback to request a random timeout to send GWINFO as a response to the SEARCHGW from other client.
 
CC_MqttsnErrorCode cc_mqttsn_client_set_incoming_topic_id_storage_limit (CC_MqttsnClientHandle client, unsigned long long limit)
 Specify limit of the topic IDs stored for the incoming messages.
 
void cc_mqttsn_client_set_message_report_callback (CC_MqttsnClientHandle client, CC_MqttsnMessageReportCb cb, void *data)
 Set callback to report incoming messages.
 
void cc_mqttsn_client_set_next_tick_program_callback (CC_MqttsnClientHandle client, CC_MqttsnNextTickProgramCb cb, void *data)
 Set callback to call when time measurement is required.
 
CC_MqttsnErrorCode cc_mqttsn_client_set_outgoing_topic_id_storage_limit (CC_MqttsnClientHandle client, unsigned long long limit)
 Specify limit of the topic IDs stored for the outgoing messages.
 
void cc_mqttsn_client_set_send_output_data_callback (CC_MqttsnClientHandle client, CC_MqttsnSendOutputDataCb cb, void *data)
 Set callback to send raw data over I/O link.
 
CC_MqttsnErrorCode cc_mqttsn_client_set_verify_incoming_msg_subscribed (CC_MqttsnClientHandle client, bool enabled)
 Control verification of the incoming message being correctly subscribed.
 
CC_MqttsnErrorCode cc_mqttsn_client_set_verify_incoming_topic_enabled (CC_MqttsnClientHandle client, bool enabled)
 Control incoming topic format verification.
 
CC_MqttsnErrorCode cc_mqttsn_client_set_verify_outgoing_topic_enabled (CC_MqttsnClientHandle client, bool enabled)
 Control outgoing topic format verification.
 
CC_MqttsnErrorCode cc_mqttsn_client_sleep (CC_MqttsnClientHandle client, const CC_MqttsnSleepConfig *config, CC_MqttsnSleepCompleteCb cb, void *cbData)
 Prepare and send "sleep" request in one go.
 
CC_MqttsnErrorCode cc_mqttsn_client_sleep_cancel (CC_MqttsnSleepHandle handle)
 Cancel the allocated "sleep" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_sleep_config (CC_MqttsnSleepHandle handle, const CC_MqttsnSleepConfig *config)
 Perform configuration of the "sleep" operation.
 
unsigned cc_mqttsn_client_sleep_get_retry_count (CC_MqttsnSleepHandle handle)
 Retrieve the configured retry count for the "sleep" operation.
 
unsigned cc_mqttsn_client_sleep_get_retry_period (CC_MqttsnSleepHandle handle)
 Retrieve the configured retry period for the "sleep" operation.
 
void cc_mqttsn_client_sleep_init_config (CC_MqttsnSleepConfig *config)
 Intialize the CC_MqttsnSleepConfig configuration structure.
 
CC_MqttsnSleepHandle cc_mqttsn_client_sleep_prepare (CC_MqttsnClientHandle client, CC_MqttsnErrorCode *ec)
 Prepare "sleep" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_sleep_send (CC_MqttsnSleepHandle handle, CC_MqttsnSleepCompleteCb cb, void *cbData)
 Send the "sleep" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_sleep_set_retry_count (CC_MqttsnSleepHandle handle, unsigned count)
 Configure the retry count for the "sleep" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_sleep_set_retry_period (CC_MqttsnSleepHandle handle, unsigned ms)
 Configure the retry period for the "sleep" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_subscribe (CC_MqttsnClientHandle client, const CC_MqttsnSubscribeConfig *config, CC_MqttsnSubscribeCompleteCb cb, void *cbData)
 Prepare and send "subscribe" request in one go.
 
CC_MqttsnErrorCode cc_mqttsn_client_subscribe_cancel (CC_MqttsnSubscribeHandle handle)
 Cancel the allocated "subscribe" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_subscribe_config (CC_MqttsnSubscribeHandle handle, const CC_MqttsnSubscribeConfig *config)
 Perform configuration of the "subscribe" operation.
 
unsigned cc_mqttsn_client_subscribe_get_retry_count (CC_MqttsnSubscribeHandle handle)
 Retrieve the configured retry count for the "subscribe" operation.
 
unsigned cc_mqttsn_client_subscribe_get_retry_period (CC_MqttsnSubscribeHandle handle)
 Retrieve the configured retry period for the "subscribe" operation.
 
void cc_mqttsn_client_subscribe_init_config (CC_MqttsnSubscribeConfig *config)
 Intialize the CC_MqttsnSubscribeConfig configuration structure.
 
CC_MqttsnSubscribeHandle cc_mqttsn_client_subscribe_prepare (CC_MqttsnClientHandle client, CC_MqttsnErrorCode *ec)
 Prepare "subscribe" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_subscribe_send (CC_MqttsnSubscribeHandle handle, CC_MqttsnSubscribeCompleteCb cb, void *cbData)
 Send the "subscribe" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_subscribe_set_retry_count (CC_MqttsnSubscribeHandle handle, unsigned count)
 Configure the retry count for the "subscribe" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_subscribe_set_retry_period (CC_MqttsnSubscribeHandle handle, unsigned ms)
 Configure the retry period for the "subscribe" operation.
 
void cc_mqttsn_client_tick (CC_MqttsnClientHandle client, unsigned ms)
 Notify client about requested time expiry.
 
CC_MqttsnErrorCode cc_mqttsn_client_unsubscribe (CC_MqttsnClientHandle client, const CC_MqttsnUnsubscribeConfig *config, CC_MqttsnUnsubscribeCompleteCb cb, void *cbData)
 Prepare and send "unsubscribe" request in one go.
 
CC_MqttsnErrorCode cc_mqttsn_client_unsubscribe_cancel (CC_MqttsnUnsubscribeHandle handle)
 Cancel the allocated "unsubscribe" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_unsubscribe_config (CC_MqttsnUnsubscribeHandle handle, const CC_MqttsnUnsubscribeConfig *config)
 Perform configuration of the "unsubscribe" operation.
 
unsigned cc_mqttsn_client_unsubscribe_get_retry_count (CC_MqttsnUnsubscribeHandle handle)
 Retrieve the configured retry count for the "unsubscribe" operation.
 
unsigned cc_mqttsn_client_unsubscribe_get_retry_period (CC_MqttsnUnsubscribeHandle handle)
 Retrieve the configured retry period for the "unsubscribe" operation.
 
void cc_mqttsn_client_unsubscribe_init_config (CC_MqttsnUnsubscribeConfig *config)
 Intialize the CC_MqttsnUnsubscribeConfig configuration structure.
 
CC_MqttsnUnsubscribeHandle cc_mqttsn_client_unsubscribe_prepare (CC_MqttsnClientHandle client, CC_MqttsnErrorCode *ec)
 Prepare "unsubscribe" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_unsubscribe_send (CC_MqttsnUnsubscribeHandle handle, CC_MqttsnUnsubscribeCompleteCb cb, void *cbData)
 Send the "unsubscribe" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_unsubscribe_set_retry_count (CC_MqttsnUnsubscribeHandle handle, unsigned count)
 Configure the retry count for the "unsubscribe" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_unsubscribe_set_retry_period (CC_MqttsnUnsubscribeHandle handle, unsigned ms)
 Configure the retry period for the "unsubscribe" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_will (CC_MqttsnClientHandle client, const CC_MqttsnWillConfig *config, CC_MqttsnWillCompleteCb cb, void *cbData)
 Prepare and send "will" request in one go.
 
CC_MqttsnErrorCode cc_mqttsn_client_will_cancel (CC_MqttsnWillHandle handle)
 Cancel the allocated "will" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_will_config (CC_MqttsnWillHandle handle, const CC_MqttsnWillConfig *config)
 Perform configuration of the "will" operation.
 
unsigned cc_mqttsn_client_will_get_retry_count (CC_MqttsnWillHandle handle)
 Retrieve the configured retry count for the "will" operation.
 
unsigned cc_mqttsn_client_will_get_retry_period (CC_MqttsnWillHandle handle)
 Retrieve the configured retry period for the "will" operation.
 
void cc_mqttsn_client_will_init_config (CC_MqttsnWillConfig *config)
 Intialize the CC_MqttsnWillConfig configuration structure.
 
CC_MqttsnWillHandle cc_mqttsn_client_will_prepare (CC_MqttsnClientHandle client, CC_MqttsnErrorCode *ec)
 Prepare "will" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_will_send (CC_MqttsnWillHandle handle, CC_MqttsnWillCompleteCb cb, void *cbData)
 Send the "will" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_will_set_retry_count (CC_MqttsnWillHandle handle, unsigned count)
 Configure the retry count for the "will" operation.
 
CC_MqttsnErrorCode cc_mqttsn_client_will_set_retry_period (CC_MqttsnWillHandle handle, unsigned ms)
 Configure the retry period for the "will" operation.
 

Detailed Description

Functions of MQTT-SN client library.