AWS IoT Device SDK C:
MQTT
MQTT 3.1.1 client library
|
Return to main page ↑ |
Enumerated types of the MQTT library. More...
Enumerations | |
enum | IotMqttError_t { IOT_MQTT_SUCCESS = 0, IOT_MQTT_STATUS_PENDING = 1, IOT_MQTT_INIT_FAILED = 2, IOT_MQTT_BAD_PARAMETER = 3, IOT_MQTT_NO_MEMORY = 4, IOT_MQTT_NETWORK_ERROR = 5, IOT_MQTT_SCHEDULING_ERROR = 6, IOT_MQTT_BAD_RESPONSE = 7, IOT_MQTT_TIMEOUT = 8, IOT_MQTT_SERVER_REFUSED = 9, IOT_MQTT_RETRY_NO_RESPONSE = 10, IOT_MQTT_NOT_INITIALIZED = 11 } |
Return codes of MQTT functions. More... | |
enum | IotMqttOperationType_t { IOT_MQTT_CONNECT, IOT_MQTT_PUBLISH_TO_SERVER, IOT_MQTT_PUBACK, IOT_MQTT_SUBSCRIBE, IOT_MQTT_UNSUBSCRIBE, IOT_MQTT_PINGREQ, IOT_MQTT_DISCONNECT } |
Types of MQTT operations. More... | |
enum | IotMqttQos_t { IOT_MQTT_QOS_0 = 0, IOT_MQTT_QOS_1 = 1, IOT_MQTT_QOS_2 = 2 } |
Quality of service levels for MQTT PUBLISH messages. More... | |
enum | IotMqttDisconnectReason_t { IOT_MQTT_DISCONNECT_CALLED, IOT_MQTT_BAD_PACKET_RECEIVED, IOT_MQTT_KEEP_ALIVE_TIMEOUT } |
The reason that an MQTT connection (and its associated network connection) was disconnected. More... | |
Enumerated types of the MQTT library.
enum IotMqttError_t |
Return codes of MQTT functions.
The function IotMqtt_strerror can be used to get a return code's description.
Enumerator | |
---|---|
IOT_MQTT_SUCCESS | MQTT operation completed successfully. Functions that may return this value:
Will also be the value of an operation completion callback's IotMqttCallbackParam_t.result when successful. |
IOT_MQTT_STATUS_PENDING | MQTT operation queued, awaiting result. Functions that may return this value:
|
IOT_MQTT_INIT_FAILED | Initialization failed. Functions that may return this value: |
IOT_MQTT_BAD_PARAMETER | At least one parameter is invalid. Functions that may return this value: |
IOT_MQTT_NO_MEMORY | MQTT operation failed because of memory allocation failure. Functions that may return this value: |
IOT_MQTT_NETWORK_ERROR | MQTT operation failed because the network was unusable. This return value may indicate that the network is disconnected. Functions that may return this value: May also be the value of an operation completion callback's IotMqttCallbackParam_t.result. |
IOT_MQTT_SCHEDULING_ERROR | MQTT operation could not be scheduled, i.e. enqueued for sending. Functions that may return this value: |
IOT_MQTT_BAD_RESPONSE | MQTT response packet received from the network is malformed. Functions that may return this value: May also be the value of an operation completion callback's IotMqttCallbackParam_t.result.
|
IOT_MQTT_TIMEOUT | A blocking MQTT operation timed out. Functions that may return this value: |
IOT_MQTT_SERVER_REFUSED | A CONNECT or at least one subscription was refused by the server. Functions that may return this value:
May also be the value of an operation completion callback's IotMqttCallbackParam_t.result for a SUBSCRIBE.
|
IOT_MQTT_RETRY_NO_RESPONSE | A QoS 1 PUBLISH received no response and the retry limit was reached. Functions that may return this value:
May also be the value of an operation completion callback's IotMqttCallbackParam_t.result for a QoS 1 PUBLISH. |
IOT_MQTT_NOT_INITIALIZED | An API function was called before IotMqtt_Init. Functions that may return this value: |
Types of MQTT operations.
The function IotMqtt_OperationType can be used to get an operation type's description.
enum IotMqttQos_t |
Quality of service levels for MQTT PUBLISH messages.
All MQTT PUBLISH messages, including Last Will and Testament and messages received on subscription filters, have an associated Quality of Service, which defines any delivery guarantees for that message.
Enumerator | |
---|---|
IOT_MQTT_QOS_0 | Delivery at most once. |
IOT_MQTT_QOS_1 | Delivery at least once. See IotMqttPublishInfo_t for client-side retry strategy. |
IOT_MQTT_QOS_2 | Delivery exactly once. Unsupported, but enumerated for completeness. |
The reason that an MQTT connection (and its associated network connection) was disconnected.
When an MQTT connection is closed, its associated disconnect callback will be invoked. This type is passed inside of an IotMqttCallbackParam_t to provide a reason for the disconnect.
Enumerator | |
---|---|
IOT_MQTT_DISCONNECT_CALLED | IotMqtt_Disconnect was invoked. |
IOT_MQTT_BAD_PACKET_RECEIVED | An invalid packet was received from the network. |
IOT_MQTT_KEEP_ALIVE_TIMEOUT | Keep-alive response was not received within IOT_MQTT_RESPONSE_WAIT_MS. |