mcl_connectivity.h File Reference

MCL Connectivity interface header file. More...

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

Go to the source code of this file.

Typedefs

typedef struct mcl_connectivity_t mcl_connectivity_t
 

Functions

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

Detailed Description

MCL Connectivity interface header file.

This module presents MindConnect Library Connectivity capabilities.

Make sure MCL_CONNECTIVITY build option is set to ON when building MCL.

Agents have to initialize an instance of MCL connectivity component using mcl_connectivity_initialize function to exploit connectivity component features.

Data can be uploaded to MindSphere using mcl_connectivity_exchange function.

Agents can create mappings between their data points defined in their data source configuration and assets using mcl_connectivity_create_mapping function.

Definition in file mcl_connectivity.h.

Typedef Documentation

This is the main handle for connectivity component.

Definition at line 42 of file mcl_connectivity.h.

Function Documentation

MCL_CONNECTIVITY_EXPORT 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:

MCL_CONNECTIVITY_EXPORT 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_CONNECTIVITY_EXPORT 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_CONNECTIVITY_EXPORT 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_CONNECTIVITY_EXPORT 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: