CommsChampion Ecosystem MQTT-SN Client
MQTT-SN client library.
|
Typedefs | |
typedef void(* | CC_MqttsnDisconnectCompleteCb) (void *data, CC_MqttsnAsyncOpStatus status) |
Callback used to report completion of the disconnect operation. | |
typedef struct CC_MqttsnDisconnect * | CC_MqttsnDisconnectHandle |
Handle for "disconnect" operation. | |
typedef void(* CC_MqttsnDisconnectCompleteCb) (void *data, CC_MqttsnAsyncOpStatus status) |
Callback used to report completion of the disconnect operation.
[in] | data | Pointer to user data object, passed as the last parameter to the request call. |
[in] | status | Status of the "disconnect" operation. |
typedef struct CC_MqttsnDisconnect* CC_MqttsnDisconnectHandle |
Handle for "disconnect" operation.
Returned by cc_mqttsn_client_disconnect_prepare() function.
CC_MqttsnErrorCode cc_mqttsn_client_disconnect | ( | CC_MqttsnClientHandle | client, |
CC_MqttsnDisconnectCompleteCb | cb, | ||
void * | cbData | ||
) |
Prepare and send "disconnect" request in one go.
Abstracts away sequence of the following functions invocation:
[in] | client | Handle returned by cc_mqttsn_client_alloc() function. |
[in] | cb | Callback to be invoked when "disconnect" operation is complete. |
[in] | cbData | Pointer to any user data structure. It will passed as one of the parameters in callback invocation. May be NULL. |
CC_MqttsnErrorCode cc_mqttsn_client_disconnect_cancel | ( | CC_MqttsnDisconnectHandle | handle | ) |
Cancel the allocated "disconnect" operation.
In case the cc_mqttsn_client_disconnect_send() function was successfully called before, the operation is cancelled without callback invocation.
[in] | handle | Handle returned by cc_mqttsn_client_disconnect_prepare() function. |
unsigned cc_mqttsn_client_disconnect_get_retry_count | ( | CC_MqttsnDisconnectHandle | handle | ) |
Retrieve the configured retry count for the "disconnect" operation.
[in] | handle | Handle returned by cc_mqttsn_client_disconnect_prepare() function. |
unsigned cc_mqttsn_client_disconnect_get_retry_period | ( | CC_MqttsnDisconnectHandle | handle | ) |
Retrieve the configured retry period for the "disconnect" operation.
[in] | handle | Handle returned by cc_mqttsn_client_disconnect_prepare() function. |
CC_MqttsnDisconnectHandle cc_mqttsn_client_disconnect_prepare | ( | CC_MqttsnClientHandle | client, |
CC_MqttsnErrorCode * | ec | ||
) |
Prepare "disconnect" operation.
[in] | client | Handle returned by cc_mqttsn_client_alloc() function. |
[out] | ec | Error code reporting result of the operation. Can be NULL. |
CC_MqttsnErrorCode cc_mqttsn_client_disconnect_send | ( | CC_MqttsnDisconnectHandle | handle, |
CC_MqttsnDisconnectCompleteCb | cb, | ||
void * | cbData | ||
) |
Send the "disconnect" operation.
[in] | handle | Handle returned by cc_mqttsn_client_disconnect_prepare() function. |
[in] | cb | Callback to be invoked when "disconnect" operation is complete. |
[in] | cbData | Pointer to any user data structure. It will passed as one of the parameters in callback invocation. May be NULL. |
CC_MqttsnErrorCode cc_mqttsn_client_disconnect_set_retry_count | ( | CC_MqttsnDisconnectHandle | handle, |
unsigned | count | ||
) |
Configure the retry count for the "disconnect" operation.
[in] | handle | Handle returned by cc_mqttsn_client_disconnect_prepare() function. |
[in] | count | Number of retries. |
CC_MqttsnErrorCode cc_mqttsn_client_disconnect_set_retry_period | ( | CC_MqttsnDisconnectHandle | handle, |
unsigned | ms | ||
) |
Configure the retry period for the "disconnect" operation.
[in] | handle | Handle returned by cc_mqttsn_client_disconnect_prepare() function. |
[in] | ms | Retry period in milliseconds. |