mcl_store.h File Reference

Store module interface header file. More...

Include dependency graph for mcl_store.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct mcl_store_t mcl_store_t
 

Functions

MCL_CONNECTIVITY_EXPORT mcl_error_t mcl_store_initialize (mcl_store_t **store)
 
MCL_CONNECTIVITY_EXPORT mcl_error_t mcl_store_add (mcl_store_t *store, void *item)
 
MCL_CONNECTIVITY_EXPORT void mcl_store_destroy (mcl_store_t **store)
 

Detailed Description

Store module interface header file.

Store is the container for all types of data such as mcl_custom_data_t, mcl_event_t, mcl_file_t, mcl_data_source_configuration_t and mcl_timeseries_t to be exchanged using MCL.

Agents can upload store to MindSphere. This module enables the agent to initialize a store data type using mcl_store_initialize function. Following initialization, all types of data can be added to the store using mcl_store_add function. Once the store data type is ready, it can be uploaded to MindSphere using mcl_connectivity_exchange function. After the exchange operation, the agent is expected to destroy the store using mcl_store_destroy function.

For more information, please look at example file "mcl_connectivity/examples/store_upload.c".

Definition in file mcl_store.h.

Typedef Documentation

typedef struct mcl_store_t mcl_store_t

Handle for store.

Definition at line 33 of file mcl_store.h.

Function Documentation

MCL_CONNECTIVITY_EXPORT mcl_error_t mcl_store_add ( mcl_store_t store,
void *  item 
)

This function adds a new item to store.

Parameters
[in]storeMCL store which will contain any type of item created.
[in]itemItem to be added to store.
Returns

Definition at line 58 of file store.c.

References _store_add_data(), MCL_ASSERT_NOT_NULL, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FUNCTION_LEAVE_LABEL, MCL_INVALID_PARAMETER, and MCL_ITEM_PREAMBLE.

Here is the call graph for this function:

MCL_CONNECTIVITY_EXPORT void mcl_store_destroy ( mcl_store_t **  store)

This function destroys the mcl_store_t object and frees any memory allocated.

Parameters
[in]storePreinitialized mcl_store_t object to destroy.
Returns

Definition at line 81 of file store.c.

References MCL_DEBUG, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FREE, mcl_list_destroy_with_content(), MCL_NULL, and store_item_destroy().

Here is the call graph for this function:

MCL_CONNECTIVITY_EXPORT mcl_error_t mcl_store_initialize ( mcl_store_t **  store)

This function creates and initializes an object of type mcl_store_t.

Store is used to hold different types of data. These data will be processed later by connectivity module. to perform exchange operation.

Parameters
[out]storeThe newly initialized store.
Returns

Definition at line 30 of file store.c.

References MCL_ASSERT_CODE_MESSAGE, MCL_ASSERT_NOT_NULL, MCL_ASSERT_STATEMENT_CODE_MESSAGE, MCL_DEBUG, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FREE, MCL_FUNCTION_LEAVE_LABEL, MCL_ITEM_PREAMBLE, MCL_ITEM_TYPE_STORE, mcl_list_initialize(), MCL_NEW, MCL_NULL, MCL_OK, and MCL_OUT_OF_MEMORY.

Here is the call graph for this function: