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@4:233dd7616d73, 2015-10-22 (annotated)
- Committer:
- AzureIoTClient
- Date:
- Thu Oct 22 18:33:28 2015 -0700
- Revision:
- 4:233dd7616d73
- Parent:
- 0:1f9b2707ec7d
- Child:
- 10:c2aee3965a83
v1.0.0-preview.4
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| AzureIoTClient | 0:1f9b2707ec7d | 1 | // Copyright (c) Microsoft. All rights reserved. |
| AzureIoTClient | 0:1f9b2707ec7d | 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. |
| AzureIoTClient | 0:1f9b2707ec7d | 3 | |
| AzureIoTClient | 0:1f9b2707ec7d | 4 | #ifndef DATAMARSHALLER_H |
| AzureIoTClient | 0:1f9b2707ec7d | 5 | #define DATAMARSHALLER_H |
| AzureIoTClient | 0:1f9b2707ec7d | 6 | |
| AzureIoTClient | 0:1f9b2707ec7d | 7 | #include <stdbool.h> |
| AzureIoTClient | 0:1f9b2707ec7d | 8 | #include "agenttypesystem.h" |
| AzureIoTClient | 0:1f9b2707ec7d | 9 | #include "schema.h" |
| AzureIoTClient | 0:1f9b2707ec7d | 10 | #include "macro_utils.h" |
| AzureIoTClient | 0:1f9b2707ec7d | 11 | |
| AzureIoTClient | 0:1f9b2707ec7d | 12 | #ifdef __cplusplus |
| AzureIoTClient | 0:1f9b2707ec7d | 13 | extern "C" |
| AzureIoTClient | 0:1f9b2707ec7d | 14 | { |
| AzureIoTClient | 0:1f9b2707ec7d | 15 | #endif |
| AzureIoTClient | 0:1f9b2707ec7d | 16 | |
| AzureIoTClient | 0:1f9b2707ec7d | 17 | /*Codes_SRS_DATA_MARSHALLER_99_002:[ DataMarshaller shall have the following interface]*/ |
| AzureIoTClient | 0:1f9b2707ec7d | 18 | #define DATA_MARSHALLER_RESULT_VALUES \ |
| AzureIoTClient | 0:1f9b2707ec7d | 19 | DATA_MARSHALLER_OK, \ |
| AzureIoTClient | 0:1f9b2707ec7d | 20 | DATA_MARSHALLER_INVALID_ARG, \ |
| AzureIoTClient | 0:1f9b2707ec7d | 21 | DATA_MARSHALLER_NO_DEVICE_IDENTITY, \ |
| AzureIoTClient | 0:1f9b2707ec7d | 22 | DATA_MARSHALLER_SCHEMA_FAILED, \ |
| AzureIoTClient | 0:1f9b2707ec7d | 23 | DATA_MARSHALLER_INVALID_MODEL_PROPERTY, \ |
| AzureIoTClient | 0:1f9b2707ec7d | 24 | DATA_MARSHALLER_JSON_ENCODER_ERROR, \ |
| AzureIoTClient | 0:1f9b2707ec7d | 25 | DATA_MARSHALLER_ERROR, \ |
| AzureIoTClient | 0:1f9b2707ec7d | 26 | DATA_MARSHALLER_AGENT_DATA_TYPES_ERROR, \ |
| AzureIoTClient | 0:1f9b2707ec7d | 27 | DATA_MARSHALLER_MULTITREE_ERROR, \ |
| AzureIoTClient | 0:1f9b2707ec7d | 28 | DATA_MARSHALLER_ONLY_ONE_VALUE_ALLOWED \ |
| AzureIoTClient | 0:1f9b2707ec7d | 29 | |
| AzureIoTClient | 0:1f9b2707ec7d | 30 | DEFINE_ENUM(DATA_MARSHALLER_RESULT, DATA_MARSHALLER_RESULT_VALUES); |
| AzureIoTClient | 0:1f9b2707ec7d | 31 | |
| AzureIoTClient | 0:1f9b2707ec7d | 32 | typedef struct DATA_MARSHALLER_VALUE_TAG |
| AzureIoTClient | 0:1f9b2707ec7d | 33 | { |
| AzureIoTClient | 0:1f9b2707ec7d | 34 | const char* PropertyPath; |
| AzureIoTClient | 0:1f9b2707ec7d | 35 | const AGENT_DATA_TYPE* Value; |
| AzureIoTClient | 0:1f9b2707ec7d | 36 | } DATA_MARSHALLER_VALUE; |
| AzureIoTClient | 0:1f9b2707ec7d | 37 | |
| AzureIoTClient | 0:1f9b2707ec7d | 38 | typedef void* DATA_MARSHALLER_HANDLE; |
| AzureIoTClient | 0:1f9b2707ec7d | 39 | |
| AzureIoTClient | 0:1f9b2707ec7d | 40 | extern DATA_MARSHALLER_HANDLE DataMarshaller_Create(SCHEMA_MODEL_TYPE_HANDLE modelHandle, bool includePropertyPath); |
| AzureIoTClient | 0:1f9b2707ec7d | 41 | extern void DataMarshaller_Destroy(DATA_MARSHALLER_HANDLE dataMarshallerHandle); |
| AzureIoTClient | 0:1f9b2707ec7d | 42 | extern DATA_MARSHALLER_RESULT DataMarshaller_SendData(DATA_MARSHALLER_HANDLE dataMarshallerHandle, size_t valueCount, const DATA_MARSHALLER_VALUE* values, unsigned char** destination, size_t* destinationSize); |
| AzureIoTClient | 0:1f9b2707ec7d | 43 | |
| AzureIoTClient | 0:1f9b2707ec7d | 44 | #ifdef __cplusplus |
| AzureIoTClient | 0:1f9b2707ec7d | 45 | } |
| AzureIoTClient | 0:1f9b2707ec7d | 46 | #endif |
| AzureIoTClient | 0:1f9b2707ec7d | 47 | |
| AzureIoTClient | 0:1f9b2707ec7d | 48 | #endif /* DATAMARSHALLER_H */ |
