aivis-engine-v2-ra-sdk-c  2.9.0
Data Structures | Macros | Typedefs | Functions
aivis-engine-v2-ra-core-full.h File Reference
#include <stdint.h>
#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  List_u8
 
struct  Error
 
struct  DtoBooleanDataPoint
 
struct  DtoBooleanDataPointWithAvailability
 
struct  DtoFloatDataPoint
 
struct  DtoFloatDataPointWithAvailability
 
struct  DtoStringDataPoint
 
struct  DtoStringDataPointWithAvailability
 
struct  List_DtoBooleanDataPoint
 
struct  List_DtoFloatDataPoint
 
struct  List_DtoStringDataPoint
 
struct  List_String
 
struct  DtoExpressionInfo
 
struct  DtoBooleanCell
 
struct  DtoFloatCell
 
struct  DtoStringCell
 
struct  List_DtoBooleanCell
 
struct  List_DtoFloatCell
 
struct  List_DtoStringCell
 

Macros

#define EPS   1e-12
 

Typedefs

typedef uint64_t ResponseAnalysisHandle
 
typedef uint64_t TabularDataHandle
 
typedef uint64_t TimeseriesDataHandle
 

Functions

ResponseAnalysisHandle aivis_response_analysis_create (TabularDataHandle data_handle, const uint8_t *config_json_ptr, size_t config_json_len, const struct Error **out_err)
 
void aivis_response_analysis_destroy (ResponseAnalysisHandle handle, const struct Error **out_err)
 
const struct List_u8aivis_response_analysis_get_report (ResponseAnalysisHandle handle, const struct Error **out_err)
 
void aivis_free (const void *ptr)
 
void aivis_setup_register_logger (void(*callback)(uint8_t, const char *, const char *, const char *), const struct Error **out_err)
 
void aivis_setup_init_thread_count (uint32_t max_threads, const struct Error **out_err)
 
void aivis_setup_init_api_key (const char *api_key, const struct Error **out_err)
 
TimeseriesDataHandle aivis_timeseries_data_create (const struct Error **out_err)
 
void aivis_timeseries_data_destroy (TimeseriesDataHandle handle, const struct Error **out_err)
 
void aivis_timeseries_data_add_boolean_signal (TimeseriesDataHandle handle, const char *signal_id, const struct DtoBooleanDataPoint *data_ptr, size_t data_len, const struct Error **out_err)
 
void aivis_timeseries_data_add_boolean_signal_with_availability (TimeseriesDataHandle handle, const char *signal_id, const struct DtoBooleanDataPointWithAvailability *data_ptr, size_t data_len, const struct Error **out_err)
 
void aivis_timeseries_data_add_boolean_signal_by_expression (TimeseriesDataHandle handle, const char *signal_id, const char *expression, const struct Error **out_err)
 
void aivis_timeseries_data_add_float_signal (TimeseriesDataHandle handle, const char *signal_id, const struct DtoFloatDataPoint *data_ptr, size_t data_len, const struct Error **out_err)
 
void aivis_timeseries_data_add_float_signal_with_availability (TimeseriesDataHandle handle, const char *signal_id, const struct DtoFloatDataPointWithAvailability *data_ptr, size_t data_len, const struct Error **out_err)
 
void aivis_timeseries_data_add_float_signal_by_expression (TimeseriesDataHandle handle, const char *signal_id, const char *expression, const struct Error **out_err)
 
void aivis_timeseries_data_add_string_signal (TimeseriesDataHandle handle, const char *signal_id, const struct DtoStringDataPoint *data_ptr, size_t data_len, const struct Error **out_err)
 
void aivis_timeseries_data_add_string_signal_with_availability (TimeseriesDataHandle handle, const char *signal_id, const struct DtoStringDataPointWithAvailability *data_ptr, size_t data_len, const struct Error **out_err)
 
void aivis_timeseries_data_add_string_signal_by_expression (TimeseriesDataHandle handle, const char *signal_id, const char *expression, const struct Error **out_err)
 
const struct List_DtoBooleanDataPointaivis_timeseries_data_get_boolean_signal (TimeseriesDataHandle handle, const char *signal_id, const struct Error **out_err)
 
const struct List_DtoFloatDataPointaivis_timeseries_data_get_float_signal (TimeseriesDataHandle handle, const char *signal_id, const struct Error **out_err)
 
