iothub_module_client.h

Extends the IoTHubClient_LL module with additional features.

Includes

#include <stddef.h>
#include <stdint.h>
#include "azure_c_shared_utility/umock_c_prod.h"
#include "iothub_transport_ll.h"
#include "iothub_client_core_ll.h"
#include "iothub_client_core.h"
#include "iothub_module_client_ll.h"

Detailed Description

IoTHubClient is a module that extends the IoTHubClient_LL module with 2 features:

  • scheduling the work for the IoTHubClient from a thread, so that the user does not need to create their own thread

  • thread-safe APIs

Functions

Function Name Description
IoTHubModuleClient_CreateFromConnectionString Creates a IoT Hub client for communication with an existing IoT Hub using the specified connection string parameter.
IoTHubModuleClient_Destroy Disposes of resources allocated by the IoT Hub client. This is a blocking call.
IoTHubModuleClient_SendEventAsync Asynchronous call to send the message specified by eventMessageHandle.
IoTHubModuleClient_GetSendStatus This function returns the current sending status for IoTHubClient.
IoTHubModuleClient_SetMessageCallback Sets up the message callback to be invoked when IoT Hub issues a message to the device. This is a blocking call.
IoTHubModuleClient_SetConnectionStatusCallback Sets up the connection status callback to be invoked representing the status of the connection to IOT Hub. This is a blocking call.
IoTHubModuleClient_SetRetryPolicy Sets up the connection status callback to be invoked representing the status of the connection to IOT Hub. This is a blocking call.
IoTHubModuleClient_GetRetryPolicy Sets up the connection status callback to be invoked representing the status of the connection to IOT Hub. This is a blocking call.
IoTHubModuleClient_GetLastMessageReceiveTime This function returns in the out parameter lastMessageReceiveTime what was the value of the time function when the last message was received at the client.
IoTHubModuleClient_SetOption This API sets a runtime option identified by parameter optionName to a value pointed to by value. optionName and the data type value is pointing to are specific for every option.
IoTHubModuleClient_SetModuleTwinCallback This API specifies a call back to be used when the module receives a state update.
IoTHubModuleClient_SendReportedState This API sends a report of the module's properties and their current values.
IoTHubModuleClient_SetModuleMethodCallback This API sets callback for async cloud to module method call.
IoTHubModuleClient_SendEventToOutputAsync Asynchronous call to send the message specified by eventMessageHandle.
IoTHubModuleClient_SetInputMessageCallback This API sets callback for method call that is directed to specified 'inputName' queue (e.g. messages from IoTHubClient_SendEventToOutputAsync)

Macro definitions

IOTHUB_MODULE_CLIENT_INSTANCE_TYPE

#define IOTHUB_MODULE_CLIENT_INSTANCE_TYPE

Type definitions

IOTHUB_MODULE_CLIENT_HANDLE

typedef IOTHUB_CLIENT_CORE_HANDLE IOTHUB_MODULE_CLIENT_HANDLE;