connectivity.c File Reference

MCL Connectivity module implementation file. More...

Include dependency graph for connectivity.c:

Go to the source code of this file.

Functions

mcl_error_t mcl_connectivity_initialize (mcl_connectivity_configuration_t *configuration, mcl_connectivity_t **connectivity)
 
mcl_error_t mcl_connectivity_exchange (mcl_connectivity_t *connectivity, void *item)
 
mcl_error_t mcl_connectivity_create_mapping (mcl_connectivity_t *connectivity, mcl_mapping_t *mapping)
 
mcl_error_t mcl_connectivity_get_data_source_configuration (mcl_connectivity_t *connectivity, mcl_data_source_configuration_t **configuration)
 
void mcl_connectivity_destroy (mcl_connectivity_t **connectivity)
 

Detailed Description

MCL Connectivity module implementation file.

Definition in file connectivity.c.

Function Documentation

mcl_error_t mcl_connectivity_create_mapping ( mcl_connectivity_t connectivity,
mcl_mapping_t mapping 
)

This function creates a data point mapping. connectivity has to be initialized before using this function.

Parameters
[in]connectivityMain handle for connectivity component.
[in]mappingMapping to be created.
Returns

Definition at line 90 of file connectivity.c.

References connectivity_processor_create_mapping(), MCL_ASSERT_NOT_NULL, mcl_core_get_last_access_token(), MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FREE, MCL_FUNCTION_LEAVE_LABEL, and MCL_OK.

Here is the call graph for this function:

void mcl_connectivity_destroy ( mcl_connectivity_t **  connectivity)

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

Parameters
[in]connectivityPreinitialized mcl_connectivity_t object to destroy.

Definition at line 145 of file connectivity.c.

References MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FREE, and MCL_NULL.

Referenced by mcl_connectivity_initialize().

Here is the caller graph for this function:

mcl_error_t mcl_connectivity_exchange ( mcl_connectivity_t connectivity,
void *  item 
)

This function exchanges data in item to MindSphere. Item can be either mcl_store_t which contains multiple data types or single data type such as mcl_event_t, mcl_data_source_configuration_t, mcl_timeseries_t, mcl_file_t and mcl_custom_data_t. connectivity has to be initialized before using this function.

Parameters
[in]connectivityMain handle for connectivity component.
[in]itemThe data to be uploaded to MindSphere.
Returns

Definition at line 63 of file connectivity.c.

References connectivity_processor_exchange(), MCL_ASSERT_NOT_NULL, mcl_core_get_last_access_token(), MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FREE, MCL_FUNCTION_LEAVE_LABEL, and MCL_OK.

Here is the call graph for this function:

mcl_error_t mcl_connectivity_get_data_source_configuration ( mcl_connectivity_t connectivity,
mcl_data_source_configuration_t **  configuration 
)

This function gets data source configuration from MindSphere. connectivity has to be initialized before using this function.

Parameters
[in]connectivityMain handle for connectivity component.
[out]configurationData source configuration.
Returns

Definition at line 117 of file connectivity.c.

References connectivity_processor_get_data_source_configuration(), MCL_ASSERT_NOT_NULL, mcl_core_get_last_access_token(), MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FREE, MCL_FUNCTION_LEAVE_LABEL, MCL_NULL, and MCL_OK.

Here is the call graph for this function:

mcl_error_t mcl_connectivity_initialize ( mcl_connectivity_configuration_t configuration,
mcl_connectivity_t **  connectivity 
)

This function creates and initializes an object of type mcl_connectivity_t. Memory is allocated for the connectivity object and configuration is referenced by the connectivity object.

Parameters
[in]configurationPreinitialized mcl_connectivity_configuration_t object.
[out]connectivityConnectivity handle which is going to be initialized.
Returns

Definition at line 13 of file connectivity.c.

References connectivity_configuration_validate(), MCL_ASSERT_NOT_NULL, mcl_connectivity_destroy(), mcl_core_get_client_id(), mcl_core_get_host_name(), mcl_core_get_http_client(), MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FUNCTION_LEAVE_LABEL, MCL_NEW, MCL_NULL, MCL_OK, and MCL_OUT_OF_MEMORY.

Here is the call graph for this function: