A modelling and serializer library for Microsoft Azure IoTHub client applications

Dependents:   sht15_remote_monitoring f767zi_mqtt remote_monitoring simplesample_amqp ... more

This library implements a serializer library to be used in projects involving Microsoft Azure IoT Hub connectivity. The code is replicated from https://github.com/Azure/azure-iot-sdks

Revision:
26:7c0e6f86d034
Parent:
21:6d3dea1abd9c
Child:
28:79078ba286e5
--- a/iotdevice.c	Fri Apr 21 14:50:55 2017 -0700
+++ b/iotdevice.c	Fri Jul 14 16:38:27 2017 -0700
@@ -415,26 +415,26 @@
     }
 }
 
-DEVICE_RESULT Device_IngestDesiredProperties(void* startAddress, DEVICE_HANDLE deviceHandle, const char* desiredProperties)
+DEVICE_RESULT Device_IngestDesiredProperties(void* startAddress, DEVICE_HANDLE deviceHandle, const char* jsonPayload, bool parseDesiredNode)
 {
     DEVICE_RESULT result;
     /*Codes_SRS_DEVICE_02_032: [ If deviceHandle is NULL then Device_IngestDesiredProperties shall fail and return DEVICE_INVALID_ARG. ]*/
-    /*Codes_SRS_DEVICE_02_033: [ If desiredProperties is NULL then Device_IngestDesiredProperties shall fail and return DEVICE_INVALID_ARG. ]*/
+    /*Codes_SRS_DEVICE_02_033: [ If jsonPayload is NULL then Device_IngestDesiredProperties shall fail and return DEVICE_INVALID_ARG. ]*/
     /*Codes_SRS_DEVICE_02_037: [ If startAddress is NULL then Device_IngestDesiredProperties shall fail and return DEVICE_INVALID_ARG. ]*/
     if (
         (deviceHandle == NULL) ||
-        (desiredProperties == NULL) ||
+        (jsonPayload == NULL) ||
         (startAddress == NULL)
         )
     {
-        LogError("invalid argument void* startAddress=%p, DEVICE_HANDLE deviceHandle=%p, const char* desiredProperties=%p\n", startAddress, deviceHandle, desiredProperties);
+        LogError("invalid argument void* startAddress=%p, DEVICE_HANDLE deviceHandle=%p, const char* jsonPayload=%p\n", startAddress, deviceHandle, jsonPayload);
         result = DEVICE_INVALID_ARG;
     }
     else
     {
         /*Codes_SRS_DEVICE_02_034: [ Device_IngestDesiredProperties shall call CommandDecoder_IngestDesiredProperties. ]*/
         DEVICE_HANDLE_DATA* device = (DEVICE_HANDLE_DATA*)deviceHandle;
-        if (CommandDecoder_IngestDesiredProperties(startAddress, device->commandDecoderHandle, desiredProperties) != COMMANDDECODER_OK)
+        if (CommandDecoder_IngestDesiredProperties(startAddress, device->commandDecoderHandle, jsonPayload, parseDesiredNode) != COMMANDDECODER_OK)
         {
             /*Codes_SRS_DEVICE_02_035: [ If any failure happens then Device_IngestDesiredProperties shall fail and return DEVICE_ERROR. ]*/
             LogError("failure in CommandDecoder_IngestDesiredProperties");