This API sends a report of the module's properties and their current values.


#include "azure-iot-sdk-c/iothub_client/inc/iothub_module_client.h"

IOTHUB_CLIENT_RESULT IoTHubModuleClient_SendReportedState(
  IOTHUB_MODULE_CLIENT_HANDLE            iotHubModuleClientHandle,
  const unsigned char *                  reportedState,
  size_t                                 size,
  void *                                 userContextCallback


  • iotHubModuleClientHandle The handle created by a call to the create function.

  • reportedState The current module property values to be 'reported' to the IoTHub.

  • reportedStateCallback The callback specified by the module client to be called with the result of the transaction.

  • userContextCallback User specified context that will be provided to the callback. This can be NULL.

NOTE: The application behavior is undefined if the user calls the IoTHubModuleClient_Destroy function from within any callback.

Return Value

IOTHUB_CLIENT_OK upon success or an error code upon failure.