Timeseries value module interface header file. More...
#include "mcl_connectivity/mcl_connectivity_common.h"
Go to the source code of this file.
Typedefs | |
typedef struct mcl_timeseries_value_t | mcl_timeseries_value_t |
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) |
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 struct mcl_timeseries_value_t mcl_timeseries_value_t |
Handle for timeseries value.
Definition at line 36 of file mcl_timeseries_value.h.
Parameters for timeseries value.
Definition at line 41 of file mcl_timeseries_value.h.
MCL_CONNECTIVITY_EXPORT void mcl_timeseries_value_destroy | ( | mcl_timeseries_value_t ** | timeseries_value | ) |
This function destroys timeseries_value
.
[in] | timeseries_value | mcl_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().
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.
[out] | timeseries_value | Initialized mcl_timeseries_value_t object handle. |
timeseries_value
is null. 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.
[in] | timeseries_value | Timeseries value to set its parameter. |
[in] | parameter | One of the parameters listed in E_MCL_TIMESERIES_VALUE_PARAMETER. |
[in] | value | New value of the parameter . |
timeseries_value
or value
is NULL. parameter
is invalid. 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.