const struct List_DtoStringDataPointaivis_timeseries_data_get_string_signal (TimeseriesDataHandle handle, const char *signal_id, const struct Error **out_err)
 
const struct DtoExpressionInfoaivis_timeseries_data_get_expression_info (TimeseriesDataHandle handle, const char *signal_id, const struct Error **out_err)
 
const struct DtoExpressionInfoaivis_timeseries_data_parse_expression (const char *expression, const struct Error **out_err)
 
TabularDataHandle aivis_tabular_data_create (const struct Error **out_err)
 
void aivis_tabular_data_destroy (TabularDataHandle handle, const struct Error **out_err)
 
void aivis_tabular_data_add_boolean_column (TabularDataHandle handle, const char *column_id, const struct DtoBooleanCell *data_ptr, size_t data_len, const struct Error **out_err)
 
void aivis_tabular_data_add_float_column (TabularDataHandle handle, const char *column_id, const struct DtoFloatCell *data_ptr, size_t data_len, const struct Error **out_err)
 
void aivis_tabular_data_add_string_column (TabularDataHandle handle, const char *column_id, const struct DtoStringCell *data_ptr, size_t data_len, const struct Error **out_err)
 
const struct List_DtoBooleanCellaivis_tabular_data_get_boolean_column (TabularDataHandle handle, const char *column_id, const struct Error **out_err)
 
const struct List_DtoFloatCellaivis_tabular_data_get_float_column (TabularDataHandle handle, const char *column_id, const struct Error **out_err)
 
const struct List_DtoStringCellaivis_tabular_data_get_string_column (TabularDataHandle handle, const char *column_id, const struct Error **out_err)
 

Macro Definition Documentation

◆ EPS

#define EPS   1e-12

Typedef Documentation

◆ ResponseAnalysisHandle

typedef uint64_t ResponseAnalysisHandle

Handle for response analsis

◆ TabularDataHandle

typedef uint64_t TabularDataHandle

Handle for tabular data context

◆ TimeseriesDataHandle

typedef uint64_t TimeseriesDataHandle

Handle for data context

Function Documentation

◆ aivis_free()

void aivis_free ( const void *  ptr)

Destroy engine's pointer resource. Every pointer returned by the engine must be destroyed with aivis_free().

Flavour requirement: FULL, INFERENCE

Parameters
[in]ptrPointer to any resource, returned by the engine. It's always safe to call this function, as the function is null checking and only deallocating pointers created by the engine.
Returns
Nothing

◆ aivis_response_analysis_create()

ResponseAnalysisHandle aivis_response_analysis_create ( TabularDataHandle  data_handle,
const uint8_t *  config_json_ptr,
size_t  config_json_len,
const struct Error **  out_err 
)

Create response analysis for given data context and config. Returned handle uniquely identifies this analysis for use in other functions. Make sure to delete this analysis with aivis_response_analysis_destroy(). Given data is copied, this function does NOT free the pointer memory.

Use aivis_response_analysis_get_report to get instance of DtoAnalysisResult as JSON byte array.

Flavour requirement: FULL

Parameters
[in]data_handleHandle to tabular data context
[in]config_json_ptrPointer to JSON byte array of DtoAnalysisConfig
[in]config_json_lenLength of byte array
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Unique handle to response analysis, or 0 if an error occurs.

◆ aivis_response_analysis_destroy()

void aivis_response_analysis_destroy ( ResponseAnalysisHandle  handle,
const struct Error **  out_err 
)

Destroy response analysis. It's always safe to destroy a response analysis. Internally the destruction only takes place after all references to this object have been released.

Flavour requirement: FULL

Parameters
[in]handleHandle to response analysis
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Nothing

◆ aivis_response_analysis_get_report()

const struct List_u8* aivis_response_analysis_get_report ( ResponseAnalysisHandle  handle,
const struct Error **  out_err 
)

Get response analysis's DtoAnalysisResult as JSON byte array.

Flavour requirement: FULL

Parameters
[in]handleHandle to response analysis
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Pointer to JSON byte array of DtoAnalysisResult, or null if an error occurs (Non-Null pointer must be freed with aivis_free())

◆ aivis_setup_init_api_key()

void aivis_setup_init_api_key ( const char *  api_key,
const struct Error **  out_err 
)

Set the licensing key to authenticate API calls with.

If the licensing key is not specified through this function, the engine will use the value in the environment variable AIVIS_ENGINE_V2_API_KEY.

Attention
This function may only be called once for this runtime. Additional calls will result in an exception.

