mcl_store.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 mcl_store.h
9  * @date Jul 15, 2016
10  * @brief Store module interface header file.
11  *
12  * Store is the container for all types of data to be exchanged using MCL.
13  *
14  ************************************************************************/
15 
16 #ifndef MCL_STORE_H_
17 #define MCL_STORE_H_
18 
19 #include "mcl/mcl_time_series.h"
20 #include "mcl/mcl_custom_data.h"
21 #include "mcl/mcl_stream_data.h"
23 #include "mcl/mcl_json_util.h"
24 #include "mcl/mcl_event.h"
25 
26 #ifdef __cplusplus
27 extern "C"
28 {
29 #endif
30 
34  typedef struct mcl_store_t mcl_store_t;
35 
39  typedef struct mcl_file_t mcl_file_t;
40 
61 
73 
91  extern MCL_EXPORT E_MCL_ERROR_CODE mcl_store_new_time_series(mcl_store_t *store, const char *version, const char *configuration_id, const char *routing,
92  mcl_time_series_t **time_series);
93 
113  extern MCL_EXPORT E_MCL_ERROR_CODE mcl_store_new_event(mcl_store_t *store, const char *version, const char *type, const char *type_version, E_MCL_EVENT_SEVERITY severity, const char *timestamp, mcl_event_t **event);
114 
137  extern MCL_EXPORT E_MCL_ERROR_CODE mcl_store_new_file(mcl_store_t *store, const char *version, const char *file_path, const char *file_name, const char *file_type, const char *routing, mcl_file_t **file);
138 
156  extern MCL_EXPORT E_MCL_ERROR_CODE mcl_store_new_custom_data(mcl_store_t *store, const char *version, const char *type, const char *routing,
157  mcl_custom_data_t **custom_data);
158 
183  extern MCL_EXPORT E_MCL_ERROR_CODE mcl_store_new_stream_data(mcl_store_t *store, const char *version, const char *type, const char *routing,
184  mcl_stream_data_read_callback_t stream_data_read_callback, void *user_context, mcl_stream_data_t **stream_data);
185 
201  extern MCL_EXPORT E_MCL_ERROR_CODE mcl_store_new_data_source_configuration(mcl_store_t *store, const char *version, mcl_data_source_configuration_t **data_source_configuration);
202 
203 #ifdef __cplusplus
204 }
205 #endif
206 
207 #endif //MCL_STORE_H_
MCL_EXPORT E_MCL_ERROR_CODE mcl_store_new_time_series(mcl_store_t *store, const char *version, const char *configuration_id, const char *routing, mcl_time_series_t **time_series)
Definition: store.c:98
MCL_EXPORT E_MCL_ERROR_CODE mcl_store_destroy(mcl_store_t **store)
Definition: store.c:312
struct mcl_data_source_configuration_t mcl_data_source_configuration_t
MCL_EXPORT E_MCL_ERROR_CODE mcl_store_new_event(mcl_store_t *store, const char *version, const char *type, const char *type_version, E_MCL_EVENT_SEVERITY severity, const char *timestamp, mcl_event_t **event)
Definition: store.c:125
#define MCL_EXPORT
mcl_size_t(* mcl_stream_data_read_callback_t)(void *destination, void *source, mcl_size_t size, void *user_context)
Stream data read callback function definition.
MCL_EXPORT E_MCL_ERROR_CODE mcl_store_new_data_source_configuration(mcl_store_t *store, const char *version, mcl_data_source_configuration_t **data_source_configuration)
Definition: store.c:286
struct mcl_event_t mcl_event_t
This struct is used for building only one message of event.
Definition: mcl_event.h:27
Data source configuration module interface header file.
E_MCL_ERROR_CODE
MCL Error code definitions. Every function returning an error code uses this enum values...
Definition: mcl_common.h:137
struct mcl_time_series_t mcl_time_series_t
This struct is used for building the time series type.
struct mcl_custom_data_t mcl_custom_data_t
This struct is used for building the custom data type.
Stream data module interface header file.
struct mcl_store_t mcl_store_t
Definition: mcl_store.h:34
Event module interface header file.
Custom data module interface header file.
MCL_EXPORT E_MCL_ERROR_CODE mcl_store_initialize(mcl_bool_t streamable, mcl_store_t **store)
Definition: store.c:68
MCL_EXPORT E_MCL_ERROR_CODE mcl_store_new_file(mcl_store_t *store, const char *version, const char *file_path, const char *file_name, const char *file_type, const char *routing, mcl_file_t **file)
Definition: store.c:196
Json utility module interface header file.
Time series module interface header file.
MCL_EXPORT E_MCL_ERROR_CODE mcl_store_new_custom_data(mcl_store_t *store, const char *version, const char *type, const char *routing, mcl_custom_data_t **custom_data)
Definition: store.c:230
struct mcl_stream_data_t mcl_stream_data_t
This struct is used for building the stream data type.
MCL_EXPORT E_MCL_ERROR_CODE mcl_store_new_stream_data(mcl_store_t *store, const char *version, const char *type, const char *routing, mcl_stream_data_read_callback_t stream_data_read_callback, void *user_context, mcl_stream_data_t **stream_data)
Definition: store.c:255
mcl_uint8_t mcl_bool_t
Definition: mcl_common.h:47
struct mcl_file_t mcl_file_t
This struct is used for building the complete message of file.
Definition: mcl_store.h:39
E_MCL_EVENT_SEVERITY
Severity values for events.
Definition: mcl_common.h:114