mcl_mapping.h File Reference

Data point mapping module interface header file. More...

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

Go to the source code of this file.

Typedefs

typedef struct mcl_mapping_t mcl_mapping_t
 

Enumerations

enum  E_MCL_MAPPING_PARAMETER {
  MCL_MAPPING_PARAMETER_DATA_POINT_ID, MCL_MAPPING_PARAMETER_ENTITY_ID, MCL_MAPPING_PARAMETER_PROPERTY_SET_NAME, MCL_MAPPING_PARAMETER_PROPERTY_NAME,
  MCL_MAPPING_PARAMETER_KEEP_MAPPING, MCL_MAPPING_PARAMETER_END
}
 

Functions

MCL_CONNECTIVITY_EXPORT mcl_error_t mcl_mapping_initialize (mcl_mapping_t **mapping)
 
MCL_CONNECTIVITY_EXPORT mcl_error_t mcl_mapping_set_parameter (mcl_mapping_t *mapping, E_MCL_MAPPING_PARAMETER parameter, const void *value)
 
MCL_CONNECTIVITY_EXPORT void mcl_mapping_destroy (mcl_mapping_t **mapping)
 

Detailed Description

Data point mapping module interface header file.

Agents are expected to map data points (defined in data source configuration uploaded to MindSphere) to assets before they start exchanging their timeseries data.

This module enables the agent to initialize a mapping structure using mcl_mapping_initialize function. Following initialization, the parameters of this mapping can be set using mcl_mapping_set_parameter function.

Once the mapping structure is finalized, mapping can be created on MindSphere using mcl_connectivity_create_mapping function.

Click here for further information about data point mapping.

Definition in file mcl_mapping.h.

Typedef Documentation

typedef struct mcl_mapping_t mcl_mapping_t

Handle for mapping.

Definition at line 32 of file mcl_mapping.h.

Enumeration Type Documentation

Parameters for mapping.

Enumerator
MCL_MAPPING_PARAMETER_DATA_POINT_ID 

Data point ID (as char *).

MCL_MAPPING_PARAMETER_ENTITY_ID 

Entity ID (as char *), do not set if it is the agent itself.

MCL_MAPPING_PARAMETER_PROPERTY_SET_NAME 

Property set name (as char *), e.g. ElectricalProperties.

MCL_MAPPING_PARAMETER_PROPERTY_NAME 

Property name (as char *), e.g. Voltage.

MCL_MAPPING_PARAMETER_KEEP_MAPPING 

Keep mapping (as mcl_bool_t *), true by default.

MCL_MAPPING_PARAMETER_END 

Definition at line 37 of file mcl_mapping.h.

Function Documentation

MCL_CONNECTIVITY_EXPORT void mcl_mapping_destroy ( mcl_mapping_t **  mapping)

This function destroys mapping data structure.

Parameters
[in]mappingMapping handle which is going to be destroyed.

Definition at line 103 of file mapping.c.

References MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FREE, and MCL_NULL.

MCL_CONNECTIVITY_EXPORT mcl_error_t mcl_mapping_initialize ( mcl_mapping_t **  mapping)

This function creates and initializes a data struct of mcl_mapping_t.

Parameters
[out]mappingMapping handle which is going to be initialized.
Returns

Definition at line 14 of file mapping.c.

References MCL_ASSERT_NOT_NULL, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_ERROR_STRING, MCL_FUNCTION_LEAVE_LABEL, MCL_NEW, MCL_NULL, MCL_OK, MCL_OUT_OF_MEMORY, and MCL_TRUE.

MCL_CONNECTIVITY_EXPORT mcl_error_t mcl_mapping_set_parameter ( mcl_mapping_t mapping,
E_MCL_MAPPING_PARAMETER  parameter,
const void *  value 
)

This function is used to set a parameter of a mapping.

Parameters
[in]mappingMapping to set its parameter.
[in]parameterOne of the parameters listed in E_MCL_MAPPING_PARAMETER.
[in]valueNew value of the parameter.
Returns

Definition at line 44 of file mapping.c.

References MCL_ASSERT_NOT_NULL, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FUNCTION_LEAVE_LABEL, MCL_INVALID_PARAMETER, MCL_MAPPING_PARAMETER_DATA_POINT_ID, MCL_MAPPING_PARAMETER_ENTITY_ID, MCL_MAPPING_PARAMETER_KEEP_MAPPING, MCL_MAPPING_PARAMETER_PROPERTY_NAME, MCL_MAPPING_PARAMETER_PROPERTY_SET_NAME, MCL_OK, and mcl_string_util_reset().

Here is the call graph for this function: