Time series module interface header file. More...
#include "mcl/mcl_common.h"
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... | |
Time series module interface header file.
Definition in file mcl_time_series.h.
typedef struct mcl_time_series_t mcl_time_series_t |
This struct is used for building the time series type.
Definition at line 27 of file mcl_time_series.h.
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.
Definition at line 32 of file mcl_time_series.h.
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.
[in] | value_set | Value set to which parameters are added. |
[in] | data_point_id | Id of the data point the value is read from. |
[in] | value | The value read. |
[in] | quality_code | The quality of the value provided. Must represent a valid number compatible with the standard. |
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.
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.
[in] | time_series | value_set is added to time_series . |
[in] | timestamp | Timestamp of the values in YYYY-MM-DDThh:mm:ss.sssZ format. Ex:2016-04-26T08:06:25.317Z. |
[out] | value_set | Contains a timestamp and a list of values at that timestamp. |
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().