Data point module interface header file. More...
#include "mcl_connectivity/mcl_connectivity_common.h"
Go to the source code of this file.
Typedefs | |
typedef struct mcl_data_point_t | mcl_data_point_t |
Functions | |
MCL_CONNECTIVITY_EXPORT mcl_error_t | mcl_data_point_initialize (mcl_data_point_t **data_point) |
MCL_CONNECTIVITY_EXPORT mcl_error_t | mcl_data_point_set_parameter (mcl_data_point_t *data_point, E_MCL_DATA_POINT_PARAMETER parameter, const void *value) |
MCL_CONNECTIVITY_EXPORT void | mcl_data_point_destroy (mcl_data_point_t **data_point) |
Data point module interface header file.
Data points hold metadata about a specific metric that the agent generates or measures.
This module enables the agent to initialize a data point structure using mcl_data_point_initialize function. Following initialization, the parameters of this data point can be set using mcl_data_point_set_parameter function. Then, data point(s) can be added to data source (mcl_data_source_t) using mcl_data_source_add_data_point function.
If the data point is added to a data source, mcl_data_source_t will handle the destroy operation of the data point and the agent does not need to take any action. Otherwise, mcl_data_point_destroy function is used to destroy data point.
Definition in file mcl_data_point.h.
typedef struct mcl_data_point_t mcl_data_point_t |
Handle for data point.
Definition at line 31 of file mcl_data_point.h.
Parameters for data point.
Definition at line 36 of file mcl_data_point.h.
MCL_CONNECTIVITY_EXPORT void mcl_data_point_destroy | ( | mcl_data_point_t ** | data_point | ) |
This function destroys data point data structure.
[in] | data_point | Data 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().
MCL_CONNECTIVITY_EXPORT 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.
[out] | data_point | Data point handle which is going to be initialized. |
data_point
is null. 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().
MCL_CONNECTIVITY_EXPORT 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.
[in] | data_point | Data point to set its parameter. |
[in] | parameter | One of the parameters listed in E_MCL_DATA_POINT_PARAMETER. |
[in] | value | New value of the parameter . |
data_point
or value
is NULL. parameter
is invalid. 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().