CommsChampion Ecosystem MQTT-SN Client
MQTT-SN client library.
|
Classes | |
struct | CC_MqttsnWillInfo |
Information on the "will" operation completion. More... | |
Typedefs | |
typedef void(* | CC_MqttsnWillCompleteCb) (void *data, CC_MqttsnAsyncOpStatus status, const CC_MqttsnWillInfo *info) |
Callback used to report completion of the publish operation. | |
typedef struct CC_MqttsnWill * | CC_MqttsnWillHandle |
Handle for "will" operation. | |
typedef void(* CC_MqttsnWillCompleteCb) (void *data, CC_MqttsnAsyncOpStatus status, const CC_MqttsnWillInfo *info) |
Callback used to report completion of the publish operation.
[in] | data | Pointer to user data object, passed as the last parameter to the request call. |
[in] | status | Status of the "will" operation. |
[in] | info | Information about op completion. Not-NULL is reported if and onfly if the "status" is equal to CC_MqttsnAsyncOpStatus_Complete. |
typedef struct CC_MqttsnWill* CC_MqttsnWillHandle |
Handle for "will" operation.
Returned by cc_mqttsn_client_will_prepare() function.
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.
Abstracts away sequence of the following functions invocation:
[in] | client | Handle returned by cc_mqttsn_client_alloc() function. |
[in] | config | Subscription configuration. |
[in] | cb | Callback to be invoked when "will" 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_will_cancel | ( | CC_MqttsnWillHandle | handle | ) |
Cancel the allocated "will" operation.
In case the cc_mqttsn_client_will_send() function was successfully called before, the operation is cancelled without callback invocation.
[in] | handle | Handle returned by cc_mqttsn_client_will_prepare() function. |
CC_MqttsnErrorCode cc_mqttsn_client_will_config | ( | CC_MqttsnWillHandle | handle, |
const CC_MqttsnWillConfig * | config | ||
) |
Perform configuration of the "will" operation.
[in] | handle | Handle returned by cc_mqttsn_client_will_prepare() function. |
[in] | config | Configuration structure. Must NOT be NULL. Does not need to be preserved after invocation. |
unsigned cc_mqttsn_client_will_get_retry_count | ( | CC_MqttsnWillHandle | handle | ) |
Retrieve the configured retry count for the "will" operation.
[in] | handle | Handle returned by cc_mqttsn_client_will_prepare() function. |
unsigned cc_mqttsn_client_will_get_retry_period | ( | CC_MqttsnWillHandle | handle | ) |
Retrieve the configured retry period for the "will" operation.
[in] | handle | Handle returned by cc_mqttsn_client_will_prepare() function. |
void cc_mqttsn_client_will_init_config | ( | CC_MqttsnWillConfig * | config | ) |
Intialize the CC_MqttsnWillConfig configuration structure.
[out] | config | Configuration structure. Must not be NULL. |
CC_MqttsnWillHandle cc_mqttsn_client_will_prepare | ( | CC_MqttsnClientHandle | client, |
CC_MqttsnErrorCode * | ec | ||
) |
Prepare "will" 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_will_send | ( | CC_MqttsnWillHandle | handle, |
CC_MqttsnWillCompleteCb | cb, | ||
void * | cbData | ||
) |
Send the "will" operation.
[in] | handle | Handle returned by cc_mqttsn_client_will_prepare() function. |
[in] | cb | Callback to be invoked when "will" 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_will_set_retry_count | ( | CC_MqttsnWillHandle | handle, |
unsigned | count | ||
) |
Configure the retry count for the "will" operation.
[in] | handle | Handle returned by cc_mqttsn_client_will_prepare() function. |
[in] | count | Number of retries. |
CC_MqttsnErrorCode cc_mqttsn_client_will_set_retry_period | ( | CC_MqttsnWillHandle | handle, |
unsigned | ms | ||
) |
Configure the retry period for the "will" operation.
[in] | handle | Handle returned by cc_mqttsn_client_will_prepare() function. |
[in] | ms | Retry period in milliseconds. |