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
Diff: codefirst.c
- Revision:
- 26:7c0e6f86d034
- Parent:
- 22:422d94bd3c18
- Child:
- 36:7d12a5386197
diff -r 475bf9d91efb -r 7c0e6f86d034 codefirst.c --- a/codefirst.c Fri Apr 21 14:50:55 2017 -0700 +++ b/codefirst.c Fri Jul 14 16:38:27 2017 -0700 @@ -1581,17 +1581,17 @@ return result; } -CODEFIRST_RESULT CodeFirst_IngestDesiredProperties(void* device, const char* desiredProperties) +CODEFIRST_RESULT CodeFirst_IngestDesiredProperties(void* device, const char* jsonPayload, bool parseDesiredNode) { CODEFIRST_RESULT result; /*Codes_SRS_CODEFIRST_02_030: [ If argument device is NULL then CodeFirst_IngestDesiredProperties shall fail and return CODEFIRST_INVALID_ARG. ]*/ - /*Codes_SRS_CODEFIRST_02_031: [ If argument desiredProperties is NULL then CodeFirst_IngestDesiredProperties shall fail and return CODEFIRST_INVALID_ARG. ]*/ + /*Codes_SRS_CODEFIRST_02_031: [ If argument jsonPayload is NULL then CodeFirst_IngestDesiredProperties shall fail and return CODEFIRST_INVALID_ARG. ]*/ if ( (device == NULL) || - (desiredProperties == NULL) + (jsonPayload == NULL) ) { - LogError("invalid argument void* device=%p, const char* desiredProperties=%p", device, desiredProperties); + LogError("invalid argument void* device=%p, const char* jsonPayload=%p", device, jsonPayload); result = CODEFIRST_INVALID_ARG; } else @@ -1607,7 +1607,7 @@ else { /*Codes_SRS_CODEFIRST_02_033: [ CodeFirst_IngestDesiredProperties shall call Device_IngestDesiredProperties. ]*/ - if (Device_IngestDesiredProperties(device, deviceHeader->DeviceHandle, desiredProperties) != DEVICE_OK) + if (Device_IngestDesiredProperties(device, deviceHeader->DeviceHandle, jsonPayload, parseDesiredNode) != DEVICE_OK) { LogError("failure in Device_IngestDesiredProperties"); result = CODEFIRST_ERROR;