data_point.c File Reference

Data point module implementation file. More...

Include dependency graph for data_point.c:

Go to the source code of this file.

Functions

mcl_error_t mcl_data_point_initialize (mcl_data_point_t **data_point)
 
mcl_error_t mcl_data_point_set_parameter (mcl_data_point_t *data_point, E_MCL_DATA_POINT_PARAMETER parameter, const void *value)
 
mcl_error_t data_point_validate (data_point_t *data_point)
 
void mcl_data_point_destroy (mcl_data_point_t **data_point)
 

Detailed Description

Data point module implementation file.

Definition in file data_point.c.

Function Documentation

mcl_error_t data_point_validate ( data_point_t data_point)

This function checks whether all mandatory parameters of a data point are set or not.

Parameters
[in]data_pointData point to validate.
Returns

Definition at line 92 of file data_point.c.

References data_point_t::id, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_INVALID_PARAMETER, MCL_NULL, MCL_OK, data_point_t::name, data_point_t::type, and data_point_t::unit.

Referenced by data_source_validate().

Here is the caller graph for this function:

void mcl_data_point_destroy ( mcl_data_point_t **  data_point)

This function destroys data point data structure.

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

Definition at line 108 of file data_point.c.

References MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FREE, mcl_json_util_destroy(), and MCL_NULL.

Referenced by _parse_data_point(), _parse_data_source(), and mcl_data_source_destroy().

Here is the call graph for this function:

Here is the caller graph for this function:

mcl_error_t mcl_data_point_initialize ( mcl_data_point_t **  data_point)

This function creates and initializes a data struct of mcl_data_point_t.

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

Definition at line 14 of file data_point.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, and MCL_OUT_OF_MEMORY.

Referenced by _parse_data_point().

Here is the caller graph for this function:

mcl_error_t mcl_data_point_set_parameter ( mcl_data_point_t data_point,
E_MCL_DATA_POINT_PARAMETER  parameter,
const void *  value 
)

This function is used to set a parameter of a data point.

Parameters
[in]data_pointData point to set its parameter.
[in]parameterOne of the parameters listed in E_MCL_DATA_POINT_PARAMETER.
[in]valueNew value of the parameter.
Returns

Definition at line 45 of file data_point.c.

References MCL_ASSERT_NOT_NULL, MCL_DATA_POINT_PARAMETER_CUSTOM_DATA, MCL_DATA_POINT_PARAMETER_DESCRIPTION, MCL_DATA_POINT_PARAMETER_ID, MCL_DATA_POINT_PARAMETER_NAME, MCL_DATA_POINT_PARAMETER_TYPE, MCL_DATA_POINT_PARAMETER_UNIT, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FUNCTION_LEAVE_LABEL, MCL_INVALID_PARAMETER, mcl_json_util_destroy(), mcl_json_util_duplicate(), and mcl_string_util_reset().

Here is the call graph for this function: