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


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

IOTHUB_CLIENT_RESULT IoTHubDeviceClient_LL_SendReportedState(
  IOTHUB_DEVICE_CLIENT_LL_HANDLE         iotHubClientHandle,
  const unsigned char *                  reportedState,
  size_t                                 size,
  void *                                 userContextCallback


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

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

  • reportedStateCallback The callback specified by the device 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 IoTHubDeviceClient_LL_Destroy function from within any callback.

Return Value

IOTHUB_CLIENT_OK upon success or an error code upon failure.