Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: sht15_remote_monitoring f767zi_mqtt remote_monitoring simplesample_amqp ... more
datamarshaller.h
00001 // Copyright (c) Microsoft. All rights reserved. 00002 // Licensed under the MIT license. See LICENSE file in the project root for full license information. 00003 00004 #ifndef DATAMARSHALLER_H 00005 #define DATAMARSHALLER_H 00006 00007 #include <stdbool.h> 00008 #include "agenttypesystem.h" 00009 #include "schema.h" 00010 #include "azure_c_shared_utility/macro_utils.h" 00011 #include "azure_c_shared_utility/vector.h" 00012 #ifdef __cplusplus 00013 extern "C" 00014 { 00015 #endif 00016 00017 /*Codes_SRS_DATA_MARSHALLER_99_002:[ DataMarshaller shall have the following interface]*/ 00018 #define DATA_MARSHALLER_RESULT_VALUES \ 00019 DATA_MARSHALLER_OK, \ 00020 DATA_MARSHALLER_INVALID_ARG, \ 00021 DATA_MARSHALLER_NO_DEVICE_IDENTITY, \ 00022 DATA_MARSHALLER_SCHEMA_FAILED, \ 00023 DATA_MARSHALLER_INVALID_MODEL_PROPERTY, \ 00024 DATA_MARSHALLER_JSON_ENCODER_ERROR, \ 00025 DATA_MARSHALLER_ERROR, \ 00026 DATA_MARSHALLER_AGENT_DATA_TYPES_ERROR, \ 00027 DATA_MARSHALLER_MULTITREE_ERROR, \ 00028 DATA_MARSHALLER_ONLY_ONE_VALUE_ALLOWED \ 00029 00030 DEFINE_ENUM(DATA_MARSHALLER_RESULT, DATA_MARSHALLER_RESULT_VALUES); 00031 00032 typedef struct DATA_MARSHALLER_VALUE_TAG 00033 { 00034 const char* PropertyPath; 00035 const AGENT_DATA_TYPE* Value; 00036 } DATA_MARSHALLER_VALUE; 00037 00038 typedef struct DATA_MARSHALLER_HANDLE_DATA_TAG* DATA_MARSHALLER_HANDLE; 00039 #include "azure_c_shared_utility/umock_c_prod.h" 00040 00041 MOCKABLE_FUNCTION(,DATA_MARSHALLER_HANDLE, DataMarshaller_Create, SCHEMA_MODEL_TYPE_HANDLE, modelHandle, bool, includePropertyPath); 00042 MOCKABLE_FUNCTION(,void, DataMarshaller_Destroy, DATA_MARSHALLER_HANDLE, dataMarshallerHandle); 00043 MOCKABLE_FUNCTION(,DATA_MARSHALLER_RESULT, DataMarshaller_SendData, DATA_MARSHALLER_HANDLE, dataMarshallerHandle, size_t, valueCount, const DATA_MARSHALLER_VALUE*, values, unsigned char**, destination, size_t*, destinationSize); 00044 00045 MOCKABLE_FUNCTION(, DATA_MARSHALLER_RESULT, DataMarshaller_SendData_ReportedProperties, DATA_MARSHALLER_HANDLE, dataMarshallerHandle, VECTOR_HANDLE, values, unsigned char**, destination, size_t*, destinationSize); 00046 00047 #ifdef __cplusplus 00048 } 00049 #endif 00050 00051 #endif /* DATAMARSHALLER_H */
Generated on Tue Jul 12 2022 19:56:37 by
