timeseries.c File Reference

Timeseries module implementation file. More...

Include dependency graph for timeseries.c:

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" }
 

Detailed Description

Timeseries module implementation file.

Definition in file timeseries.c.

Function Documentation

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.

Parameters
[in]timeseriesmcl_timeseries_t object handle which timeseries_value_list is added to.
[in]timeseries_value_listmcl_timeseries_value_list_t object handle which contains timeseries value list information.
Returns

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.

Here is the call graph for this function:

void mcl_timeseries_destroy ( mcl_timeseries_t **  timeseries)

This function destroys timeseries data structure.

Parameters
[in]timeseriesTimeseries 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().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Parameters
[in]versionOne of the versions listed in E_MCL_TIMESERIES_VERSION.
[out]timeseriesTimeseries handle which is going to be initialized.
Returns

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().

Here is the call graph for this function:

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.

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

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.

Here is the call graph for this function:

mcl_error_t timeseries_validate ( timeseries_t timeseries)

This function checks whether all mandatory parameters of a timeseries are set or not.

Parameters
[in]timeseriesTimeseries to validate.
Returns

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().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

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().