Flavour requirement: FULL, INFERENCE

Parameters
[in]api_keyAPI license key
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Nothing

◆ aivis_setup_init_thread_count()

void aivis_setup_init_thread_count ( uint32_t  max_threads,
const struct Error **  out_err 
)

Initialize library to use parallel computation up to given thread count. If count is set to 0 (default), library will automatically use all available threads from MAX_CPU_THREADS.

Attention
This function can only be called once for this runtime. Additional calls will result in an exception.

Flavour requirement: FULL, INFERENCE

Parameters
[in]max_threadsMaximum number of threads used for computation
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Nothing

◆ aivis_setup_register_logger()

void aivis_setup_register_logger ( void(*)(uint8_t, const char *, const char *, const char *)  callback,
const struct Error **  out_err 
)

Initialize library to use given callback for logging. If no logger is set, the library will not log anything. This callback is called whenever the engine writes a log message.

Flavour requirement: FULL, INFERENCE

Parameters
[in]callbackFunction pointer implementing a logging function:
  • u8 - Level: ERROR = 1, WARN = 2, INFO = 3, DEBUG = 4, TRACE = 5
  • *const c_char - Thread: Current thread as string
  • *const c_char - Module: Current engine module as string
  • *const c_char - Message: Log message
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Nothing

◆ aivis_tabular_data_add_boolean_column()

void aivis_tabular_data_add_boolean_column ( TabularDataHandle  handle,
const char *  column_id,
const struct DtoBooleanCell data_ptr,
size_t  data_len,
const struct Error **  out_err 
)

Add boolean column to data context. Given data is copied. This function does NOT free the pointer memory. Calling this method on an existing column with respective type allows to add data to this column (overriding duplicated row ids; for duplicated row ids in the given List, the last one will determine the value). Trying to add data to an already existing synthesized column or a column of wrong type will result in an exception.

Flavour requirement: FULL, INFERENCE

Parameters
[in]handleHandle to tabular data context
[in]column_idColumn-ID as string
[in]data_ptrPointer to array of DtoBooleanCell
[in]data_lenLength of data array
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Nothing

◆ aivis_tabular_data_add_float_column()

void aivis_tabular_data_add_float_column ( TabularDataHandle  handle,
const char *  column_id,
const struct DtoFloatCell data_ptr,
size_t  data_len,
const struct Error **  out_err 
)

Add float column to data context. Given data is copied. This function does NOT free the pointer memory. Calling this method on an existing column with respective type allows to add data to this column (overriding duplicated row ids; for duplicated row ids in the given List, the last one will determine the value). Trying to add data to an already existing synthesized column or a column of wrong type will result in an exception.

Flavour requirement: FULL, INFERENCE

Parameters
[in]handleHandle to tabular data context
[in]column_idColumn-ID as string
[in]data_ptrPointer to array of DtoFloatCell
[in]data_lenLength of data array
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Nothing

◆ aivis_tabular_data_add_string_column()

void aivis_tabular_data_add_string_column ( TabularDataHandle  handle,
const char *  column_id,
const struct DtoStringCell data_ptr,
size_t  data_len,
const struct Error **  out_err 
)

Add string column to data context. Given data is copied. This function does NOT free the pointer memory. Calling this method on an existing column with respective type allows to add data to this column (overriding duplicated row ids; for duplicated row ids in the given List, the last one will determine the value). Trying to add data to an already existing synthesized column or a column of wrong type will result in an exception.

Flavour requirement: FULL, INFERENCE

Parameters
[in]handleHandle to tabular data context
[in]column_idColumn-ID as string
[in]data_ptrPointer to array of DtoStringCell
[in]data_lenLength of data array
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Nothing

◆ aivis_tabular_data_create()

TabularDataHandle aivis_tabular_data_create ( const struct Error **  out_err)

Create new data context. Returned handle uniquely identifies this data context for use in other functions. Make sure to delete this context with aivis_tabular_data_destroy().

Fill this context with data:

Get information about this context:

Flavour requirement: FULL, INFERENCE

Parameters
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Unique Handle to tabular data context, or 0 if an error occurs.

◆ aivis_tabular_data_destroy()

void aivis_tabular_data_destroy ( TabularDataHandle  handle,
const struct Error **  out_err 
)

Destroy data context and all its data. It's always safe to destroy a data context. Internally the destruction only takes place after all references to this context have been released.

Flavour requirement: FULL, INFERENCE

