data_types.h
Go to the documentation of this file.
1 /*!**********************************************************************
2  *
3  * @copyright Copyright (C) 2016 Siemens Aktiengesellschaft.\n
4  * All rights reserved.
5  *
6  *************************************************************************
7  *
8  * @file data_types.h
9  * @date Jun 27, 2016
10  * @brief Data types module header file.
11  *
12  * This module contains data type definitions.
13  *
14  ************************************************************************/
15 
16 #ifndef DATA_TYPES_H_
17 #define DATA_TYPES_H_
18 
19 #include "string_type.h"
20 
22 
23 typedef struct mcl_json_t mcl_json_t;
24 
25 // ----------------- item_meta_t -----------------------------
26 
30 typedef struct item_meta_details_t
31 {
34 
39 {
42 
47 {
52 
57 {
60 
65 {
70 
74 typedef struct item_meta_payload_t
75 {
80 
84 typedef struct item_meta_t
85 {
89 
92 } item_meta_t;
93 
94 // ----------------- time_series_payload_t -----------------------------
95 
99 typedef struct mcl_time_series_value_t
100 {
105 
110 {
112 
113  // time_series_value_t
117 
121 typedef struct time_series_payload_t
122 {
123  // time_series_value_set_t
126 
127 // ----------------- event_payload_t -----------------------------
128 
132 typedef struct event_payload_t
133 {
136 
137  // string_ts
145 
146 // ----------------- file_payload_t -----------------------------
147 
151 typedef struct file_payload_t
152 {
158 
159 // ----------------- custom_data_payload_t -----------------------------
160 
164 typedef struct binary_payload_t
165 {
169 
170 // ----------------- data_source_configuration_payload_t -----------------------------
171 
175 typedef struct data_point_t
176 {
183 } data_point_t;
184 
188 typedef struct mcl_data_source_t
189 {
192 
193  // data_point_t *;
196 } data_source_t;
197 
202 {
204 
205  // data_source_t *
208 
213 typedef enum E_META_FIELD_NAMES
214 {
233 
239 {
275 
282 {
292 
298 {
307 
313 {
324 
330 #endif //MCL_DATA_TYPES_H_
This struct is used for building file.meta.payload.details structure.
Definition: data_types.h:46
Content type is application octet stream.
Definition: data_types.h:314
struct mcl_json_t mcl_json_t
This struct is used for json handling.
mcl_int32_t severity
Severity level.
Definition: data_types.h:139
Quality code of payload field values.
Definition: data_types.h:244
Status of payload field.
Definition: data_types.h:252
string_t * routing
Information helping the server-side routing mechanism.
Definition: data_types.h:32
End of content type values.
Definition: data_types.h:322
item_meta_payload_details_union_t details
Type and version specific meta information about the payload.
Definition: data_types.h:78
Source type of payload field.
Definition: data_types.h:248
string_t * version
Version of payload.
Definition: data_types.h:77
Details of payload field details.
Definition: data_types.h:259
string_t * type
Type of payload.
Definition: data_types.h:76
string_t * data_point_id
Id of the datapoint the value is read from.
Definition: data_types.h:101
Source type of payload is agent.
Definition: data_types.h:303
int64_t mcl_int64_t
Definition: mcl_common.h:42
string_t payload_field_values[PAYLOAD_FIELD_VALUES_END]
Definition: data_types.c:84
string_t * name
Name of the data point.
Definition: data_types.h:178
Version of meta field.
Definition: data_types.h:216
Type of payload field data sources data points.
Definition: data_types.h:271
E_META_FIELD_NAMES
Used with meta_field_names[E_META_FIELD_NAMES] to get the related string. ex: meta_field_names[META_F...
Definition: data_types.h:213
This struct is used for the time_series.meta.payload.details structure.
Definition: data_types.h:38
mcl_json_t * details
Event/alarm details.
Definition: data_types.h:143
This struct is used for building the payload of time series which is list of value sets...
Definition: data_types.h:121
string_t * file_name
Name of the file transferred.
Definition: data_types.h:48
string_t * content_id
Unique identifier of the group.
Definition: data_types.h:86
string_t * correlation_id
Parent event id.
Definition: data_types.h:135
Transfer encoding chunked.
Definition: data_types.h:321
Time series type of meta field payload.
Definition: data_types.h:286
File type of meta field payload.
Definition: data_types.h:288
Version of payload field details.
Definition: data_types.h:263
list_t * data_sources
List of data sources definitions.
Definition: data_types.h:206
Source type of payload is asset.
Definition: data_types.h:302
Configuration id of meta field payload details.
Definition: data_types.h:222
string_t * type
Type of meta.
Definition: data_types.h:87
Business event type of meta field payload.
Definition: data_types.h:287
This struct is used for building file.payload structure.
Definition: data_types.h:151
This struct is used for building data_source_configuration.data_points structure. ...
Definition: data_types.h:175
This struct is used for building the complete message of time series event.
Definition: time_series.h:22
Error code of payload field details.
Definition: data_types.h:258
string_t * version
Version of the event/alarm type.
Definition: data_types.h:142
mcl_uint8_t * buffer
Binary payload buffer.
Definition: data_types.h:166
string_t * description
Event description.
Definition: data_types.h:140
Current version of meta field payload.
Definition: data_types.h:285
This struct is used for building item.meta.payload structure.
Definition: data_types.h:74
item_meta_payload_details_file_t file_details
File details.
Definition: data_types.h:67
Meta of meta field payload.
Definition: data_types.h:217
string_t * configuration_id
Unique identifier of the configuration.
Definition: data_types.h:40
Data point id of payload field values.
Definition: data_types.h:242
mcl_json_t * custom_data
Custom data.
Definition: data_types.h:195
mcl_size_t size
Binary payload size.
Definition: data_types.h:167
Current version of meta field.
Definition: data_types.h:284
This struct is used for building item.meta structure.
Definition: data_types.h:84
Content type is application/x-www-form-urlencoded.
Definition: data_types.h:320
Correlation id of payload field.
Definition: data_types.h:247
This struct is used for building value set of time series.
Definition: data_types.h:109
struct mcl_time_series_t mcl_time_series_t
This struct is used for building the time series type.
mcl_size_t end_byte
File payload end byte.
Definition: data_types.h:156
Duration of meta field payload details.
Definition: data_types.h:230
Value of payload field details.
Definition: data_types.h:260
Content type is multipart mixed.
Definition: data_types.h:317
Payload field data sources data points.
Definition: data_types.h:268
Custom event id of payload field.
Definition: data_types.h:246
File type of meta field details.
Definition: data_types.h:226
Content type is multipart related.
Definition: data_types.h:318
string_t * type
Type of data point.
Definition: data_types.h:180
item_meta_payload_t payload
Information describing the payload part following this meta or a collection of tuples referencing it...
Definition: data_types.h:91
Content type is text plain.
Definition: data_types.h:315
string_t meta_field_names[META_FIELD_NAMES_END]
Definition: data_types.c:16
Configuration id of payload field.
Definition: data_types.h:265
Version of payload field.
Definition: data_types.h:254
E_META_FIELD_VALUES
Used with meta_field_values[E_META_FIELD_VALUES] to get the related string. ex: meta_field_values[MET...
Definition: data_types.h:281
item_meta_payload_details_custom_t custom_details
Custom details.
Definition: data_types.h:68
End of meta field values.
Definition: data_types.h:290
list_t * value_sets
List of value sets.
Definition: data_types.h:124
Description of payload field.
Definition: data_types.h:251
End of payload field values.
Definition: data_types.h:305
This struct is used for building data_source_configuratio.payload structure.
Definition: data_types.h:201
E_PAYLOAD_FIELD_VALUES
Used with payload_field_values[E_PAYLOAD_FIELD_VALUES] to get the related string. ex: payload_field_v...
Definition: data_types.h:297
E_PAYLOAD_FIELD_NAMES
Used with payload_field_names[E_PAYLOAD_FIELD_NAMES] to get the related string. ex: payload_field_nam...
Definition: data_types.h:238
string_t * timestamp
Time of values in YYYY-MM-DDThh:mm:ss.sssZ format.
Definition: data_types.h:111
uint8_t mcl_uint8_t
Definition: mcl_common.h:43
Type of meta field payload.
Definition: data_types.h:219
File name of meta field details.
Definition: data_types.h:225
Type of meta field.
Definition: data_types.h:215
Name of payload field details.
Definition: data_types.h:262
Value of payload field values.
Definition: data_types.h:243
This struct is used for building custom_data.payload structure.
Definition: data_types.h:164
item_meta_payload_details_time_series_t time_series_details
Time series details.
Definition: data_types.h:66
Version of meta field payload.
Definition: data_types.h:220
E_CONTENT_TYPE_VALUES
Used with http_header_values[E_HTTP_HEADER_VALUES] to get the related string. ex: http_header_values[...
Definition: data_types.h:312
Meta field payload details.
Definition: data_types.h:221
Content type is meta json.
Definition: data_types.h:319
string_t * version
Version of meta.
Definition: data_types.h:88
string_t content_type_values[CONTENT_TYPE_VALUES_END]
Definition: data_types.c:94
Source type of payload is application.
Definition: data_types.h:304
Timestamp of payload field.
Definition: data_types.h:240
mcl_int64_t size
File payload size.
Definition: data_types.h:154
This struct is used for building custom.meta.payload.details structure.
Definition: data_types.h:56
string_t * timestamp
Creation time of the event in ISO format.
Definition: data_types.h:138
Severity of payload field.
Definition: data_types.h:250
Item type of meta field.
Definition: data_types.h:283
string_t * description
Description of the data source.
Definition: data_types.h:191
mcl_json_t * custom_data
Custom data.
Definition: data_types.h:182
This struct is used for building item.meta.details structure.
Definition: data_types.h:30
Source id of payload field.
Definition: data_types.h:249
Timestamp of meta field payload details.
Definition: data_types.h:229
Routing of meta field details.
Definition: data_types.h:224
size_t mcl_size_t
Definition: mcl_common.h:38
This struct is used for building data_source_configuration.data_source structure. ...
Definition: data_types.h:188
mcl_uint8_t * buffer
File payload buffer.
Definition: data_types.h:153
Content type is application json.
Definition: data_types.h:316
string_t * description
Description of the data point.
Definition: data_types.h:179
End of payload field names.
Definition: data_types.h:273
string_t meta_field_values[META_FIELD_VALUES_END]
Definition: data_types.c:36
Total items of meta field details.
Definition: data_types.h:228
string_t * quality_code
The quality of the value provided.
Definition: data_types.h:103
This struct is used for building event.payload structure.
Definition: data_types.h:132
Name of payload field data sources data points.
Definition: data_types.h:270
Details of payload field.
Definition: data_types.h:256
End of meta field names.
Definition: data_types.h:231
string_t * creation_date
Date and time when the file was created. ISO 8601 date and time format.
Definition: data_types.h:49
This struct is used for building time_series.payload.values structure.
Definition: data_types.h:99
mcl_size_t start_byte
File payload start byte.
Definition: data_types.h:155
mcl_json_t * details_json
Any details.
Definition: data_types.h:58
Payload field id.
Definition: data_types.h:245
This union is used for building item.meta.payload.details for time series, file and custom data...
Definition: data_types.h:64
string_t * unit
Measurement unit of the data point.
Definition: data_types.h:181
string_t * file_type
Type of the file transferred.
Definition: data_types.h:50
Creation date of meta field details.
Definition: data_types.h:227
string_t * name
Name of the data source.
Definition: data_types.h:190
list_t * data_points
List of data points definitions.
Definition: data_types.h:194
Message of payload field details.
Definition: data_types.h:257
Type of payload field.
Definition: data_types.h:253
string_t * value
The value read.
Definition: data_types.h:102
Name of payload field data sources.
Definition: data_types.h:267
String type module header file.
Severity level of payload field is urgent.
Definition: data_types.h:299
Download link of payload field details.
Definition: data_types.h:261
Unit of payload field data sources data points.
Definition: data_types.h:272
string_t payload_field_names[PAYLOAD_FIELD_NAMES_END]
Definition: data_types.c:47
string_t * configuration_id
Unique identifier of the configuration.
Definition: data_types.h:203
Data point id of payload field assets data sources data points.
Definition: data_types.h:269
Data source configuration type of meta field payload.
Definition: data_types.h:289
Severity level of payload field is important.
Definition: data_types.h:300
Severity level of payload field is information.
Definition: data_types.h:301
time_series_t * parent
Parent of this time series.
Definition: data_types.h:115
Custom data of payload field.
Definition: data_types.h:255
int32_t mcl_int32_t
Definition: mcl_common.h:41
Payload field data sources.
Definition: data_types.h:266
string_t * id
Unique identifier of the event.
Definition: data_types.h:134
string_t * type
Type of the event.
Definition: data_types.h:141
Meta field details.
Definition: data_types.h:223
struct mcl_data_source_t mcl_data_source_t
struct mcl_time_series_value_set_t mcl_time_series_value_set_t
This struct is used for building value set of time series.
list_t * values
List of measurements made at the given timestamp.
Definition: data_types.h:114
Payload field values.
Definition: data_types.h:241
item_meta_details_t details
Type and version-specific meta-information.
Definition: data_types.h:90
Meta field payload.
Definition: data_types.h:218
string_t * id
Agent-unique identifier of the data point.
Definition: data_types.h:177
Description of payload field details.
Definition: data_types.h:264