title | titleSuffix | description | manager | author | ms.author | ms.date | ms.service | ms.custom | ms.topic |
---|---|---|---|---|---|---|---|---|---|
iothub_module_client.h header file reference | Microsoft Docs |
Azure IoT C SDK |
This is the header file reference page for iothub_module_client.h in the Azure IoT C SDK. This SDK is used with Azure IoT Hub and Azure IoT Hub Device Provisioning Service |
timlt |
wesmc7777 |
wesmc |
03/25/2022 |
iot-hub |
reference |
Extends the IoTHubModuleClient_LL module with additional features.
#include <stddef.h>
#include <stdint.h>
#include "umock_c/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"
IoTHubModuleClient extends the IoTHubModuleClient_LL with 2 features:
-
scheduling the work for the IoTHubModuleClient from a thread, so that the user does not need to create their own thread
-
thread-safe APIs
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 IoTHubModuleClient. |
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_GetTwinAsync | This API provides a way to retrieve the complete module Twin properties on-demand. |
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 IoTHubModuleClient_SendEventToOutputAsync) |
IoTHubModuleClient_SendMessageDisposition | This API sends an acknowledgement to Azure IoT Hub that a cloud-to-device message has been received and frees resources associated with the message. |
#define IOTHUB_MODULE_CLIENT_INSTANCE_TYPE
Handle corresponding to a convenience layer module client instance.
typedef IOTHUB_CLIENT_CORE_HANDLE IOTHUB_MODULE_CLIENT_HANDLE;
Remarks:
See https://github.com/Azure/azure-iot-sdk-c/blob/main/doc/threading_notes.md for more details about convenience layer versus lower layer (LL) threading models.