Parameters
[in]handleHandle to tabular data context
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Nothing

◆ aivis_tabular_data_get_boolean_column()

const struct List_DtoBooleanCell* aivis_tabular_data_get_boolean_column ( TabularDataHandle  handle,
const char *  column_id,
const struct Error **  out_err 
)

Get boolean data of a column with given column_id from this tabular data context. Requesting a non-existing column or a column of wrong type will result in an exception.

Flavour requirement: FULL, INFERENCE

Parameters
[in]handleHandle to tabular data context
[in]column_idColumn-ID as string
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Pointer to list of DtoBooleanCell, or null if an error occurs (Non-Null pointer must be freed with aivis_free())

◆ aivis_tabular_data_get_float_column()

const struct List_DtoFloatCell* aivis_tabular_data_get_float_column ( TabularDataHandle  handle,
const char *  column_id,
const struct Error **  out_err 
)

Get float data of a column with given column_id from this tabular data context. Requesting a non-existing column or a column of wrong type will result in an exception.

Flavour requirement: FULL, INFERENCE

Parameters
[in]handleHandle to tabular data context
[in]column_idColumn-ID as string
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Pointer to list of DtoFloatCell, or null if an error occurs (Non-Null pointer must be freed with aivis_free())

◆ aivis_tabular_data_get_string_column()

const struct List_DtoStringCell* aivis_tabular_data_get_string_column ( TabularDataHandle  handle,
const char *  column_id,
const struct Error **  out_err 
)

Get string data of a column with given column_id from this tabular data context. Requesting a non-existing column or a column of wrong type will result in an exception.

Flavour requirement: FULL, INFERENCE

Parameters
[in]handleHandle to tabular data context
[in]column_idColumn-ID as string
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Pointer to list of DtoStringCell, or null if an error occurs (Non-Null pointer must be freed with aivis_free())

◆ aivis_timeseries_data_add_boolean_signal()

void aivis_timeseries_data_add_boolean_signal ( TimeseriesDataHandle  handle,
const char *  signal_id,
const struct DtoBooleanDataPoint data_ptr,
size_t  data_len,
const struct Error **  out_err 
)

Add boolean signal to data context. Given data is copied. This function does NOT free the pointer memory. Calling this method on an existing signal with respective type allows to add data to this signal (overriding duplicated timestamps; for duplicated timestamps in the given List, the last one will determine the value). Trying to add data to an already existing synthesized signal or a signal of wrong type will result in an exception.

Flavour requirement: FULL, INFERENCE

Parameters
[in]handleHandle to timeseries data context
[in]signal_idSignal-ID as string
[in]data_ptrPointer to array of DtoBooleanDataPoint
[in]data_lenLength of data array
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Nothing

◆ aivis_timeseries_data_add_boolean_signal_by_expression()

void aivis_timeseries_data_add_boolean_signal_by_expression ( TimeseriesDataHandle  handle,
const char *  signal_id,
const char *  expression,
const struct Error **  out_err 
)

Add a synthesized boolean signal to the data context. Data is created by the given expression from already added signals. Check UserGuide to see how expressions can be used. Trying to add an already existing signal or invalid expression usage will result in an exception.

Flavour requirement: FULL, INFERENCE

Parameters
[in]handleHandle to timeseries data context
[in]signal_idSignal-ID as string
[in]expressionExpression defining boolean data
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Nothing

◆ aivis_timeseries_data_add_boolean_signal_with_availability()

void aivis_timeseries_data_add_boolean_signal_with_availability ( TimeseriesDataHandle  handle,
const char *  signal_id,
const struct DtoBooleanDataPointWithAvailability data_ptr,
size_t  data_len,
const struct Error **  out_err 
)

Add boolean signal (with availabilities) to data context. Given data is copied. This function does NOT free the pointer memory. Calling this method on an existing signal with respective type allows to add data to this signal (overriding duplicated timestamps; for duplicated timestamps in the given List, the last one will determine the value). Trying to add data to an already existing synthesized signal or a signal of wrong type will result in an exception.

Flavour requirement: FULL, INFERENCE

Parameters
[in]handleHandle to timeseries data context
[in]signal_idSignal-ID as string
[in]data_ptrPointer to array of DtoBooleanDataPointWithAvailability
[in]data_lenLength of data array
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Nothing

◆ aivis_timeseries_data_add_float_signal()

void aivis_timeseries_data_add_float_signal ( TimeseriesDataHandle  handle,
const char *  signal_id,
const struct DtoFloatDataPoint data_ptr,
size_t  data_len,
const struct Error **  out_err 
)

Add float signal to data context. Given data is copied. This function does NOT free the pointer memory. Calling this method on an existing signal with respective type allows to add data to this signal (overriding duplicated timestamps; for duplicated timestamps in the given List, the last one will determine the value). Trying to add data to an already existing synthesized signal or a signal of wrong type will result in an exception.

Flavour requirement: FULL, INFERENCE

Parameters
[in]handleHandle to timeseries data context
[in]signal_idSignal-ID as string
[in]data_ptrPointer to array of DtoFloatDataPoint
[in]data_lenLength of data array
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Nothing

◆ aivis_timeseries_data_add_float_signal_by_expression()

void aivis_timeseries_data_add_float_signal_by_expression ( TimeseriesDataHandle  handle,
const char *  signal_id,
const char *  expression,
const struct Error **  out_err 
)

Add a synthesized float signal to the data context. Data is created by the given expression from already added signals. Check UserGuide to see how expressions can be used. Trying to add an already existing signal or invalid expression usage will result in an exception.

Flavour requirement: FULL, INFERENCE

Parameters
[in]handleHandle to timeseries data context
[in]signal_idSignal-ID as string
[in]expressionExpression defining float data
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Nothing

◆ aivis_timeseries_data_add_float_signal_with_availability()

void aivis_timeseries_data_add_float_signal_with_availability ( TimeseriesDataHandle  handle,
const char *  signal_id,
const struct DtoFloatDataPointWithAvailability data_ptr,
size_t  data_len,
const struct Error **  out_err 
)

Add float signal (with availabilities) to data context. Given data is copied. This function does NOT free the pointer memory. Calling this method on an existing signal with respective type allows to add data to this signal (overriding duplicated timestamps; for duplicated timestamps in the given List, the last one will determine the value). Trying to add data to an already existing synthesized signal or a signal of wrong type will result in an exception.

Flavour requirement: FULL, INFERENCE

Parameters
[in]handleHandle to timeseries data context
[in]signal_idSignal-ID as string
[in]data_ptrPointer to array of DtoFloatDataPointWithAvailability
[in]data_lenLength of data array
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Nothing

◆ aivis_timeseries_data_add_string_signal()

void aivis_timeseries_data_add_string_signal ( TimeseriesDataHandle  handle,
const char *  signal_id,
const struct DtoStringDataPoint data_ptr,
size_t  data_len,
const struct Error **  out_err 
)

Add string signal to data context. Given data is copied. This function does NOT free the pointer memory. Calling this method on an existing signal with respective type allows to add data to this signal (overriding duplicated timestamps; for duplicated timestamps in the given List, the last one will determine the value). Trying to add data to an already existing synthesized signal or a signal of wrong type will result in an exception.

Flavour requirement: FULL, INFERENCE

Parameters
[in]handleHandle to timeseries data context
[in]signal_idSignal-ID as string
[in]data_ptrPointer to array of DtoStringDataPoint
[in]data_lenLength of data array
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Nothing

◆ aivis_timeseries_data_add_string_signal_by_expression()

void aivis_timeseries_data_add_string_signal_by_expression ( TimeseriesDataHandle  handle,
const char *  signal_id,
const char *  expression,
const struct Error **  out_err 
)

Add a synthesized string signal to the data context. Data is created by the given expression from already added signals. Check UserGuide to see how expressions can be used. Trying to add an already existing signal or invalid expression usage will result in an exception.

Flavour requirement: FULL, INFERENCE

Parameters
[in]handleHandle to timeseries data context
[in]signal_idSignal-ID as string
[in]expressionExpression defining string data
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Nothing

◆ aivis_timeseries_data_add_string_signal_with_availability()

void aivis_timeseries_data_add_string_signal_with_availability ( TimeseriesDataHandle  handle,
const char *  signal_id,
const struct DtoStringDataPointWithAvailability data_ptr,
size_t  data_len,
const struct Error **  out_err 
)

Add string signal (with availabilities) to data context. Given data is copied. This function does NOT free the pointer memory. Calling this method on an existing signal with respective type allows to add data to this signal (overriding duplicated timestamps; for duplicated timestamps in the given List, the last one will determine the value). Trying to add data to an already existing synthesized signal or a signal of wrong type will result in an exception.

Flavour requirement: FULL, INFERENCE

