nRF Connect SDK API 2.8.0
Loading...
Searching...
No Matches
azure_iot_hub.h File Reference

Azure IoT Hub library. More...

#include <stdio.h>
#include <zephyr/net/mqtt.h>

Go to the source code of this file.

Data Structures

struct  azure_iot_hub_buf
 
struct  azure_iot_hub_property
 Property bag structure for key/value string pairs. Per Azure IoT Hub documentation, the key must be defined, while the value can be a string or empty. More...
 
struct  azure_iot_hub_topic_data
 Azure IoT Hub topic data. More...
 
struct  azure_iot_hub_msg
 Azure IoT Hub transmission data. More...
 
struct  azure_iot_hub_method
 Azure IoT Hub direct method data. More...
 
struct  azure_iot_hub_result
 Azure IoT Hub result structure. More...
 
struct  azure_iot_hub_evt
 Struct with data received from Azure IoT Hub. More...
 
struct  azure_iot_hub_config
 Structure for Azure IoT Hub connection parameters. More...
 

Typedefs

typedef void(* azure_iot_hub_evt_handler_t) (struct azure_iot_hub_evt *evt)
 Azure IoT Hub library event handler.
 

Enumerations

enum  azure_iot_hub_evt_type {
  AZURE_IOT_HUB_EVT_CONNECTING = 0x1 , AZURE_IOT_HUB_EVT_CONNECTED , AZURE_IOT_HUB_EVT_CONNECTION_FAILED , AZURE_IOT_HUB_EVT_READY ,
  AZURE_IOT_HUB_EVT_DISCONNECTED , AZURE_IOT_HUB_EVT_DATA_RECEIVED , AZURE_IOT_HUB_EVT_PUBACK , AZURE_IOT_HUB_EVT_PINGRESP ,
  AZURE_IOT_HUB_EVT_TWIN_RECEIVED , AZURE_IOT_HUB_EVT_TWIN_DESIRED_RECEIVED , AZURE_IOT_HUB_EVT_TWIN_RESULT_SUCCESS , AZURE_IOT_HUB_EVT_TWIN_RESULT_FAIL ,
  AZURE_IOT_HUB_EVT_DIRECT_METHOD , AZURE_IOT_HUB_EVT_FOTA_START , AZURE_IOT_HUB_EVT_FOTA_DONE , AZURE_IOT_HUB_EVT_FOTA_ERASE_PENDING ,
  AZURE_IOT_HUB_EVT_FOTA_ERASE_DONE , AZURE_IOT_HUB_EVT_FOTA_ERROR , AZURE_IOT_HUB_EVT_ERROR_MSG_SIZE , AZURE_IOT_HUB_EVT_ERROR
}
 Azure IoT Hub notification events used to notify the user. More...
 
enum  azure_iot_hub_topic_type {
  AZURE_IOT_HUB_TOPIC_DEVICEBOUND , AZURE_IOT_HUB_TOPIC_DIRECT_METHOD , AZURE_IOT_HUB_TOPIC_TWIN_DESIRED , AZURE_IOT_HUB_TOPIC_TWIN_REQUEST_RESULT ,
  AZURE_IOT_HUB_TOPIC_DPS , AZURE_IOT_HUB_TOPIC_EVENT , AZURE_IOT_HUB_TOPIC_TWIN_REPORTED , AZURE_IOT_HUB_TOPIC_TWIN_REQUEST ,
  AZURE_IOT_HUB_TOPIC_UNKNOWN
}
 Azure IoT Hub topic type, used to route messages to the correct destination. More...
 

Functions

int azure_iot_hub_init (azure_iot_hub_evt_handler_t event_handler)
 Initialize the module.
 
int azure_iot_hub_connect (const struct azure_iot_hub_config *config)
 Establish connection to Azure IoT Hub. The function blocks until a connection to the hub is established on the transport level. Subsequent calls to other library function should await AZURE_IOT_HUB_EVT_CONNECTED and AZURE_IOT_HUB_EVT_READY events.
 
int azure_iot_hub_disconnect (void)
 Disconnect from Azure IoT Hub. Calling this function initiates the disconnection procedure, and the event AZURE_IOT_HUB_EVT_DISCONNECTED is received when it is completed.
 
int azure_iot_hub_send (const struct azure_iot_hub_msg *const tx_data)
 Send data to Azure IoT Hub.
 
int azure_iot_hub_method_respond (struct azure_iot_hub_result *result)
 Send response to a direct method invoked from the cloud.
 

Detailed Description

Azure IoT Hub library.