MCL Connectivity interface header file. More...
#include "mcl_core/mcl_core.h"
#include "mcl_connectivity/mcl_store.h"
#include "mcl_connectivity/mcl_event.h"
#include "mcl_connectivity/mcl_data_source_configuration.h"
#include "mcl_connectivity/mcl_timeseries.h"
#include "mcl_connectivity/mcl_file.h"
#include "mcl_connectivity/mcl_custom_data.h"
#include "mcl_connectivity/mcl_connectivity_configuration.h"
#include "mcl_connectivity/mcl_mapping.h"
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) |
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 struct mcl_connectivity_t mcl_connectivity_t |
This is the main handle for connectivity component.
Definition at line 42 of file mcl_connectivity.h.
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.
[in] | connectivity | Main handle for connectivity component. |
[in] | mapping | Mapping to be created. |
connectivity
. connectivity
does not have an access token. 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.
MCL_CONNECTIVITY_EXPORT void mcl_connectivity_destroy | ( | mcl_connectivity_t ** | connectivity | ) |
This function destroys the mcl_connectivity_t object and frees any memory allocated.
[in] | connectivity | Preinitialized 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().
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.
[in] | connectivity | Main handle for connectivity component. |
[in] | item | The data to be uploaded to MindSphere. |
connectivity
. connectivity
does not have an access token. 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.
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.
[in] | connectivity | Main handle for connectivity component. |
[out] | configuration | Data source configuration. |
connectivity
. connectivity
does not have an access token. 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.
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.
[in] | configuration | Preinitialized mcl_connectivity_configuration_t object. |
[out] | connectivity | Connectivity handle which is going to be initialized. |
core
or connectivity
is null. configuration
is not set. 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.