Hi I am using iothub_client_device_twin_and_methods_sample for updating the reported state.
if (reportedProperties != NULL)
{
(void)IoTHubDeviceClient_LL_SendReportedState(iotHubClientHandle, (const unsigned char *)reportedProperties, strlen(reportedProperties), reportedStateCallback, NULL);
(void)IoTHubDeviceClient_LL_SetDeviceMethodCallback(iotHubClientHandle, deviceMethodCallback, NULL);
(void)IoTHubDeviceClient_LL_SetDeviceTwinCallback(iotHubClientHandle, deviceTwinCallback, &huilanpro);
while (1)
{
IoTHubDeviceClient_LL_DoWork(iotHubClientHandle);
ThreadAPI_Sleep(10);
}
free(reportedProperties);
}
this is the code snippet where i can i update my reported properties.But through this i can only update once. If i have a change in my reported properties during my program flow. How can i update my reportedproperties again?
Hi I am using iothub_client_device_twin_and_methods_sample for updating the reported state. if (reportedProperties != NULL) { (void)IoTHubDeviceClient_LL_SendReportedState(iotHubClientHandle, (const unsigned char *)reportedProperties, strlen(reportedProperties), reportedStateCallback, NULL); (void)IoTHubDeviceClient_LL_SetDeviceMethodCallback(iotHubClientHandle, deviceMethodCallback, NULL); (void)IoTHubDeviceClient_LL_SetDeviceTwinCallback(iotHubClientHandle, deviceTwinCallback, &huilanpro);
this is the code snippet where i can i update my reported properties.But through this i can only update once. If i have a change in my reported properties during my program flow. How can i update my reportedproperties again?