Parameters
[in]handleHandle to timeseries data context
[in]signal_idSignal-ID as string
[in]data_ptrPointer to array of DtoStringDataPointWithAvailability
[in]data_lenLength of data array
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Nothing

◆ aivis_timeseries_data_create()

TimeseriesDataHandle aivis_timeseries_data_create ( const struct Error **  out_err)

Create new data context. Returned handle uniquely identifies this data context for use in other functions. Make sure to delete this context with aivis_timeseries_data_destroy().

Fill this context with data:

Get information about this context:

Flavour requirement: FULL, INFERENCE

Parameters
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Unique Handle to timeseries data context, or 0 if an error occurs.

◆ aivis_timeseries_data_destroy()

void aivis_timeseries_data_destroy ( TimeseriesDataHandle  handle,
const struct Error **  out_err 
)

Destroy data context and all its data. It's always safe to destroy a data context. Internally the destruction only takes place after all references to this context have been released.

Flavour requirement: FULL, INFERENCE

Parameters
[in]handleHandle to timeseries data context
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Nothing

◆ aivis_timeseries_data_get_boolean_signal()

const struct List_DtoBooleanDataPoint* aivis_timeseries_data_get_boolean_signal ( TimeseriesDataHandle  handle,
const char *  signal_id,
const struct Error **  out_err 
)

Get boolean data of a signal with given signal_id from this timeseries data context. Requesting a non-existing signal or a signal of wrong type will result in an exception.

Flavour requirement: FULL, INFERENCE

Parameters
[in]handleHandle to timeseries data context
[in]signal_idSignal-ID as string
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Pointer to list of DtoBooleanDataPoint, or null if an error occurs (Non-Null pointer must be freed with aivis_free())

◆ aivis_timeseries_data_get_expression_info()

const struct DtoExpressionInfo* aivis_timeseries_data_get_expression_info ( TimeseriesDataHandle  handle,
const char *  signal_id,
const struct Error **  out_err 
)

Get expression info of a synthesized signal with given signal_id from this timeseries data context. Requesting a non-existing or non-synthesized signal will result in an exception. DtoExpressionInfo contains a list of IDs of all involved signals, that have been used to create this signal's data.

Flavour requirement: FULL, INFERENCE

Parameters
[in]handleHandle to timeseries data context
[in]signal_idSignal-ID as string
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Pointer to DtoExpressionInfo, or null if an error occurs (Non-Null pointer must be freed with aivis_free())

◆ aivis_timeseries_data_get_float_signal()

const struct List_DtoFloatDataPoint* aivis_timeseries_data_get_float_signal ( TimeseriesDataHandle  handle,
const char *  signal_id,
const struct Error **  out_err 
)

Get float data of a signal with given signal_id from this timeseries data context. Requesting a non-existing signal or a signal of wrong type will result in an exception.

Flavour requirement: FULL, INFERENCE

Parameters
[in]handleHandle to timeseries data context
[in]signal_idSignal-ID as string
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Pointer to list of DtoFloatDataPoint, or null if an error occurs (Non-Null pointer must be freed with aivis_free())

◆ aivis_timeseries_data_get_string_signal()

const struct List_DtoStringDataPoint* aivis_timeseries_data_get_string_signal ( TimeseriesDataHandle  handle,
const char *  signal_id,
const struct Error **  out_err 
)

Get string data of a signal with given signal_id from this timeseries data context. Requesting a non-existing signal or a signal of wrong type will result in an exception.

Flavour requirement: FULL, INFERENCE

Parameters
[in]handleHandle to timeseries data context
[in]signal_idSignal-ID as string
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Pointer to list of DtoStringDataPoint, or null if an error occurs (Non-Null pointer must be freed with aivis_free())

◆ aivis_timeseries_data_parse_expression()

const struct DtoExpressionInfo* aivis_timeseries_data_parse_expression ( const char *  expression,
const struct Error **  out_err 
)

Parse given expression and return a list of involved signals IDs. DtoExpressionInfo contains a list of IDs of signals that are necessary to create a signal with this expression.

Flavour requirement: FULL, INFERENCE

Parameters
[in]expressionExpression defining signal data
[out]out_errIf an error occurs, instance of Error is written to this pointer, otherwise null (Non-Null pointer must be freed with aivis_free())
Returns
Pointer to DtoExpressionInfo, or null if an error occurs (Non-Null pointer must be freed with aivis_free())