mcl_data_point.h File Reference

Data point module interface header file. More...

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

Go to the source code of this file.

Typedefs

typedef struct mcl_data_point_t mcl_data_point_t
 

Enumerations

enum  E_MCL_DATA_POINT_PARAMETER {
  MCL_DATA_POINT_PARAMETER_ID, MCL_DATA_POINT_PARAMETER_NAME, MCL_DATA_POINT_PARAMETER_DESCRIPTION, MCL_DATA_POINT_PARAMETER_TYPE,
  MCL_DATA_POINT_PARAMETER_UNIT, MCL_DATA_POINT_PARAMETER_CUSTOM_DATA, MCL_DATA_POINT_PARAMETER_END
}
 

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)
 

Detailed Description

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 Documentation

Handle for data point.

Definition at line 31 of file mcl_data_point.h.

Enumeration Type Documentation

Parameters for data point.

Enumerator
MCL_DATA_POINT_PARAMETER_ID 

Parameter ID.

MCL_DATA_POINT_PARAMETER_NAME 

Parameter name.

MCL_DATA_POINT_PARAMETER_DESCRIPTION 

Parameter description.

MCL_DATA_POINT_PARAMETER_TYPE 

Parameter type.

MCL_DATA_POINT_PARAMETER_UNIT 

Parameter unit.

MCL_DATA_POINT_PARAMETER_CUSTOM_DATA 

Parameter custom data.

MCL_DATA_POINT_PARAMETER_END 

Definition at line 36 of file mcl_data_point.h.

Function Documentation

MCL_CONNECTIVITY_EXPORT 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_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.

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_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.

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: