mcl_timeseries_value.h File Reference

Timeseries value module interface header file. More...

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

Go to the source code of this file.

Typedefs

typedef struct mcl_timeseries_value_t mcl_timeseries_value_t
 

Enumerations

enum  E_MCL_TIMESERIES_VALUE_PARAMETER { MCL_TIMESERIES_VALUE_PARAMETER_DATA_POINT_ID, MCL_TIMESERIES_VALUE_PARAMETER_VALUE, MCL_TIMESERIES_VALUE_PARAMETER_QUALITY_CODE, MCL_TIMESERIES_VALUE_PARAMETER_END }
 

Functions

MCL_CONNECTIVITY_EXPORT mcl_error_t mcl_timeseries_value_initialize (mcl_timeseries_value_t **timeseries_value)
 
MCL_CONNECTIVITY_EXPORT mcl_error_t mcl_timeseries_value_set_parameter (mcl_timeseries_value_t *timeseries_value, E_MCL_TIMESERIES_VALUE_PARAMETER parameter, const void *value)
 
MCL_CONNECTIVITY_EXPORT void mcl_timeseries_value_destroy (mcl_timeseries_value_t **timeseries_value)
 

Detailed Description

Timeseries value module interface header file.

Timeseries value is a single measurement of a data point, mcl_data_point_t.

This module enables the agent to initialize a timeseries value using mcl_timeseries_value_initialize function. Following initialization, the parameters of this timeseries value can be set using mcl_timeseries_value_set_parameter function. Then timeseries value(s) can be added to the timeseries value list using mcl_timeseries_value_list_add_value function. See mcl_connectivity/mcl_timeseries_value_list.h for information about timeseries value list. If the timeseries value is added to a timeseries value list, mcl_timeseries_value_list_t will handle the destroy operation of the timeseries value and the agent does not need to take any action. Otherwise, mcl_timeseries_value_destroy function is used to destroy timeseries value.

For more information, please look at example file "mcl_connectivity/examples/timeseries_upload.c".

Definition in file mcl_timeseries_value.h.

Typedef Documentation

Handle for timeseries value.

Definition at line 36 of file mcl_timeseries_value.h.

Enumeration Type Documentation

Parameters for timeseries value.

Enumerator
MCL_TIMESERIES_VALUE_PARAMETER_DATA_POINT_ID 

Timeseries value data point id parameter as char*.

MCL_TIMESERIES_VALUE_PARAMETER_VALUE 

Timeseries value value parameter as char*.

MCL_TIMESERIES_VALUE_PARAMETER_QUALITY_CODE 

Timeseries value quality code parameter as char*.

MCL_TIMESERIES_VALUE_PARAMETER_END 

Definition at line 41 of file mcl_timeseries_value.h.

Function Documentation

MCL_CONNECTIVITY_EXPORT void mcl_timeseries_value_destroy ( mcl_timeseries_value_t **  timeseries_value)

This function destroys timeseries_value.

Parameters
[in]timeseries_valuemcl_timeseries_value_t object handle that will be destroyed.

Definition at line 84 of file timeseries_value.c.

References MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FREE, and MCL_NULL.

Referenced by mcl_timeseries_value_list_destroy().

Here is the caller graph for this function:

MCL_CONNECTIVITY_EXPORT mcl_error_t mcl_timeseries_value_initialize ( mcl_timeseries_value_t **  timeseries_value)

This function creates and initializes a data struct of mcl_timeseries_value_t.

Parameters
[out]timeseries_valueInitialized mcl_timeseries_value_t object handle.
Returns

Definition at line 14 of file timeseries_value.c.

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

MCL_CONNECTIVITY_EXPORT mcl_error_t mcl_timeseries_value_set_parameter ( mcl_timeseries_value_t timeseries_value,
E_MCL_TIMESERIES_VALUE_PARAMETER  parameter,
const void *  value 
)

This function is used to set a parameter of a timeseries value.

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

Definition at line 36 of file timeseries_value.c.

References MCL_ASSERT_NOT_NULL, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FUNCTION_LEAVE_LABEL, MCL_INVALID_PARAMETER, mcl_string_util_reset(), MCL_TIMESERIES_VALUE_PARAMETER_DATA_POINT_ID, MCL_TIMESERIES_VALUE_PARAMETER_QUALITY_CODE, and MCL_TIMESERIES_VALUE_PARAMETER_VALUE.

Here is the call graph for this function: