MQTT C Client Libraries Internals: MQTTAsync_responseOptions Struct Reference

| MQTT C Client Libraries Internals

Loading...
Searching...
No Matches
Data Fields
MQTTAsync_responseOptions Struct Reference

Structure to define call options. More...

`#include <MQTTAsync.h>`

Collaboration diagram for MQTTAsync_responseOptions:
[legend]

## Data Fields
char | struct_id [4]
| The eyecatcher for this structure.
int | struct_version
| The version number of this structure.
MQTTAsync_onSuccess * | onSuccess
| A pointer to a callback function to be called if the API call successfully completes.
MQTTAsync_onFailure * | onFailure
| A pointer to a callback function to be called if the API call fails.
void * | context
| A pointer to any application-specific context.
MQTTAsync_token | token
| A token is returned from the call.
MQTTAsync_onSuccess5 * | onSuccess5
| A pointer to a callback function to be called if the API call successfully completes.
MQTTAsync_onFailure5 * | onFailure5
| A pointer to a callback function to be called if the API call successfully completes.
MQTTProperties | properties
| MQTT V5 input properties.
MQTTSubscribe_options | subscribeOptions
int | subscribeOptionsCount
MQTTSubscribe_options * | subscribeOptionsList

## Detailed Description

Structure to define call options.

For MQTT 5.0 there is input data as well as that describing the response method. So there is now also a synonym MQTTAsync_callOptions to better reflect the use. This responseOptions name is kept for backward compatibility.

## Field Documentation

## ◆ context

void* MQTTAsync_responseOptions::context

A pointer to any application-specific context.

The the context pointer is passed to success or failure callback functions to provide access to the context information in the callback.

## ◆ onFailure

MQTTAsync_onFailure* MQTTAsync_responseOptions::onFailure

A pointer to a callback function to be called if the API call fails.

Can be set to NULL, in which case no indication of unsuccessful completion will be received.

## ◆ onFailure5

MQTTAsync_onFailure5* MQTTAsync_responseOptions::onFailure5

A pointer to a callback function to be called if the API call successfully completes.

Can be set to NULL, in which case no indication of successful completion will be received.

## ◆ onSuccess

MQTTAsync_onSuccess* MQTTAsync_responseOptions::onSuccess

A pointer to a callback function to be called if the API call successfully completes.

Can be set to NULL, in which case no indication of successful completion will be received.

## ◆ onSuccess5

MQTTAsync_onSuccess5* MQTTAsync_responseOptions::onSuccess5

A pointer to a callback function to be called if the API call successfully completes.

Can be set to NULL, in which case no indication of successful completion will be received.

## ◆ struct_id

char MQTTAsync_responseOptions::struct_id[4]

The eyecatcher for this structure.

Must be MQTR

## ◆ struct_version

int MQTTAsync_responseOptions::struct_version

The version number of this structure.

Must be 0 or 1 if 0, no MQTTV5 options

## ◆ token

MQTTAsync_token MQTTAsync_responseOptions::token

A token is returned from the call.

It can be used to track the state of this request, both in the callbacks and in future calls such as MQTTAsync_waitForCompletion. This is output only - any change by the application will be ignored.

The documentation for this struct was generated from the following file:

- MQTTAsync.h