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
agenttypesystem.h@36:7d12a5386197, 2018-09-11 (annotated)
- Committer:
- AzureIoTClient
- Date:
- Tue Sep 11 11:14:37 2018 -0700
- Revision:
- 36:7d12a5386197
- Parent:
- 17:fa1bba4c6053
1.2.9
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 AGENT_DATA_TYPES_H |
AzureIoTClient | 0:1f9b2707ec7d | 5 | #define AGENT_DATA_TYPES_H |
AzureIoTClient | 0:1f9b2707ec7d | 6 | |
AzureIoTClient | 0:1f9b2707ec7d | 7 | #ifdef __cplusplus |
AzureIoTClient | 0:1f9b2707ec7d | 8 | #include <cstdint> |
AzureIoTClient | 0:1f9b2707ec7d | 9 | #include <ctime> |
AzureIoTClient | 0:1f9b2707ec7d | 10 | #include <cstddef> |
AzureIoTClient | 0:1f9b2707ec7d | 11 | #else |
AzureIoTClient | 0:1f9b2707ec7d | 12 | #if ((defined _WIN32_WCE) && _WIN32_WCE==0x0600) |
AzureIoTClient | 0:1f9b2707ec7d | 13 | #include "stdint_ce6.h" |
AzureIoTClient | 0:1f9b2707ec7d | 14 | #else |
AzureIoTClient | 0:1f9b2707ec7d | 15 | #include <stdint.h> |
AzureIoTClient | 0:1f9b2707ec7d | 16 | #endif |
AzureIoTClient | 0:1f9b2707ec7d | 17 | #include <stddef.h> |
AzureIoTClient | 0:1f9b2707ec7d | 18 | #endif |
AzureIoTClient | 0:1f9b2707ec7d | 19 | |
Azure.IoT Build | 10:c2aee3965a83 | 20 | #include "azure_c_shared_utility/agenttime.h" |
Azure.IoT Build | 10:c2aee3965a83 | 21 | #include "azure_c_shared_utility/macro_utils.h" |
Azure.IoT Build | 10:c2aee3965a83 | 22 | #include "azure_c_shared_utility/strings.h" |
AzureIoTClient | 0:1f9b2707ec7d | 23 | |
AzureIoTClient | 0:1f9b2707ec7d | 24 | /*Codes_SRS_AGENT_TYPE_SYSTEM_99_001:[ AGENT_TYPE_SYSTEM shall have the following interface]*/ |
AzureIoTClient | 0:1f9b2707ec7d | 25 | |
AzureIoTClient | 0:1f9b2707ec7d | 26 | #ifdef __cplusplus |
AzureIoTClient | 0:1f9b2707ec7d | 27 | extern "C" |
AzureIoTClient | 0:1f9b2707ec7d | 28 | { |
AzureIoTClient | 0:1f9b2707ec7d | 29 | #endif |
AzureIoTClient | 0:1f9b2707ec7d | 30 | |
AzureIoTClient | 0:1f9b2707ec7d | 31 | /*the following forward declarations the closest implementation to "interface" in OOP*/ |
AzureIoTClient | 0:1f9b2707ec7d | 32 | struct AGENT_DATA_TYPE_TAG; |
AzureIoTClient | 0:1f9b2707ec7d | 33 | typedef struct AGENT_DATA_TYPE_TAG AGENT_DATA_TYPE; |
AzureIoTClient | 0:1f9b2707ec7d | 34 | |
AzureIoTClient | 0:1f9b2707ec7d | 35 | /*this file contains the definitions of the data types of EDM*/ |
AzureIoTClient | 0:1f9b2707ec7d | 36 | /*the types are taken from */ |
AzureIoTClient | 0:1f9b2707ec7d | 37 | /*http://docs.oasis-open.org/odata/odata/v4.0/cos01/part3-csdl/odata-v4.0-cos01-part3-csdl.html*/ |
AzureIoTClient | 0:1f9b2707ec7d | 38 | /*chapter 4.4 - "Primitive Data Types" */ |
AzureIoTClient | 0:1f9b2707ec7d | 39 | |
AzureIoTClient | 0:1f9b2707ec7d | 40 | /*the C implementation of these types follows:*/ |
AzureIoTClient | 0:1f9b2707ec7d | 41 | /*even the simpler types are encapsulated in structs to purposely avoid compiler promotions/casts etc*/ |
AzureIoTClient | 0:1f9b2707ec7d | 42 | |
AzureIoTClient | 0:1f9b2707ec7d | 43 | /*Binary data.*/ |
AzureIoTClient | 0:1f9b2707ec7d | 44 | typedef struct EDM_BINARY_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 45 | { |
AzureIoTClient | 0:1f9b2707ec7d | 46 | size_t size; |
AzureIoTClient | 0:1f9b2707ec7d | 47 | unsigned char* data; |
AzureIoTClient | 0:1f9b2707ec7d | 48 | }EDM_BINARY; |
AzureIoTClient | 0:1f9b2707ec7d | 49 | |
AzureIoTClient | 0:1f9b2707ec7d | 50 | #define EDM_BOOLEANS_VALUES \ |
AzureIoTClient | 0:1f9b2707ec7d | 51 | EDM_TRUE, \ |
AzureIoTClient | 36:7d12a5386197 | 52 | EDM_FALSE |
AzureIoTClient | 0:1f9b2707ec7d | 53 | |
AzureIoTClient | 0:1f9b2707ec7d | 54 | DEFINE_ENUM(EDM_BOOLEANS, EDM_BOOLEANS_VALUES); |
AzureIoTClient | 0:1f9b2707ec7d | 55 | |
AzureIoTClient | 5:c08e3ffc68e4 | 56 | /*ispositiveinfinity*/ |
AzureIoTClient | 5:c08e3ffc68e4 | 57 | |
AzureIoTClient | 5:c08e3ffc68e4 | 58 | #ifdef _MSC_VER |
AzureIoTClient | 5:c08e3ffc68e4 | 59 | #define ISPOSITIVEINFINITY(x) ((_finite((x))==0) && ((_fpclass((x)) & _FPCLASS_PINF) == _FPCLASS_PINF)) |
AzureIoTClient | 5:c08e3ffc68e4 | 60 | #else |
AzureIoTClient | 5:c08e3ffc68e4 | 61 | #if defined __STDC_VERSION__ |
AzureIoTClient | 5:c08e3ffc68e4 | 62 | #if ((__STDC_VERSION__ == 199901L) || (__STDC_VERSION__ == 201112L)) |
AzureIoTClient | 5:c08e3ffc68e4 | 63 | /*C99 compiler or C11*/ |
AzureIoTClient | 5:c08e3ffc68e4 | 64 | #define ISPOSITIVEINFINITY(x) (isinf((x)) && (signbit((x))==0)) |
AzureIoTClient | 5:c08e3ffc68e4 | 65 | #else |
AzureIoTClient | 5:c08e3ffc68e4 | 66 | #error update this file to contain the latest C standard. |
AzureIoTClient | 5:c08e3ffc68e4 | 67 | #endif |
AzureIoTClient | 5:c08e3ffc68e4 | 68 | #else |
AzureIoTClient | 36:7d12a5386197 | 69 | #ifdef __cplusplus |
AzureIoTClient | 5:c08e3ffc68e4 | 70 | #define ISPOSITIVEINFINITY(x) (std::isinf((x)) && (signbit((x))==0)) |
AzureIoTClient | 5:c08e3ffc68e4 | 71 | #else |
AzureIoTClient | 5:c08e3ffc68e4 | 72 | #error unknown (or C89) compiler, must provide a definition for ISPOSITIVEINFINITY |
AzureIoTClient | 5:c08e3ffc68e4 | 73 | #endif |
AzureIoTClient | 5:c08e3ffc68e4 | 74 | #endif |
AzureIoTClient | 5:c08e3ffc68e4 | 75 | #endif |
AzureIoTClient | 5:c08e3ffc68e4 | 76 | |
AzureIoTClient | 5:c08e3ffc68e4 | 77 | #ifdef _MSC_VER |
AzureIoTClient | 5:c08e3ffc68e4 | 78 | /*not exactly signbit*/ |
AzureIoTClient | 5:c08e3ffc68e4 | 79 | #define ISNEGATIVEINFINITY(x) ((_finite((x))==0) && ((_fpclass((x)) & _FPCLASS_NINF) == _FPCLASS_NINF)) |
AzureIoTClient | 5:c08e3ffc68e4 | 80 | #else |
AzureIoTClient | 5:c08e3ffc68e4 | 81 | #if defined __STDC_VERSION__ |
AzureIoTClient | 5:c08e3ffc68e4 | 82 | #if ((__STDC_VERSION__ == 199901L) || (__STDC_VERSION__ == 201112L)) |
AzureIoTClient | 5:c08e3ffc68e4 | 83 | /*C99 compiler or C11*/ |
AzureIoTClient | 5:c08e3ffc68e4 | 84 | #define ISNEGATIVEINFINITY(x) (isinf((x)) && (signbit((x))!=0)) |
AzureIoTClient | 5:c08e3ffc68e4 | 85 | #else |
AzureIoTClient | 5:c08e3ffc68e4 | 86 | #error update this file to contain the latest C standard. |
AzureIoTClient | 5:c08e3ffc68e4 | 87 | #endif |
AzureIoTClient | 5:c08e3ffc68e4 | 88 | #else |
AzureIoTClient | 36:7d12a5386197 | 89 | #ifdef __cplusplus |
AzureIoTClient | 5:c08e3ffc68e4 | 90 | #define ISNEGATIVEINFINITY(x) (std::isinf((x)) && (signbit((x)) != 0)) |
AzureIoTClient | 5:c08e3ffc68e4 | 91 | #else |
AzureIoTClient | 5:c08e3ffc68e4 | 92 | #error unknown (or C89) compiler, must provide a definition for ISNEGATIVEINFINITY |
AzureIoTClient | 5:c08e3ffc68e4 | 93 | #endif |
AzureIoTClient | 5:c08e3ffc68e4 | 94 | #endif |
AzureIoTClient | 5:c08e3ffc68e4 | 95 | #endif |
AzureIoTClient | 5:c08e3ffc68e4 | 96 | |
AzureIoTClient | 0:1f9b2707ec7d | 97 | /*Binary-valued logic.*/ |
AzureIoTClient | 0:1f9b2707ec7d | 98 | typedef struct EDM_BOOLEAN_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 99 | { |
AzureIoTClient | 0:1f9b2707ec7d | 100 | EDM_BOOLEANS value; |
AzureIoTClient | 0:1f9b2707ec7d | 101 | }EDM_BOOLEAN; |
AzureIoTClient | 0:1f9b2707ec7d | 102 | |
AzureIoTClient | 0:1f9b2707ec7d | 103 | /*Unsigned 8-bit integer*/ |
AzureIoTClient | 0:1f9b2707ec7d | 104 | typedef struct EDM_BYTE_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 105 | { |
AzureIoTClient | 0:1f9b2707ec7d | 106 | uint8_t value; |
AzureIoTClient | 0:1f9b2707ec7d | 107 | } EDM_BYTE; |
AzureIoTClient | 0:1f9b2707ec7d | 108 | |
AzureIoTClient | 0:1f9b2707ec7d | 109 | /*Date without a time-zone offset*/ |
AzureIoTClient | 0:1f9b2707ec7d | 110 | /*The edm:Date expression evaluates to a primitive date value. A date expression MUST be assigned a |
AzureIoTClient | 0:1f9b2707ec7d | 111 | value of type xs:date, see [XML-Schema-2], section 3.3.9. The value MUST also conform to rule |
AzureIoTClient | 0:1f9b2707ec7d | 112 | dateValue in [OData-ABNF], i.e. it MUST NOT contain a time-zone offset.*/ |
AzureIoTClient | 0:1f9b2707ec7d | 113 | /*section 3.3.9: date uses the date/timeSevenPropertyModel, with hour, minute, and second required to be absent.*/ |
AzureIoTClient | 0:1f9b2707ec7d | 114 | /*dateValue in OData-ABNF is : dateValue = year "-" month "-" day */ |
AzureIoTClient | 0:1f9b2707ec7d | 115 | /*year = [ "-" ] ( "0" 3DIGIT / oneToNine 3*DIGIT ) |
AzureIoTClient | 0:1f9b2707ec7d | 116 | month = "0" oneToNine |
AzureIoTClient | 0:1f9b2707ec7d | 117 | / "1" ( "0" / "1" / "2" ) |
AzureIoTClient | 0:1f9b2707ec7d | 118 | day = "0" oneToNine |
AzureIoTClient | 0:1f9b2707ec7d | 119 | / ( "1" / "2" ) DIGIT |
AzureIoTClient | 0:1f9b2707ec7d | 120 | / "3" ( "0" / "1" )*/ |
AzureIoTClient | 0:1f9b2707ec7d | 121 | typedef struct EDM_DATE_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 122 | { |
AzureIoTClient | 0:1f9b2707ec7d | 123 | int16_t year; /*can represent all values for a year*/ /*they can be between -9999 and 9999*/ |
AzureIoTClient | 0:1f9b2707ec7d | 124 | uint8_t month; |
AzureIoTClient | 0:1f9b2707ec7d | 125 | uint8_t day; |
AzureIoTClient | 0:1f9b2707ec7d | 126 | } EDM_DATE; |
AzureIoTClient | 0:1f9b2707ec7d | 127 | |
AzureIoTClient | 0:1f9b2707ec7d | 128 | |
AzureIoTClient | 0:1f9b2707ec7d | 129 | /*The edm:DateTimeOffset expression evaluates to a primitive date/time value with a time-zone offset. |
AzureIoTClient | 0:1f9b2707ec7d | 130 | A date/time expression MUST be assigned a value of type xs:dateTimeStamp, see [XML-Schema-2], |
AzureIoTClient | 0:1f9b2707ec7d | 131 | section 3.4.28. The value MUST also conform to rule dateTimeOffsetValue in [OData-ABNF], i.e. it |
AzureIoTClient | 0:1f9b2707ec7d | 132 | MUST NOT contain an end-of-day fragment (24:00:00).*/ |
AzureIoTClient | 0:1f9b2707ec7d | 133 | /*section 3.4.28 says : dateTimeStampLexicalRep ::= yearFrag '-' monthFrag '-' dayFrag 'T' ((hourFrag ':' minuteFrag ':' secondFrag) | endOfDayFrag) timezoneFrag?*/ |
AzureIoTClient | 0:1f9b2707ec7d | 134 | /*[OData-ABNF] says: dateTimeOffsetValue = year "-" month "-" day "T" hour ":" minute [ ":" second [ "." fractionalSeconds ] ] ( "Z" / sign hour ":" minute )*/ |
AzureIoTClient | 0:1f9b2707ec7d | 135 | /*fractionalSeconds = 1*12DIGIT, FYI*/ |
AzureIoTClient | 0:1f9b2707ec7d | 136 | typedef struct EDM_DATE_TIME_OFFSET_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 137 | { |
AzureIoTClient | 0:1f9b2707ec7d | 138 | struct tm dateTime; |
AzureIoTClient | 0:1f9b2707ec7d | 139 | uint8_t hasFractionalSecond; |
AzureIoTClient | 0:1f9b2707ec7d | 140 | uint64_t fractionalSecond; /*because UINT32 only has 10 digits*/ |
AzureIoTClient | 0:1f9b2707ec7d | 141 | uint8_t hasTimeZone; |
AzureIoTClient | 0:1f9b2707ec7d | 142 | int8_t timeZoneHour; |
AzureIoTClient | 0:1f9b2707ec7d | 143 | uint8_t timeZoneMinute; |
AzureIoTClient | 0:1f9b2707ec7d | 144 | }EDM_DATE_TIME_OFFSET; |
AzureIoTClient | 0:1f9b2707ec7d | 145 | |
AzureIoTClient | 0:1f9b2707ec7d | 146 | /*Edm.Guid*/ |
AzureIoTClient | 0:1f9b2707ec7d | 147 | /*16-byte (128-bit) unique identifier*/ |
AzureIoTClient | 0:1f9b2707ec7d | 148 | /*The edm:Guid expression evaluates to a primitive 32-character string value. A guid expression MUST be |
AzureIoTClient | 0:1f9b2707ec7d | 149 | assigned a value conforming to the rule guidValue in [OData-ABNF].*/ |
AzureIoTClient | 0:1f9b2707ec7d | 150 | /*guidValue is 8HEXDIG "-" 4HEXDIG "-" 4HEXDIG "-" 4HEXDIG "-" 12HEXDIG*/ |
AzureIoTClient | 0:1f9b2707ec7d | 151 | typedef struct EDM_GUID_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 152 | { |
AzureIoTClient | 0:1f9b2707ec7d | 153 | uint8_t GUID[16]; |
AzureIoTClient | 0:1f9b2707ec7d | 154 | }EDM_GUID; |
AzureIoTClient | 0:1f9b2707ec7d | 155 | |
AzureIoTClient | 0:1f9b2707ec7d | 156 | |
AzureIoTClient | 0:1f9b2707ec7d | 157 | /*Edm.Decimal*/ |
AzureIoTClient | 0:1f9b2707ec7d | 158 | /*The edm:Decimal expression evaluates to a primitive decimal value. A decimal expression MUST be |
AzureIoTClient | 0:1f9b2707ec7d | 159 | assigned a value conforming to the rule decimalValue in [OData-ABNF].*/ |
AzureIoTClient | 0:1f9b2707ec7d | 160 | /*[OData-ABNF] says: decimalValue = [SIGN] 1*DIGIT ["." 1*DIGIT] */ |
AzureIoTClient | 0:1f9b2707ec7d | 161 | /* this is binary coded decimal style then*/ |
AzureIoTClient | 0:1f9b2707ec7d | 162 | typedef struct EDM_DECIMAL_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 163 | { |
AzureIoTClient | 0:1f9b2707ec7d | 164 | STRING_HANDLE value; |
AzureIoTClient | 0:1f9b2707ec7d | 165 | } EDM_DECIMAL; |
AzureIoTClient | 0:1f9b2707ec7d | 166 | |
AzureIoTClient | 0:1f9b2707ec7d | 167 | /*Edm.Double*/ |
AzureIoTClient | 0:1f9b2707ec7d | 168 | /*IEEE 754 binary64 floating-point number (15-17 decimal digits)*/ |
AzureIoTClient | 0:1f9b2707ec7d | 169 | |
AzureIoTClient | 0:1f9b2707ec7d | 170 | typedef struct EDM_DOUBLE_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 171 | { |
AzureIoTClient | 0:1f9b2707ec7d | 172 | double value; |
AzureIoTClient | 0:1f9b2707ec7d | 173 | } EDM_DOUBLE; |
AzureIoTClient | 0:1f9b2707ec7d | 174 | |
AzureIoTClient | 0:1f9b2707ec7d | 175 | |
AzureIoTClient | 0:1f9b2707ec7d | 176 | /*Edm.Duration*/ |
AzureIoTClient | 0:1f9b2707ec7d | 177 | /*Signed duration in days, hours, minutes, and (sub)seconds*/ |
AzureIoTClient | 0:1f9b2707ec7d | 178 | /*The edm:Duration expression evaluates to a primitive duration value. A duration expression MUST be |
AzureIoTClient | 0:1f9b2707ec7d | 179 | assigned a value of type xs:dayTimeDuration, see [XML-Schema-2], section 3.4.27.*/ |
AzureIoTClient | 0:1f9b2707ec7d | 180 | /*XML-Schema section 3.4.27 says: "[...]leaving only those with day, hour, minutes, and/or seconds fields." */ |
AzureIoTClient | 0:1f9b2707ec7d | 181 | /*day is "unsignedNoDecimalPtNumeral" and that can have as many digits... ?*/ |
AzureIoTClient | 0:1f9b2707ec7d | 182 | typedef struct EDM_DURATION_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 183 | { |
AzureIoTClient | 0:1f9b2707ec7d | 184 | size_t nDigits; |
AzureIoTClient | 0:1f9b2707ec7d | 185 | char* digits; |
AzureIoTClient | 0:1f9b2707ec7d | 186 | } |
AzureIoTClient | 0:1f9b2707ec7d | 187 | EDM_DURATION; |
AzureIoTClient | 0:1f9b2707ec7d | 188 | |
AzureIoTClient | 0:1f9b2707ec7d | 189 | |
AzureIoTClient | 0:1f9b2707ec7d | 190 | /*Edm.Int16*/ |
AzureIoTClient | 0:1f9b2707ec7d | 191 | /*Signed 16-bit integer*/ |
AzureIoTClient | 0:1f9b2707ec7d | 192 | /*[OData=ABNF] says about Int16: numbers in the range from -32768 to 32767 */ |
AzureIoTClient | 0:1f9b2707ec7d | 193 | /*this is not C compliant, because C89 has for (read:guarantees) short SHRT_MIN -32767... (notice how it misses -32768)*/ |
AzureIoTClient | 0:1f9b2707ec7d | 194 | /*C99 has the same*/ |
AzureIoTClient | 0:1f9b2707ec7d | 195 | /*C11 has the same*/ |
AzureIoTClient | 0:1f9b2707ec7d | 196 | /*platform types has to check for -32768 compliance*/ |
AzureIoTClient | 0:1f9b2707ec7d | 197 | typedef struct EDM_INT16_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 198 | { |
AzureIoTClient | 0:1f9b2707ec7d | 199 | int16_t value; |
AzureIoTClient | 0:1f9b2707ec7d | 200 | } EDM_INT16; |
AzureIoTClient | 0:1f9b2707ec7d | 201 | |
AzureIoTClient | 0:1f9b2707ec7d | 202 | /*Edm.Int32*/ |
AzureIoTClient | 0:1f9b2707ec7d | 203 | /*Signed 32-bit integer*/ |
AzureIoTClient | 0:1f9b2707ec7d | 204 | /*OData-ABNF has for int32Value = [ sign ] 1*10DIGIT ; numbers in the range from -2147483648 to 2147483647*/ |
AzureIoTClient | 0:1f9b2707ec7d | 205 | /*same issue as for EDM_16*/ |
AzureIoTClient | 0:1f9b2707ec7d | 206 | /*platform types has to check compliance based on LONG_MIN #define*/ |
AzureIoTClient | 0:1f9b2707ec7d | 207 | typedef struct EDM_INT32_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 208 | { |
AzureIoTClient | 0:1f9b2707ec7d | 209 | int32_t value; |
AzureIoTClient | 0:1f9b2707ec7d | 210 | } EDM_INT32; |
AzureIoTClient | 0:1f9b2707ec7d | 211 | |
AzureIoTClient | 0:1f9b2707ec7d | 212 | /*Edm.Int64*/ |
AzureIoTClient | 0:1f9b2707ec7d | 213 | /*Signed 64-bit integer*/ |
AzureIoTClient | 0:1f9b2707ec7d | 214 | /*OData=ABNF: int64Value = [ sign ] 1*19DIGIT ; numbers in the range from -9223372036854775808 to 9223372036854775807*/ |
AzureIoTClient | 0:1f9b2707ec7d | 215 | /*C89 has no mention of anything on 64bits*/ |
AzureIoTClient | 0:1f9b2707ec7d | 216 | /*C99 mention LLONG_MIN as -9223372036854775807 and LLONG_MAX as 9223372036854775807*/ |
AzureIoTClient | 0:1f9b2707ec7d | 217 | /*C11 is the same as C99*/ |
AzureIoTClient | 0:1f9b2707ec7d | 218 | typedef struct EDM_INT64_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 219 | { |
AzureIoTClient | 0:1f9b2707ec7d | 220 | int64_t value; /*SINT64 might be a single type or s truct provided by platformTypes, depending on C compiler support*/ |
AzureIoTClient | 0:1f9b2707ec7d | 221 | } EDM_INT64; |
AzureIoTClient | 0:1f9b2707ec7d | 222 | |
AzureIoTClient | 0:1f9b2707ec7d | 223 | /*Edm.SByte*/ |
AzureIoTClient | 0:1f9b2707ec7d | 224 | /*Signed 8-bit integer*/ |
AzureIoTClient | 0:1f9b2707ec7d | 225 | /*OData=ABNF: sbyteValue = [ sign ] 1*3DIGIT ; numbers in the range from -128 to 127*/ |
AzureIoTClient | 0:1f9b2707ec7d | 226 | /*C89, C99, C11 all have SCHAR_MIN, SCHAR_MAX between -127 and 127 (guaranteed)*/ |
AzureIoTClient | 0:1f9b2707ec7d | 227 | /*so platformTypes.h has to check that -128 is attainable*/ |
AzureIoTClient | 0:1f9b2707ec7d | 228 | typedef struct EDM_SBYTE_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 229 | { |
AzureIoTClient | 0:1f9b2707ec7d | 230 | int8_t value; |
AzureIoTClient | 0:1f9b2707ec7d | 231 | } EDM_SBYTE; |
AzureIoTClient | 0:1f9b2707ec7d | 232 | |
AzureIoTClient | 0:1f9b2707ec7d | 233 | /*Edm.Single*/ |
AzureIoTClient | 0:1f9b2707ec7d | 234 | /*IEEE 754 binary32 floating-point number (6-9 decimal digits)*/ |
AzureIoTClient | 0:1f9b2707ec7d | 235 | /*with the same "fears" as for Edm.Double*/ |
AzureIoTClient | 0:1f9b2707ec7d | 236 | typedef struct EDM_SINGLE_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 237 | { |
AzureIoTClient | 0:1f9b2707ec7d | 238 | float value; |
AzureIoTClient | 0:1f9b2707ec7d | 239 | } EDM_SINGLE; |
AzureIoTClient | 0:1f9b2707ec7d | 240 | |
AzureIoTClient | 0:1f9b2707ec7d | 241 | /*not clear what this is |
AzureIoTClient | 0:1f9b2707ec7d | 242 | typedef EDM_STREAM_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 243 | { |
AzureIoTClient | 0:1f9b2707ec7d | 244 | |
AzureIoTClient | 0:1f9b2707ec7d | 245 | }EDM_STREAM; |
AzureIoTClient | 0:1f9b2707ec7d | 246 | */ |
AzureIoTClient | 0:1f9b2707ec7d | 247 | |
AzureIoTClient | 0:1f9b2707ec7d | 248 | /*Edm.String*/ |
AzureIoTClient | 0:1f9b2707ec7d | 249 | /*Sequence of UTF-8 characters*/ |
AzureIoTClient | 0:1f9b2707ec7d | 250 | typedef struct EDM_STRING_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 251 | { |
AzureIoTClient | 0:1f9b2707ec7d | 252 | size_t length; /*number of unsigned char* in the string*/ |
AzureIoTClient | 0:1f9b2707ec7d | 253 | char* chars; |
AzureIoTClient | 0:1f9b2707ec7d | 254 | } EDM_STRING; |
AzureIoTClient | 0:1f9b2707ec7d | 255 | |
AzureIoTClient | 0:1f9b2707ec7d | 256 | /*Edm.TimeOfDay*/ |
AzureIoTClient | 0:1f9b2707ec7d | 257 | /*Clock time 00:00-23:59:59.999999999999*/ |
AzureIoTClient | 0:1f9b2707ec7d | 258 | /*The edm:TimeOfDay expression evaluates to a primitive time value. A time-of-day expression MUST be |
AzureIoTClient | 0:1f9b2707ec7d | 259 | assigned a value conforming to the rule timeOfDayValue in [OData-ABNF].*/ |
AzureIoTClient | 0:1f9b2707ec7d | 260 | /*timeOfDayValue = hour ":" minute [ ":" second [ "." fractionalSeconds ] ]*/ |
AzureIoTClient | 0:1f9b2707ec7d | 261 | typedef struct EDM_TIME_OF_DAY_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 262 | { |
AzureIoTClient | 0:1f9b2707ec7d | 263 | uint8_t hour; |
AzureIoTClient | 0:1f9b2707ec7d | 264 | uint8_t minute; |
AzureIoTClient | 0:1f9b2707ec7d | 265 | uint8_t second; |
AzureIoTClient | 0:1f9b2707ec7d | 266 | uint64_t fractionalSecond; |
AzureIoTClient | 0:1f9b2707ec7d | 267 | }EDM_TIME_OF_DAY; |
AzureIoTClient | 0:1f9b2707ec7d | 268 | |
AzureIoTClient | 0:1f9b2707ec7d | 269 | /*positionLiteral = doubleValue SP doubleValue ; longitude, then latitude*/ |
AzureIoTClient | 0:1f9b2707ec7d | 270 | typedef struct EDM_POSITION_LITERAL_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 271 | { |
AzureIoTClient | 0:1f9b2707ec7d | 272 | double longitude; |
AzureIoTClient | 0:1f9b2707ec7d | 273 | double latitude; |
AzureIoTClient | 0:1f9b2707ec7d | 274 | }EDM_POSITION_LITERAL; |
AzureIoTClient | 0:1f9b2707ec7d | 275 | |
AzureIoTClient | 0:1f9b2707ec7d | 276 | |
AzureIoTClient | 0:1f9b2707ec7d | 277 | /*sridLiteral = "SRID" EQ 1*5DIGIT SEMI*/ |
AzureIoTClient | 0:1f9b2707ec7d | 278 | typedef struct EDM_SRID_LITERAL_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 279 | { |
AzureIoTClient | 0:1f9b2707ec7d | 280 | uint16_t digits; |
AzureIoTClient | 0:1f9b2707ec7d | 281 | } EDM_SRID_LITERAL; |
AzureIoTClient | 0:1f9b2707ec7d | 282 | |
AzureIoTClient | 0:1f9b2707ec7d | 283 | /*lineStringData = OPEN positionLiteral 1*( COMMA positionLiteral ) CLOSE*/ |
AzureIoTClient | 0:1f9b2707ec7d | 284 | typedef struct EDM_LINE_STRING_DATA_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 285 | { |
AzureIoTClient | 0:1f9b2707ec7d | 286 | size_t nPositionLiterals; |
AzureIoTClient | 0:1f9b2707ec7d | 287 | EDM_POSITION_LITERAL *positionLiterals; |
AzureIoTClient | 0:1f9b2707ec7d | 288 | }EDM_LINE_STRING_DATA; |
AzureIoTClient | 0:1f9b2707ec7d | 289 | |
AzureIoTClient | 0:1f9b2707ec7d | 290 | /*pointData = OPEN positionLiteral CLOSE*/ |
AzureIoTClient | 0:1f9b2707ec7d | 291 | typedef struct EDM_POINT_DATA_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 292 | { |
AzureIoTClient | 0:1f9b2707ec7d | 293 | EDM_POSITION_LITERAL positionLiteral; |
AzureIoTClient | 0:1f9b2707ec7d | 294 | }EDM_POINT_DATA; |
AzureIoTClient | 0:1f9b2707ec7d | 295 | |
AzureIoTClient | 0:1f9b2707ec7d | 296 | /*ringLiteral = OPEN positionLiteral *( COMMA positionLiteral ) CLOSE*/ |
AzureIoTClient | 0:1f9b2707ec7d | 297 | typedef struct EDM_RING_LITERAL_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 298 | { |
AzureIoTClient | 0:1f9b2707ec7d | 299 | size_t nPositionLiterals; |
AzureIoTClient | 0:1f9b2707ec7d | 300 | EDM_POSITION_LITERAL *positionLiterals; |
AzureIoTClient | 0:1f9b2707ec7d | 301 | }EDM_RING_LITERAL; |
AzureIoTClient | 0:1f9b2707ec7d | 302 | |
AzureIoTClient | 0:1f9b2707ec7d | 303 | /*pointLiteral ="Point" pointData*/ |
AzureIoTClient | 0:1f9b2707ec7d | 304 | typedef struct EDM_POINT_LITERAL_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 305 | { |
AzureIoTClient | 0:1f9b2707ec7d | 306 | EDM_POINT_DATA pointData; |
AzureIoTClient | 0:1f9b2707ec7d | 307 | } EDM_POINT_LITERAL; |
AzureIoTClient | 0:1f9b2707ec7d | 308 | |
AzureIoTClient | 0:1f9b2707ec7d | 309 | /*polygonData = OPEN ringLiteral *( COMMA ringLiteral ) CLOSE*/ |
AzureIoTClient | 0:1f9b2707ec7d | 310 | typedef struct EDM_POLYGON_DATA_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 311 | { |
AzureIoTClient | 0:1f9b2707ec7d | 312 | size_t nRingLiterals; |
AzureIoTClient | 0:1f9b2707ec7d | 313 | EDM_RING_LITERAL *ringLiterals; |
AzureIoTClient | 0:1f9b2707ec7d | 314 | }EDM_POLYGON_DATA; |
AzureIoTClient | 0:1f9b2707ec7d | 315 | |
AzureIoTClient | 0:1f9b2707ec7d | 316 | /*polygonLiteral = "Polygon" polygonData*/ |
AzureIoTClient | 0:1f9b2707ec7d | 317 | typedef struct EDM_POLYGON_LITERAL_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 318 | { |
AzureIoTClient | 0:1f9b2707ec7d | 319 | EDM_POLYGON_DATA polygonData; |
AzureIoTClient | 0:1f9b2707ec7d | 320 | }EDM_POLYGON_LITERAL; |
AzureIoTClient | 0:1f9b2707ec7d | 321 | |
AzureIoTClient | 0:1f9b2707ec7d | 322 | /*fullPolygonLiteral = sridLiteral polygonLiteral*/ |
AzureIoTClient | 0:1f9b2707ec7d | 323 | typedef struct EDM_FULL_POLYGON_LITERAL_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 324 | { |
AzureIoTClient | 0:1f9b2707ec7d | 325 | EDM_SRID_LITERAL srid; |
AzureIoTClient | 0:1f9b2707ec7d | 326 | EDM_POLYGON_LITERAL polygonLiteral; |
AzureIoTClient | 0:1f9b2707ec7d | 327 | }EDM_FULL_POLYGON_LITERAL; |
AzureIoTClient | 0:1f9b2707ec7d | 328 | |
AzureIoTClient | 0:1f9b2707ec7d | 329 | /*fullPointLiteral = sridLiteral pointLiteral*/ |
AzureIoTClient | 0:1f9b2707ec7d | 330 | typedef struct EDM_FULL_POINT_LITERAL_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 331 | { |
AzureIoTClient | 0:1f9b2707ec7d | 332 | EDM_SRID_LITERAL srid; |
AzureIoTClient | 0:1f9b2707ec7d | 333 | EDM_POINT_LITERAL pointLiteral; |
AzureIoTClient | 0:1f9b2707ec7d | 334 | } EDM_FULL_POINT_LITERAL; |
AzureIoTClient | 0:1f9b2707ec7d | 335 | |
AzureIoTClient | 0:1f9b2707ec7d | 336 | /*geographyPoint = geographyPrefix SQUOTE fullPointLiteral SQUOTE*/ |
AzureIoTClient | 0:1f9b2707ec7d | 337 | typedef struct EDM_GEOGRAPHY_POINT_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 338 | { |
AzureIoTClient | 0:1f9b2707ec7d | 339 | EDM_FULL_POINT_LITERAL fullPointLiteral; |
AzureIoTClient | 0:1f9b2707ec7d | 340 | }EDM_GEOGRAPHY_POINT; |
AzureIoTClient | 0:1f9b2707ec7d | 341 | |
AzureIoTClient | 0:1f9b2707ec7d | 342 | /*multiPolygonLiteral = "MultiPolygon(" [ polygonData *( COMMA polygonData ) ] CLOSE*/ |
AzureIoTClient | 0:1f9b2707ec7d | 343 | typedef struct EDM_MULTI_POLYGON_LITERAL_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 344 | { |
AzureIoTClient | 0:1f9b2707ec7d | 345 | size_t nPolygonDatas; |
AzureIoTClient | 0:1f9b2707ec7d | 346 | EDM_POLYGON_DATA * polygonDatas; |
AzureIoTClient | 0:1f9b2707ec7d | 347 | }EDM_MULTI_POLYGON_LITERAL; |
AzureIoTClient | 0:1f9b2707ec7d | 348 | |
AzureIoTClient | 0:1f9b2707ec7d | 349 | /*fullMultiPolygonLiteral = sridLiteral multiPolygonLiteral*/ |
AzureIoTClient | 0:1f9b2707ec7d | 350 | typedef struct EDM_FULL_MULTI_POLYGON_LITERAL_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 351 | { |
AzureIoTClient | 0:1f9b2707ec7d | 352 | EDM_SRID_LITERAL srid; |
AzureIoTClient | 0:1f9b2707ec7d | 353 | EDM_MULTI_POLYGON_LITERAL multiPolygonLiteral; |
AzureIoTClient | 0:1f9b2707ec7d | 354 | }EDM_FULL_MULTI_POLYGON_LITERAL; |
AzureIoTClient | 0:1f9b2707ec7d | 355 | |
AzureIoTClient | 0:1f9b2707ec7d | 356 | /*multiPointLiteral = "MultiPoint(" [ pointData *( COMMA pointData ) ] CLOSE*/ |
AzureIoTClient | 0:1f9b2707ec7d | 357 | typedef struct EDM_MULTI_POINT_LITERAL_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 358 | { |
AzureIoTClient | 0:1f9b2707ec7d | 359 | size_t nPointDatas; |
AzureIoTClient | 0:1f9b2707ec7d | 360 | EDM_POINT_DATA *pointDatas; |
AzureIoTClient | 0:1f9b2707ec7d | 361 | }EDM_MULTI_POINT_LITERAL; |
AzureIoTClient | 0:1f9b2707ec7d | 362 | |
AzureIoTClient | 0:1f9b2707ec7d | 363 | /*fullMultiPointLiteral = sridLiteral multiPointLiteral*/ |
AzureIoTClient | 0:1f9b2707ec7d | 364 | typedef struct EDM_FULL_MULTI_POINT_LITERAL_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 365 | { |
AzureIoTClient | 0:1f9b2707ec7d | 366 | EDM_SRID_LITERAL srid; |
AzureIoTClient | 0:1f9b2707ec7d | 367 | EDM_MULTI_POINT_LITERAL multiPointLiteral; |
AzureIoTClient | 0:1f9b2707ec7d | 368 | }EDM_FULL_MULTI_POINT_LITERAL; |
AzureIoTClient | 0:1f9b2707ec7d | 369 | |
AzureIoTClient | 0:1f9b2707ec7d | 370 | /*lineStringLiteral = "LineString" lineStringData*/ |
AzureIoTClient | 0:1f9b2707ec7d | 371 | typedef struct EDM_LINE_STRING_LITERAL_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 372 | { |
AzureIoTClient | 0:1f9b2707ec7d | 373 | EDM_LINE_STRING_DATA lineStringData; |
AzureIoTClient | 0:1f9b2707ec7d | 374 | }EDM_LINE_STRING_LITERAL; |
AzureIoTClient | 0:1f9b2707ec7d | 375 | |
AzureIoTClient | 0:1f9b2707ec7d | 376 | /*fullLineStringLiteral = sridLiteral lineStringLiteral*/ |
AzureIoTClient | 0:1f9b2707ec7d | 377 | typedef struct EDM_FULL_LINE_STRING_LITERAL_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 378 | { |
AzureIoTClient | 0:1f9b2707ec7d | 379 | EDM_SRID_LITERAL srid; |
AzureIoTClient | 0:1f9b2707ec7d | 380 | EDM_LINE_STRING_LITERAL lineStringLiteral; |
AzureIoTClient | 0:1f9b2707ec7d | 381 | } EDM_FULL_LINE_STRING_LITERAL; |
AzureIoTClient | 0:1f9b2707ec7d | 382 | |
AzureIoTClient | 0:1f9b2707ec7d | 383 | /*multiLineStringLiteral = "MultiLineString(" [ lineStringData *( COMMA lineStringData ) ] CLOSE*/ |
AzureIoTClient | 0:1f9b2707ec7d | 384 | typedef struct EDM_MULTI_LINE_STRING_LITERAL_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 385 | { |
AzureIoTClient | 0:1f9b2707ec7d | 386 | size_t nLineStringDatas; |
AzureIoTClient | 0:1f9b2707ec7d | 387 | EDM_LINE_STRING_DATA lineStringData; |
AzureIoTClient | 0:1f9b2707ec7d | 388 | }EDM_MULTI_LINE_STRING_LITERAL; |
AzureIoTClient | 0:1f9b2707ec7d | 389 | |
AzureIoTClient | 0:1f9b2707ec7d | 390 | /*fullMultiLineStringLiteral = sridLiteral multiLineStringLiteral*/ |
AzureIoTClient | 0:1f9b2707ec7d | 391 | typedef struct EDM_FULL_MULTI_LINE_STRING_LITERAL_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 392 | { |
AzureIoTClient | 0:1f9b2707ec7d | 393 | EDM_SRID_LITERAL srid; |
AzureIoTClient | 0:1f9b2707ec7d | 394 | EDM_MULTI_LINE_STRING_LITERAL multiLineStringLiteral; |
AzureIoTClient | 0:1f9b2707ec7d | 395 | }EDM_FULL_MULTI_LINE_STRING_LITERAL; |
AzureIoTClient | 0:1f9b2707ec7d | 396 | |
AzureIoTClient | 0:1f9b2707ec7d | 397 | |
AzureIoTClient | 0:1f9b2707ec7d | 398 | |
AzureIoTClient | 0:1f9b2707ec7d | 399 | /*forward defines*/ |
AzureIoTClient | 0:1f9b2707ec7d | 400 | struct EDM_GEO_LITERAL_TAG; |
AzureIoTClient | 0:1f9b2707ec7d | 401 | typedef struct EDM_GEO_LITERAL_TAG EDM_GEO_LITERAL; |
AzureIoTClient | 0:1f9b2707ec7d | 402 | |
AzureIoTClient | 0:1f9b2707ec7d | 403 | /*collectionLiteral = "Collection(" geoLiteral *( COMMA geoLiteral ) CLOSE*/ |
AzureIoTClient | 0:1f9b2707ec7d | 404 | typedef struct EDM_COLLECTION_LITERAL_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 405 | { |
AzureIoTClient | 0:1f9b2707ec7d | 406 | size_t nGeoLiterals; |
AzureIoTClient | 0:1f9b2707ec7d | 407 | EDM_GEO_LITERAL* geoLiterals; |
AzureIoTClient | 0:1f9b2707ec7d | 408 | } EDM_COLLECTION_LITERAL; |
AzureIoTClient | 0:1f9b2707ec7d | 409 | |
AzureIoTClient | 0:1f9b2707ec7d | 410 | /*geoLiteral = collectionLiteral |
AzureIoTClient | 0:1f9b2707ec7d | 411 | / lineStringLiteral |
AzureIoTClient | 0:1f9b2707ec7d | 412 | / multiPointLiteral |
AzureIoTClient | 0:1f9b2707ec7d | 413 | / multiLineStringLiteral |
AzureIoTClient | 0:1f9b2707ec7d | 414 | / multiPolygonLiteral |
AzureIoTClient | 0:1f9b2707ec7d | 415 | / pointLiteral |
AzureIoTClient | 0:1f9b2707ec7d | 416 | / polygonLiteral |
AzureIoTClient | 0:1f9b2707ec7d | 417 | */ |
AzureIoTClient | 0:1f9b2707ec7d | 418 | typedef enum EDM_GEO_LITERAL_TYPE_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 419 | { |
AzureIoTClient | 0:1f9b2707ec7d | 420 | EDM_COLLECTION_LITERAL_TYPE, |
AzureIoTClient | 0:1f9b2707ec7d | 421 | EDM_LINE_STRING_LITERAL_TYPE, |
AzureIoTClient | 0:1f9b2707ec7d | 422 | EDM_MULTI_POINT_LITERAL_TYPE, |
AzureIoTClient | 0:1f9b2707ec7d | 423 | EDM_MULTI_LINE_STRING_LITERAL_TYPE, |
AzureIoTClient | 0:1f9b2707ec7d | 424 | EDM_MULTI_POLIGON_LITERAL_TYPE, |
AzureIoTClient | 0:1f9b2707ec7d | 425 | EDM_POINT_LITERAL_TYPE, |
AzureIoTClient | 0:1f9b2707ec7d | 426 | EDM_POLYGON_LITERAL_TYPE |
AzureIoTClient | 0:1f9b2707ec7d | 427 | }EDM_GEO_LITERAL_TYPE; |
AzureIoTClient | 0:1f9b2707ec7d | 428 | |
AzureIoTClient | 0:1f9b2707ec7d | 429 | struct EDM_GEO_LITERAL_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 430 | { |
AzureIoTClient | 0:1f9b2707ec7d | 431 | EDM_GEO_LITERAL_TYPE literalType; |
AzureIoTClient | 0:1f9b2707ec7d | 432 | union |
AzureIoTClient | 0:1f9b2707ec7d | 433 | { |
AzureIoTClient | 0:1f9b2707ec7d | 434 | EDM_COLLECTION_LITERAL collectionLiteral; |
AzureIoTClient | 0:1f9b2707ec7d | 435 | EDM_LINE_STRING_LITERAL lineStringLiteral; |
AzureIoTClient | 0:1f9b2707ec7d | 436 | EDM_MULTI_POINT_LITERAL multiPointLiteral; |
AzureIoTClient | 0:1f9b2707ec7d | 437 | EDM_MULTI_LINE_STRING_LITERAL multiLineStringLiteral; |
AzureIoTClient | 0:1f9b2707ec7d | 438 | EDM_MULTI_POLYGON_LITERAL multiPolygonLiteral; |
AzureIoTClient | 0:1f9b2707ec7d | 439 | EDM_POINT_LITERAL pointLiteral; |
AzureIoTClient | 0:1f9b2707ec7d | 440 | EDM_POLYGON_LITERAL polygonLiteral; |
AzureIoTClient | 0:1f9b2707ec7d | 441 | } u; |
AzureIoTClient | 0:1f9b2707ec7d | 442 | }; |
AzureIoTClient | 0:1f9b2707ec7d | 443 | |
AzureIoTClient | 0:1f9b2707ec7d | 444 | /*fullCollectionLiteral = sridLiteral collectionLiteral*/ |
AzureIoTClient | 0:1f9b2707ec7d | 445 | typedef struct EDM_FULL_COLLECTION_LITERAL_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 446 | { |
AzureIoTClient | 0:1f9b2707ec7d | 447 | EDM_SRID_LITERAL srid; |
AzureIoTClient | 0:1f9b2707ec7d | 448 | EDM_COLLECTION_LITERAL collectionLiteral; |
AzureIoTClient | 0:1f9b2707ec7d | 449 | }EDM_FULL_COLLECTION_LITERAL; |
AzureIoTClient | 0:1f9b2707ec7d | 450 | |
AzureIoTClient | 0:1f9b2707ec7d | 451 | /*now geography stuff*/ |
AzureIoTClient | 0:1f9b2707ec7d | 452 | |
AzureIoTClient | 0:1f9b2707ec7d | 453 | /*geographyCollection = geographyPrefix SQUOTE fullCollectionLiteral SQUOTE*/ |
AzureIoTClient | 0:1f9b2707ec7d | 454 | typedef struct EDM_GEOGRAPHY_COLLECTION_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 455 | { |
AzureIoTClient | 0:1f9b2707ec7d | 456 | EDM_FULL_COLLECTION_LITERAL fullCollectionLiteral; |
AzureIoTClient | 0:1f9b2707ec7d | 457 | }EDM_GEOGRAPHY_COLLECTION; |
AzureIoTClient | 0:1f9b2707ec7d | 458 | |
AzureIoTClient | 0:1f9b2707ec7d | 459 | /*geographyLineString = geographyPrefix SQUOTE fullLineStringLiteral SQUOTE*/ |
AzureIoTClient | 0:1f9b2707ec7d | 460 | typedef struct EDM_GEOGRAPHY_LINE_STRING_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 461 | { |
AzureIoTClient | 0:1f9b2707ec7d | 462 | EDM_FULL_LINE_STRING_LITERAL fullLineStringLiteral; |
AzureIoTClient | 0:1f9b2707ec7d | 463 | }EDM_GEOGRAPHY_LINE_STRING; |
AzureIoTClient | 0:1f9b2707ec7d | 464 | |
AzureIoTClient | 0:1f9b2707ec7d | 465 | /*geographyMultiLineString = geographyPrefix SQUOTE fullMultiLineStringLiteral SQUOTE*/ |
AzureIoTClient | 0:1f9b2707ec7d | 466 | typedef struct EDM_GEOGRAPHY_MULTI_LINE_STRING_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 467 | { |
AzureIoTClient | 0:1f9b2707ec7d | 468 | EDM_FULL_MULTI_LINE_STRING_LITERAL fullMultiLineStringLiteral; |
AzureIoTClient | 0:1f9b2707ec7d | 469 | }EDM_GEOGRAPHY_MULTI_LINE_STRING; |
AzureIoTClient | 0:1f9b2707ec7d | 470 | |
AzureIoTClient | 0:1f9b2707ec7d | 471 | /*geographyMultiPoint = geographyPrefix SQUOTE fullMultiPointLiteral SQUOTE*/ |
AzureIoTClient | 0:1f9b2707ec7d | 472 | typedef struct EDM_GEOGRAPHY_MULTI_POINT_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 473 | { |
AzureIoTClient | 0:1f9b2707ec7d | 474 | EDM_FULL_MULTI_POINT_LITERAL fullMultiPointLiteral; |
AzureIoTClient | 0:1f9b2707ec7d | 475 | }EDM_GEOGRAPHY_MULTI_POINT; |
AzureIoTClient | 0:1f9b2707ec7d | 476 | |
AzureIoTClient | 0:1f9b2707ec7d | 477 | /*geographyMultiPolygon = geographyPrefix SQUOTE fullMultiPolygonLiteral SQUOTE*/ |
AzureIoTClient | 0:1f9b2707ec7d | 478 | typedef struct EDM_GEOGRAPHY_MULTI_POLYGON_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 479 | { |
AzureIoTClient | 0:1f9b2707ec7d | 480 | EDM_FULL_MULTI_POLYGON_LITERAL fullMultiPolygonLiteral; |
AzureIoTClient | 0:1f9b2707ec7d | 481 | }EDM_GEOGRAPHY_MULTI_POLYGON; |
AzureIoTClient | 0:1f9b2707ec7d | 482 | |
AzureIoTClient | 0:1f9b2707ec7d | 483 | /*geographyPolygon = geographyPrefix SQUOTE fullPolygonLiteral SQUOTE*/ |
AzureIoTClient | 0:1f9b2707ec7d | 484 | typedef struct EDM_GEOGRAPHY_POLYGON_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 485 | { |
AzureIoTClient | 0:1f9b2707ec7d | 486 | EDM_FULL_POLYGON_LITERAL fullPolygonLiteral; |
AzureIoTClient | 0:1f9b2707ec7d | 487 | }EDM_GEOGRAPHY_POLYGON; |
AzureIoTClient | 0:1f9b2707ec7d | 488 | |
AzureIoTClient | 0:1f9b2707ec7d | 489 | /*geometryCollection = geometryPrefix SQUOTE fullCollectionLiteral SQUOTE*/ |
AzureIoTClient | 0:1f9b2707ec7d | 490 | /*forward defines*/ |
AzureIoTClient | 0:1f9b2707ec7d | 491 | |
AzureIoTClient | 0:1f9b2707ec7d | 492 | |
AzureIoTClient | 0:1f9b2707ec7d | 493 | /*geometryPolygon = geometryPrefix SQUOTE fullPolygonLiteral SQUOTE*/ |
AzureIoTClient | 0:1f9b2707ec7d | 494 | typedef struct EDM_GEOMETRY_POLYGON_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 495 | { |
AzureIoTClient | 0:1f9b2707ec7d | 496 | EDM_FULL_POLYGON_LITERAL fullPolygonLiteral; |
AzureIoTClient | 0:1f9b2707ec7d | 497 | }EDM_GEOMETRY_POLYGON; |
AzureIoTClient | 0:1f9b2707ec7d | 498 | |
AzureIoTClient | 0:1f9b2707ec7d | 499 | /*geometryPoint = geometryPrefix SQUOTE fullPointLiteral SQUOTE*/ |
AzureIoTClient | 0:1f9b2707ec7d | 500 | typedef struct EDM_GEOMETRY_POINT_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 501 | { |
AzureIoTClient | 0:1f9b2707ec7d | 502 | EDM_FULL_POINT_LITERAL fullPointLiteral; |
AzureIoTClient | 0:1f9b2707ec7d | 503 | }EDM_GEOMETRY_POINT; |
AzureIoTClient | 0:1f9b2707ec7d | 504 | |
AzureIoTClient | 0:1f9b2707ec7d | 505 | /*geometryMultiPolygon = geometryPrefix SQUOTE fullMultiPolygonLiteral SQUOTE*/ |
AzureIoTClient | 0:1f9b2707ec7d | 506 | typedef struct EDM_GEOMETRY_MULTI_POLYGON_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 507 | { |
AzureIoTClient | 0:1f9b2707ec7d | 508 | EDM_FULL_MULTI_POLYGON_LITERAL fullMultiPolygonLiteral; |
AzureIoTClient | 0:1f9b2707ec7d | 509 | } |
AzureIoTClient | 0:1f9b2707ec7d | 510 | EDM_GEOMETRY_MULTI_POLYGON; |
AzureIoTClient | 0:1f9b2707ec7d | 511 | |
AzureIoTClient | 0:1f9b2707ec7d | 512 | /*geometryMultiPoint = geometryPrefix SQUOTE fullMultiPointLiteral SQUOTE*/ |
AzureIoTClient | 0:1f9b2707ec7d | 513 | typedef struct EDM_GEOMETRY_MULTI_POINT_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 514 | { |
AzureIoTClient | 0:1f9b2707ec7d | 515 | EDM_FULL_MULTI_POINT_LITERAL fullMultiPointLiteral; |
AzureIoTClient | 0:1f9b2707ec7d | 516 | }EDM_GEOMETRY_MULTI_POINT; |
AzureIoTClient | 0:1f9b2707ec7d | 517 | |
AzureIoTClient | 0:1f9b2707ec7d | 518 | /*geometryMultiLineString = geometryPrefix SQUOTE fullMultiLineStringLiteral SQUOTE*/ |
AzureIoTClient | 0:1f9b2707ec7d | 519 | typedef struct EDM_GEOMETRY_MULTI_LINE_STRING_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 520 | { |
AzureIoTClient | 0:1f9b2707ec7d | 521 | EDM_FULL_MULTI_LINE_STRING_LITERAL fullMultiLineStringLiteral; |
AzureIoTClient | 0:1f9b2707ec7d | 522 | }EDM_GEOMETRY_MULTI_LINE_STRING; |
AzureIoTClient | 0:1f9b2707ec7d | 523 | |
AzureIoTClient | 0:1f9b2707ec7d | 524 | /*geometryLineString = geometryPrefix SQUOTE fullLineStringLiteral SQUOTE*/ |
AzureIoTClient | 0:1f9b2707ec7d | 525 | typedef struct EDM_GEOMETRY_LINE_STRING_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 526 | { |
AzureIoTClient | 0:1f9b2707ec7d | 527 | EDM_FULL_LINE_STRING_LITERAL fullLineStringLiteral; |
AzureIoTClient | 0:1f9b2707ec7d | 528 | }EDM_GEOMETRY_LINE_STRING; |
AzureIoTClient | 0:1f9b2707ec7d | 529 | |
AzureIoTClient | 0:1f9b2707ec7d | 530 | /*geometryCollection = geometryPrefix SQUOTE fullCollectionLiteral SQUOTE*/ |
AzureIoTClient | 0:1f9b2707ec7d | 531 | typedef struct EDM_GEOMETRY_COLLECTION_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 532 | { |
AzureIoTClient | 0:1f9b2707ec7d | 533 | EDM_FULL_COLLECTION_LITERAL fullCollectionLiteral; |
AzureIoTClient | 0:1f9b2707ec7d | 534 | }EDM_GEOMETRY_COLLECTION; |
AzureIoTClient | 0:1f9b2707ec7d | 535 | |
AzureIoTClient | 0:1f9b2707ec7d | 536 | /*holds the name and the value of a COMPLEX_TYPE... field*/ |
AzureIoTClient | 0:1f9b2707ec7d | 537 | typedef struct COMPLEX_TYPE_FIELD_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 538 | { |
AzureIoTClient | 0:1f9b2707ec7d | 539 | const char* fieldName; |
AzureIoTClient | 0:1f9b2707ec7d | 540 | AGENT_DATA_TYPE* value; |
AzureIoTClient | 0:1f9b2707ec7d | 541 | }COMPLEX_TYPE_FIELD_TYPE; |
AzureIoTClient | 0:1f9b2707ec7d | 542 | |
AzureIoTClient | 0:1f9b2707ec7d | 543 | /*EDM_COMPLEX_TYPE - this type doesn't exist in EDMX as a primitive type*/ |
AzureIoTClient | 0:1f9b2707ec7d | 544 | typedef struct EDM_COMPLEX_TYPE_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 545 | { |
AzureIoTClient | 0:1f9b2707ec7d | 546 | size_t nMembers; |
AzureIoTClient | 0:1f9b2707ec7d | 547 | COMPLEX_TYPE_FIELD_TYPE *fields; |
AzureIoTClient | 0:1f9b2707ec7d | 548 | }EDM_COMPLEX_TYPE; |
AzureIoTClient | 0:1f9b2707ec7d | 549 | |
AzureIoTClient | 0:1f9b2707ec7d | 550 | #define AGENT_DATA_TYPES_RESULT_VALUES \ |
AzureIoTClient | 0:1f9b2707ec7d | 551 | AGENT_DATA_TYPES_OK, \ |
AzureIoTClient | 0:1f9b2707ec7d | 552 | AGENT_DATA_TYPES_ERROR, \ |
AzureIoTClient | 0:1f9b2707ec7d | 553 | AGENT_DATA_TYPES_INVALID_ARG, \ |
AzureIoTClient | 0:1f9b2707ec7d | 554 | AGENT_DATA_TYPES_NOT_IMPLEMENTED, \ |
AzureIoTClient | 0:1f9b2707ec7d | 555 | AGENT_DATA_TYPES_JSON_ENCODER_ERRROR |
AzureIoTClient | 0:1f9b2707ec7d | 556 | |
AzureIoTClient | 0:1f9b2707ec7d | 557 | DEFINE_ENUM(AGENT_DATA_TYPES_RESULT, AGENT_DATA_TYPES_RESULT_VALUES); |
AzureIoTClient | 0:1f9b2707ec7d | 558 | |
AzureIoTClient | 0:1f9b2707ec7d | 559 | #define AGENT_DATA_TYPE_TYPE_VALUES\ |
AzureIoTClient | 0:1f9b2707ec7d | 560 | EDM_NO_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 561 | EDM_BINARY_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 562 | EDM_BOOLEAN_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 563 | EDM_BYTE_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 564 | EDM_DATE_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 565 | EDM_DATE_TIME_OFFSET_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 566 | EDM_DECIMAL_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 567 | EDM_DOUBLE_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 568 | EDM_DURATION_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 569 | EDM_GUID_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 570 | EDM_INT16_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 571 | EDM_INT32_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 572 | EDM_INT64_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 573 | EDM_SBYTE_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 574 | EDM_SINGLE_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 575 | EDM_STREAM, /*not supported, because what is stream?*/ \ |
AzureIoTClient | 0:1f9b2707ec7d | 576 | EDM_STRING_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 577 | EDM_TIME_OF_DAY_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 578 | EDM_GEOGRAPHY_TYPE, /*not supported because what is "abstract base type"*/ \ |
AzureIoTClient | 0:1f9b2707ec7d | 579 | EDM_GEOGRAPHY_POINT_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 580 | EDM_GEOGRAPHY_LINE_STRING_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 581 | EDM_GEOGRAPHY_POLYGON_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 582 | EDM_GEOGRAPHY_MULTI_POINT_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 583 | EDM_GEOGRAPHY_MULTI_LINE_STRING_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 584 | EDM_GEOGRAPHY_MULTI_POLYGON_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 585 | EDM_GEOGRAPHY_COLLECTION_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 586 | EDM_GEOMETRY_TYPE, /*not supported because what is "abstract base type"*/ \ |
AzureIoTClient | 0:1f9b2707ec7d | 587 | EDM_GEOMETRY_POINT_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 588 | EDM_GEOMETRY_LINE_STRING_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 589 | EDM_GEOMETRY_POLYGON_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 590 | EDM_GEOMETRY_MULTI_POINT_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 591 | EDM_GEOMETRY_MULTI_LINE_STRING_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 592 | EDM_GEOMETRY_MULTI_POLYGON_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 593 | EDM_GEOMETRY_COLLECTION_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 594 | EDM_COMPLEX_TYPE_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 595 | EDM_NULL_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 596 | EDM_ENTITY_TYPE_TYPE, \ |
AzureIoTClient | 0:1f9b2707ec7d | 597 | EDM_STRING_NO_QUOTES_TYPE \ |
AzureIoTClient | 0:1f9b2707ec7d | 598 | |
AzureIoTClient | 0:1f9b2707ec7d | 599 | |
AzureIoTClient | 0:1f9b2707ec7d | 600 | DEFINE_ENUM(AGENT_DATA_TYPE_TYPE, AGENT_DATA_TYPE_TYPE_VALUES); |
AzureIoTClient | 0:1f9b2707ec7d | 601 | |
AzureIoTClient | 12:fe346da49d58 | 602 | struct AGENT_DATA_TYPE_TAG |
AzureIoTClient | 0:1f9b2707ec7d | 603 | { |
AzureIoTClient | 0:1f9b2707ec7d | 604 | AGENT_DATA_TYPE_TYPE type; |
AzureIoTClient | 0:1f9b2707ec7d | 605 | union |
AzureIoTClient | 0:1f9b2707ec7d | 606 | { |
AzureIoTClient | 0:1f9b2707ec7d | 607 | EDM_BINARY edmBinary; |
AzureIoTClient | 0:1f9b2707ec7d | 608 | EDM_BOOLEAN edmBoolean; |
AzureIoTClient | 0:1f9b2707ec7d | 609 | EDM_BYTE edmByte; |
AzureIoTClient | 0:1f9b2707ec7d | 610 | EDM_DATE edmDate; |
AzureIoTClient | 0:1f9b2707ec7d | 611 | EDM_DATE_TIME_OFFSET edmDateTimeOffset; |
AzureIoTClient | 0:1f9b2707ec7d | 612 | EDM_DECIMAL edmDecimal; |
AzureIoTClient | 0:1f9b2707ec7d | 613 | EDM_DOUBLE edmDouble; |
AzureIoTClient | 0:1f9b2707ec7d | 614 | EDM_DURATION edmDuration; |
AzureIoTClient | 0:1f9b2707ec7d | 615 | EDM_GUID edmGuid; |
AzureIoTClient | 0:1f9b2707ec7d | 616 | EDM_INT16 edmInt16; |
AzureIoTClient | 0:1f9b2707ec7d | 617 | EDM_INT32 edmInt32; |
AzureIoTClient | 0:1f9b2707ec7d | 618 | EDM_INT64 edmInt64; |
AzureIoTClient | 0:1f9b2707ec7d | 619 | EDM_SBYTE edmSbyte; |
AzureIoTClient | 0:1f9b2707ec7d | 620 | EDM_SINGLE edmSingle; |
AzureIoTClient | 0:1f9b2707ec7d | 621 | /*EDM_STREAM, not supported, because what is stream?*/ |
AzureIoTClient | 0:1f9b2707ec7d | 622 | EDM_STRING edmString; |
AzureIoTClient | 0:1f9b2707ec7d | 623 | EDM_STRING edmStringNoQuotes; |
AzureIoTClient | 0:1f9b2707ec7d | 624 | EDM_TIME_OF_DAY edmTimeOfDay; |
AzureIoTClient | 0:1f9b2707ec7d | 625 | /*EDM_GEOGRAPHY_, not supported because what is "abstract base type"*/ |
AzureIoTClient | 0:1f9b2707ec7d | 626 | EDM_GEOGRAPHY_POINT edmGeographyPoint; |
AzureIoTClient | 0:1f9b2707ec7d | 627 | EDM_GEOGRAPHY_LINE_STRING edmGeographyLineString; |
AzureIoTClient | 0:1f9b2707ec7d | 628 | EDM_GEOGRAPHY_POLYGON edmGeographyPolygon; |
AzureIoTClient | 0:1f9b2707ec7d | 629 | EDM_GEOGRAPHY_MULTI_POINT edmGeographyMultiPoint; |
AzureIoTClient | 0:1f9b2707ec7d | 630 | EDM_GEOGRAPHY_MULTI_LINE_STRING edmGeographyMultiLineString; |
AzureIoTClient | 0:1f9b2707ec7d | 631 | EDM_GEOGRAPHY_MULTI_POLYGON edmGeographyMultiPolygon; |
AzureIoTClient | 0:1f9b2707ec7d | 632 | EDM_GEOGRAPHY_COLLECTION edmGeographyCollection; |
AzureIoTClient | 0:1f9b2707ec7d | 633 | /* EDM_GEOMETRY_, not supported because what is "abstract base type"*/ |
AzureIoTClient | 0:1f9b2707ec7d | 634 | EDM_GEOMETRY_POINT edmGeometryPoint; |
AzureIoTClient | 0:1f9b2707ec7d | 635 | EDM_GEOMETRY_LINE_STRING edmGeometryLineString; |
AzureIoTClient | 0:1f9b2707ec7d | 636 | EDM_GEOMETRY_POLYGON edmGeometryPolygon; |
AzureIoTClient | 0:1f9b2707ec7d | 637 | EDM_GEOMETRY_MULTI_POINT edmGeometryMultiPoint; |
AzureIoTClient | 0:1f9b2707ec7d | 638 | EDM_GEOMETRY_MULTI_LINE_STRING edmGeoemtryMultiLineString; |
AzureIoTClient | 0:1f9b2707ec7d | 639 | EDM_GEOMETRY_MULTI_POLYGON edmGeometryMultiPolygon; |
AzureIoTClient | 0:1f9b2707ec7d | 640 | EDM_GEOMETRY_COLLECTION edmGeometryCollection; |
AzureIoTClient | 0:1f9b2707ec7d | 641 | EDM_COMPLEX_TYPE edmComplexType; |
AzureIoTClient | 0:1f9b2707ec7d | 642 | } value; |
AzureIoTClient | 12:fe346da49d58 | 643 | }; |
AzureIoTClient | 0:1f9b2707ec7d | 644 | |
AzureIoTClient | 17:fa1bba4c6053 | 645 | #include "azure_c_shared_utility/umock_c_prod.h" |
AzureIoTClient | 0:1f9b2707ec7d | 646 | |
AzureIoTClient | 17:fa1bba4c6053 | 647 | MOCKABLE_FUNCTION(, AGENT_DATA_TYPES_RESULT, AgentDataTypes_ToString, STRING_HANDLE, destination, const AGENT_DATA_TYPE*, value); |
AzureIoTClient | 0:1f9b2707ec7d | 648 | |
AzureIoTClient | 0:1f9b2707ec7d | 649 | /*Create/Destroy work in pairs. For some data type not calling Uncreate might be ok. For some, it will lead to memory leaks*/ |
AzureIoTClient | 0:1f9b2707ec7d | 650 | |
AzureIoTClient | 0:1f9b2707ec7d | 651 | /*creates an AGENT_DATA_TYPE containing a EDM_BOOLEAN from a int*/ |
AzureIoTClient | 17:fa1bba4c6053 | 652 | MOCKABLE_FUNCTION(, AGENT_DATA_TYPES_RESULT, Create_EDM_BOOLEAN_from_int, AGENT_DATA_TYPE*, agentData, int, v); |
AzureIoTClient | 0:1f9b2707ec7d | 653 | |
AzureIoTClient | 0:1f9b2707ec7d | 654 | /*creates an AGENT_DATA_TYPE containing a UINT8*/ |
AzureIoTClient | 17:fa1bba4c6053 | 655 | MOCKABLE_FUNCTION(, AGENT_DATA_TYPES_RESULT, Create_AGENT_DATA_TYPE_from_UINT8, AGENT_DATA_TYPE*, agentData, uint8_t, v); |
AzureIoTClient | 0:1f9b2707ec7d | 656 | |
AzureIoTClient | 0:1f9b2707ec7d | 657 | /*creates an AGENT_DATA_TYPE containing a EDM_DATE */ |
AzureIoTClient | 17:fa1bba4c6053 | 658 | MOCKABLE_FUNCTION(, AGENT_DATA_TYPES_RESULT, Create_AGENT_DATA_TYPE_from_date, AGENT_DATA_TYPE*, agentData, int16_t, year, uint8_t, month, uint8_t, day); |
AzureIoTClient | 0:1f9b2707ec7d | 659 | |
AzureIoTClient | 0:1f9b2707ec7d | 660 | /*create an AGENT_DATA_TYPE containing an EDM_DECIMAL from a string representation*/ |
AzureIoTClient | 17:fa1bba4c6053 | 661 | MOCKABLE_FUNCTION(, AGENT_DATA_TYPES_RESULT, Create_EDM_DECIMAL_from_charz, AGENT_DATA_TYPE*, agentData, const char*, v); |
AzureIoTClient | 0:1f9b2707ec7d | 662 | |
AzureIoTClient | 0:1f9b2707ec7d | 663 | /*create an AGENT_DATA_TYPE containing an EDM_DOUBLE from a double*/ |
AzureIoTClient | 17:fa1bba4c6053 | 664 | MOCKABLE_FUNCTION(, AGENT_DATA_TYPES_RESULT, Create_AGENT_DATA_TYPE_from_DOUBLE, AGENT_DATA_TYPE*, agentData, double, v); |
AzureIoTClient | 0:1f9b2707ec7d | 665 | |
AzureIoTClient | 0:1f9b2707ec7d | 666 | /*create an AGENT_DATA_TYPE from INT16_T*/ |
AzureIoTClient | 17:fa1bba4c6053 | 667 | MOCKABLE_FUNCTION(, AGENT_DATA_TYPES_RESULT, Create_AGENT_DATA_TYPE_from_SINT16, AGENT_DATA_TYPE*, agentData, int16_t, v); |
AzureIoTClient | 0:1f9b2707ec7d | 668 | |
AzureIoTClient | 0:1f9b2707ec7d | 669 | /*create an AGENT_DATA_TYPE from INT32_T*/ |
AzureIoTClient | 17:fa1bba4c6053 | 670 | MOCKABLE_FUNCTION(, AGENT_DATA_TYPES_RESULT, Create_AGENT_DATA_TYPE_from_SINT32, AGENT_DATA_TYPE*, agentData, int32_t, v); |
AzureIoTClient | 0:1f9b2707ec7d | 671 | |
AzureIoTClient | 0:1f9b2707ec7d | 672 | /*create an AGENT_DATA_TYPE from INT64_T*/ |
AzureIoTClient | 17:fa1bba4c6053 | 673 | MOCKABLE_FUNCTION(, AGENT_DATA_TYPES_RESULT, Create_AGENT_DATA_TYPE_from_SINT64, AGENT_DATA_TYPE*, agentData, int64_t, v); |
AzureIoTClient | 0:1f9b2707ec7d | 674 | |
AzureIoTClient | 0:1f9b2707ec7d | 675 | /*create an AGENT_DATA_TYPE from int8_t*/ |
AzureIoTClient | 17:fa1bba4c6053 | 676 | MOCKABLE_FUNCTION(, AGENT_DATA_TYPES_RESULT, Create_AGENT_DATA_TYPE_from_SINT8, AGENT_DATA_TYPE*, agentData, int8_t, v); |
AzureIoTClient | 0:1f9b2707ec7d | 677 | |
AzureIoTClient | 0:1f9b2707ec7d | 678 | /*Codes_SRS_AGENT_TYPE_SYSTEM_99_091:[Creates an AGENT_DATA_TYPE containing an Edm.DateTimeOffset from an EDM_DATE_TIME_OFFSET.]*/ |
AzureIoTClient | 17:fa1bba4c6053 | 679 | MOCKABLE_FUNCTION(, AGENT_DATA_TYPES_RESULT, Create_AGENT_DATA_TYPE_from_EDM_DATE_TIME_OFFSET, AGENT_DATA_TYPE*, agentData, EDM_DATE_TIME_OFFSET, v); |
AzureIoTClient | 0:1f9b2707ec7d | 680 | |
AzureIoTClient | 0:1f9b2707ec7d | 681 | /*creates an AGENT_DATA_TYPE containing a EDM_GUID*/ |
AzureIoTClient | 17:fa1bba4c6053 | 682 | MOCKABLE_FUNCTION(, AGENT_DATA_TYPES_RESULT, Create_AGENT_DATA_TYPE_from_EDM_GUID, AGENT_DATA_TYPE*, agentData, EDM_GUID, v); |
AzureIoTClient | 0:1f9b2707ec7d | 683 | |
AzureIoTClient | 0:1f9b2707ec7d | 684 | /*creates an AGENT_DATA_TYPE containing a EDM_BINARY*/ |
AzureIoTClient | 17:fa1bba4c6053 | 685 | MOCKABLE_FUNCTION(, AGENT_DATA_TYPES_RESULT, Create_AGENT_DATA_TYPE_from_EDM_BINARY, AGENT_DATA_TYPE*, agentData, EDM_BINARY, v); |
AzureIoTClient | 0:1f9b2707ec7d | 686 | |
AzureIoTClient | 0:1f9b2707ec7d | 687 | /*create an AGENT_DATA_TYPE from SINGLE*/ |
AzureIoTClient | 17:fa1bba4c6053 | 688 | MOCKABLE_FUNCTION(, AGENT_DATA_TYPES_RESULT, Create_AGENT_DATA_TYPE_from_FLOAT, AGENT_DATA_TYPE*, agentData, float, v); |
AzureIoTClient | 0:1f9b2707ec7d | 689 | |
AzureIoTClient | 0:1f9b2707ec7d | 690 | /*create an AGENT_DATA_TYPE from ANSI zero terminated string*/ |
AzureIoTClient | 17:fa1bba4c6053 | 691 | MOCKABLE_FUNCTION(, AGENT_DATA_TYPES_RESULT, Create_AGENT_DATA_TYPE_from_charz, AGENT_DATA_TYPE*, agentData, const char*, v); |
AzureIoTClient | 0:1f9b2707ec7d | 692 | |
AzureIoTClient | 0:1f9b2707ec7d | 693 | /*create an AGENT_DATA_TYPE from ANSI zero terminated string (no quotes)*/ |
AzureIoTClient | 17:fa1bba4c6053 | 694 | MOCKABLE_FUNCTION(, AGENT_DATA_TYPES_RESULT, Create_AGENT_DATA_TYPE_from_charz_no_quotes, AGENT_DATA_TYPE*, agentData, const char*, v); |
AzureIoTClient | 0:1f9b2707ec7d | 695 | |
AzureIoTClient | 0:1f9b2707ec7d | 696 | /*create an AGENT_DATA_TYPE of type EDM_NULL_TYPE */ |
AzureIoTClient | 17:fa1bba4c6053 | 697 | MOCKABLE_FUNCTION(, AGENT_DATA_TYPES_RESULT, Create_NULL_AGENT_DATA_TYPE, AGENT_DATA_TYPE*, agentData); |
AzureIoTClient | 0:1f9b2707ec7d | 698 | |
AzureIoTClient | 0:1f9b2707ec7d | 699 | /*create an AGENT_DATA_TYPE that holds a structs from its fields*/ |
AzureIoTClient | 17:fa1bba4c6053 | 700 | MOCKABLE_FUNCTION(, AGENT_DATA_TYPES_RESULT, Create_AGENT_DATA_TYPE_from_Members, AGENT_DATA_TYPE*,agentData, const char*, typeName, size_t, nMembers, const char* const *, memberNames, const AGENT_DATA_TYPE*, memberValues); |
AzureIoTClient | 0:1f9b2707ec7d | 701 | |
AzureIoTClient | 0:1f9b2707ec7d | 702 | /*create a complex AGENT_DATA_TYPE from pointers to AGENT_DATA_TYPE fields*/ |
AzureIoTClient | 17:fa1bba4c6053 | 703 | MOCKABLE_FUNCTION(, AGENT_DATA_TYPES_RESULT, Create_AGENT_DATA_TYPE_from_MemberPointers, AGENT_DATA_TYPE*, agentData, const char*, typeName, size_t, nMembers, const char* const *, memberNames, const AGENT_DATA_TYPE** ,memberPointerValues); |
AzureIoTClient | 0:1f9b2707ec7d | 704 | |
AzureIoTClient | 0:1f9b2707ec7d | 705 | /*creates a copy of the AGENT_DATA_TYPE*/ |
AzureIoTClient | 17:fa1bba4c6053 | 706 | MOCKABLE_FUNCTION(, AGENT_DATA_TYPES_RESULT, Create_AGENT_DATA_TYPE_from_AGENT_DATA_TYPE, AGENT_DATA_TYPE*, dest, const AGENT_DATA_TYPE*, src); |
AzureIoTClient | 0:1f9b2707ec7d | 707 | |
AzureIoTClient | 17:fa1bba4c6053 | 708 | MOCKABLE_FUNCTION(, void, Destroy_AGENT_DATA_TYPE, AGENT_DATA_TYPE*, agentData); |
AzureIoTClient | 0:1f9b2707ec7d | 709 | |
AzureIoTClient | 17:fa1bba4c6053 | 710 | MOCKABLE_FUNCTION(, AGENT_DATA_TYPES_RESULT, CreateAgentDataType_From_String, const char*, source, AGENT_DATA_TYPE_TYPE, type, AGENT_DATA_TYPE*, agentData); |
AzureIoTClient | 0:1f9b2707ec7d | 711 | |
AzureIoTClient | 17:fa1bba4c6053 | 712 | MOCKABLE_FUNCTION(, COMPLEX_TYPE_FIELD_TYPE*, AgentDataType_GetComplexTypeField, AGENT_DATA_TYPE*, agentData, size_t, index); |
AzureIoTClient | 0:1f9b2707ec7d | 713 | |
AzureIoTClient | 0:1f9b2707ec7d | 714 | #ifdef __cplusplus |
AzureIoTClient | 0:1f9b2707ec7d | 715 | } |
AzureIoTClient | 0:1f9b2707ec7d | 716 | #endif |
AzureIoTClient | 0:1f9b2707ec7d | 717 | |
AzureIoTClient | 0:1f9b2707ec7d | 718 | #endif |