Timeseries module implementation file. More...
#include "mcl_connectivity/mcl_timeseries.h"
#include "timeseries.h"
#include "mcl_core/mcl_memory.h"
#include "mcl_core/mcl_string_util.h"
Go to the source code of this file.
Functions | |
mcl_error_t | mcl_timeseries_initialize (E_MCL_TIMESERIES_VERSION version, mcl_timeseries_t **timeseries) |
mcl_error_t | mcl_timeseries_set_parameter (mcl_timeseries_t *timeseries, E_MCL_TIMESERIES_PARAMETER parameter, const void *value) |
mcl_error_t | mcl_timeseries_add_value_list (mcl_timeseries_t *timeseries, mcl_timeseries_value_list_t *timeseries_value_list) |
mcl_error_t | timeseries_validate (timeseries_t *timeseries) |
void | mcl_timeseries_destroy (mcl_timeseries_t **timeseries) |
Variables | |
const char * | mcl_timeseries_versions [MCL_TIMESERIES_VERSION_END] = { "1.0" } |
Timeseries module implementation file.
Definition in file timeseries.c.
mcl_error_t mcl_timeseries_add_value_list | ( | mcl_timeseries_t * | timeseries, |
mcl_timeseries_value_list_t * | timeseries_value_list | ||
) |
This function adds timeseries_value_list
to timeseries
.
[in] | timeseries | mcl_timeseries_t object handle which timeseries_value_list is added to. |
[in] | timeseries_value_list | mcl_timeseries_value_list_t object handle which contains timeseries value list information. |
timeseries
or timeseries_value_list
is null. timeseries
has no space for a new time series value list. Definition at line 88 of file timeseries.c.
References MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, mcl_list_add(), MCL_NULL, and MCL_TRIGGERED_WITH_NULL.
void mcl_timeseries_destroy | ( | mcl_timeseries_t ** | timeseries | ) |
This function destroys timeseries data structure.
[in] | timeseries | Timeseries handle which is going to be destroyed. |
Definition at line 138 of file timeseries.c.
References MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FREE, mcl_list_destroy_with_content(), MCL_NULL, and mcl_timeseries_value_list_destroy().
Referenced by _item_destroy(), and mcl_timeseries_initialize().
mcl_error_t mcl_timeseries_initialize | ( | E_MCL_TIMESERIES_VERSION | version, |
mcl_timeseries_t ** | timeseries | ||
) |
This function creates and initializes a data struct of mcl_timeseries_t.
[in] | version | One of the versions listed in E_MCL_TIMESERIES_VERSION. |
[out] | timeseries | Timeseries handle which is going to be initialized. |
timeseries
is null. Definition at line 16 of file timeseries.c.
References MCL_ASSERT_CODE_MESSAGE, MCL_ASSERT_NOT_NULL, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FUNCTION_LEAVE_LABEL, MCL_INVALID_PARAMETER, MCL_ITEM_PREAMBLE, MCL_ITEM_TYPE_TIMESERIES, mcl_list_initialize(), MCL_NEW, MCL_NULL, MCL_OK, MCL_OUT_OF_MEMORY, and mcl_timeseries_destroy().
mcl_error_t mcl_timeseries_set_parameter | ( | mcl_timeseries_t * | timeseries, |
E_MCL_TIMESERIES_PARAMETER | parameter, | ||
const void * | value | ||
) |
This function is used to set a parameter of a timeseries.
[in] | timeseries | Timeseries to set its parameter. |
[in] | parameter | One of the parameters listed in E_MCL_TIMESERIES_PARAMETER. |
[in] | value | New value of the parameter . |
timeseries
or value
is NULL. parameter
is invalid. Definition at line 64 of file timeseries.c.
References MCL_ASSERT_NOT_NULL, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FUNCTION_LEAVE_LABEL, MCL_INVALID_PARAMETER, MCL_OK, mcl_string_util_reset(), and MCL_TIMESERIES_PARAMETER_CONFIGURATION_ID.
mcl_error_t timeseries_validate | ( | timeseries_t * | timeseries | ) |
This function checks whether all mandatory parameters of a timeseries are set or not.
[in] | timeseries | Timeseries to validate. |
Definition at line 109 of file timeseries.c.
References timeseries_payload_t::configuration_id, mcl_list_t::count, mcl_list_node_t::data, MCL_ASSERT_CODE_MESSAGE, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_INVALID_PARAMETER, mcl_list_next(), mcl_list_reset(), MCL_NULL, MCL_OK, timeseries_t::payload, timeseries_value_list_validate(), and timeseries_payload_t::value_lists.
Referenced by _store_add_data(), and connectivity_processor_exchange().
const char* mcl_timeseries_versions[MCL_TIMESERIES_VERSION_END] = { "1.0" } |
Definition at line 14 of file timeseries.c.
Referenced by _add_item_meta_payload(), and _item_meta_size().