mcl_time_series.h File Reference

Time series module interface header file. More...

#include "mcl/mcl_common.h"
Include dependency graph for mcl_time_series.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct mcl_time_series_t mcl_time_series_t
 This struct is used for building the time series type. More...
 
typedef struct mcl_time_series_value_set_t mcl_time_series_value_set_t
 This struct is used for building value set of time series. More...
 

Functions

MCL_EXPORT E_MCL_ERROR_CODE mcl_time_series_new_value_set (mcl_time_series_t *time_series, const char *timestamp, mcl_time_series_value_set_t **value_set)
 This function creates new value set to be added to mcl_time_series_t. More...
 
MCL_EXPORT E_MCL_ERROR_CODE mcl_time_series_add_value (mcl_time_series_value_set_t *value_set, const char *data_point_id, const char *value, const char *quality_code)
 This function adds data_point_id, value and quality_code to mcl_time_series_value_set_t. More...
 

Detailed Description

Time series module interface header file.


Date
Jul 11, 2016

Definition in file mcl_time_series.h.

Typedef Documentation

This struct is used for building the time series type.

Definition at line 27 of file mcl_time_series.h.

This struct is used for building value set of time series.

Definition at line 32 of file mcl_time_series.h.

Function Documentation

MCL_EXPORT E_MCL_ERROR_CODE mcl_time_series_add_value ( mcl_time_series_value_set_t value_set,
const char *  data_point_id,
const char *  value,
const char *  quality_code 
)

This function adds data_point_id, value and quality_code to mcl_time_series_value_set_t.

Parameters
[in]value_setValue set to which parameters are added.
[in]data_point_idId of the data point the value is read from.
[in]valueThe value read.
[in]quality_codeThe quality of the value provided. Must represent a valid number compatible with the standard.
Returns

Definition at line 90 of file time_series.c.

References _destroy_value_set_value(), ASSERT_CODE_MESSAGE, ASSERT_NOT_NULL, ASSERT_STATEMENT_CODE_MESSAGE, time_series_value_t::data_point_id, DEBUG_ENTRY, DEBUG_LEAVE, list_add(), MCL_DEBUG, MCL_NEW, MCL_NULL, MCL_OK, MCL_OUT_OF_MEMORY, time_series_value_t::quality_code, string_initialize_new(), and time_series_value_t::value.

Here is the call graph for this function:

MCL_EXPORT E_MCL_ERROR_CODE mcl_time_series_new_value_set ( mcl_time_series_t time_series,
const char *  timestamp,
mcl_time_series_value_set_t **  value_set 
)

This function creates new value set to be added to mcl_time_series_t.

Parameters
[in]time_seriesvalue_set is added to time_series .
[in]timestampTimestamp of the values in YYYY-MM-DDThh:mm:ss.sssZ format. Ex:2016-04-26T08:06:25.317Z.
[out]value_setContains a timestamp and a list of values at that timestamp.
Returns

Definition at line 55 of file time_series.c.

References _destroy_value_set(), ASSERT_CODE_MESSAGE, ASSERT_NOT_NULL, ASSERT_STATEMENT_CODE_MESSAGE, DEBUG_ENTRY, DEBUG_LEAVE, list_add(), list_initialize(), MCL_DEBUG, MCL_INVALID_PARAMETER, MCL_NEW, MCL_NULL, MCL_OK, MCL_OUT_OF_MEMORY, string_initialize_new(), and time_util_validate_timestamp().

Here is the call graph for this function: