aivis-engine-v2-cn-sdk-c  0.0.0-master.5224.aec3e3c7x
Data Structures | Macros | Typedefs | Functions
aivis-engine-v2-cn-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
 
struct  DtoFloatCostValue
 
struct  DtoFloatConstraintValue
 
struct  List_DtoFloatConstraintValue
 
struct  DtoFloatConstraintValues
 
struct  List_DtoFloatConstraintValues
 
struct  DtoFloatCostValueWithNextNormal
 
struct  DtoFloatConstraintValueWithNextNormal
 
struct  List_DtoFloatConstraintValueWithNextNormal
 
struct  DtoFeatureValueWithNextNormal
 
struct  List_DtoFeatureValueWithNextNormal
 
struct  DtoFloatConstraintValuesWithNextNormal
 
struct  List_DtoFloatConstraintValuesWithNextNormal
 

Macros

#define EPS   1e-12
 

Typedefs

typedef uint64_t ModelContextHandle
 
typedef uint64_t ConstraintNavigatorHubHandle
 
typedef uint64_t ConstraintNavigatorInferenceHandle
 
typedef uint64_t TimeseriesDataHandle
 
typedef uint64_t TabularDataHandle
 
typedef int64_t Time
 

Functions

ModelContextHandle aivis_model_context_create (const struct Error **out_err)
 
ModelContextHandle aivis_model_context_add_signal_prediction (ModelContextHandle model_context_handle, const char *model_id, const uint8_t *dto_model_json_ptr, size_t dto_model_json_len, const struct Error **out_err)
 
ModelContextHandle aivis_model_context_add_anomaly_detection (ModelContextHandle model_context_handle, const char *model_id, const uint8_t *dto_model_json_ptr, size_t dto_model_json_len, const struct Error **out_err)
 
ModelContextHandle aivis_model_context_add_state_detection (ModelContextHandle model_context_handle, const char *model_id, const uint8_t *dto_model_json_ptr, size_t dto_model_json_len, int64_t segment_id, const struct Error **out_err)
 
void aivis_model_context_destroy (ModelContextHandle handle, const struct Error **out_err)
 
ConstraintNavigatorHubHandle aivis_constraint_navigator_hub_create (ModelContextHandle model_context_handle, const uint8_t *config_json_ptr, size_t config_json_len, const struct Error **out_err)
 
const struct List_u8aivis_constraint_navigator_hub_get_model (ConstraintNavigatorHubHandle handle, const struct Error **out_err)
 
const struct List_u8aivis_constraint_navigator_hub_get_report (ConstraintNavigatorHubHandle handle, const struct Error **out_err)
 
void aivis_constraint_navigator_hub_destroy (ConstraintNavigatorHubHandle handle, const struct Error **out_err)
 
ConstraintNavigatorInferenceHandle aivis_constraint_navigator_inference_create_by_hub_handle (ConstraintNavigatorHubHandle hub_handle, const uint8_t *config_json_ptr, size_t config_json_len, 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)
 
void aivis_timeseries_data_read_files (TimeseriesDataHandle handle, const uint8_t *config_json_ptr, size_t config_json_len, const struct Error **out_err)
 
void aivis_tabular_data_read_files (TabularDataHandle handle, const uint8_t *config_json_ptr, size_t config_json_len, const struct Error **out_err)
 
ConstraintNavigatorInferenceHandle aivis_constraint_navigator_inference_create_by_hub_model (const uint8_t *hub_model_json_ptr, size_t hub_model_json_len, const uint8_t *config_json_ptr, size_t config_json_len, const struct Error **out_err)
 
const struct List_u8aivis_constraint_navigator_inference_get_data_specification (ConstraintNavigatorInferenceHandle handle, const struct Error **out_err)
 
const struct List_DtoFloatConstraintValuesaivis_constraint_navigator_inference_infer_float (ConstraintNavigatorInferenceHandle inference_handle, TimeseriesDataHandle data_handle, const Time *timestamps_ptr, size_t timestamps_len, const struct Error **out_err)
 
const struct List_DtoFloatConstraintValuesWithNextNormalaivis_constraint_navigator_inference_infer_float_with_next_normal (ConstraintNavigatorInferenceHandle inference_handle, TimeseriesDataHandle data_handle, const Time *timestamps_ptr, size_t timestamps_len, const uint8_t *config_json_ptr, size_t config_json_len, const struct Error **out_err)
 
void aivis_constraint_navigator_inference_destroy (ConstraintNavigatorInferenceHandle handle, const struct Error **out_err)
 

Macro Definition Documentation

◆ EPS

#define EPS   1e-12

Typedef Documentation

◆ ConstraintNavigatorHubHandle

typedef uint64_t ConstraintNavigatorHubHandle

◆ ConstraintNavigatorInferenceHandle

Handle for constraint navigator inference

◆ ModelContextHandle

typedef uint64_t ModelContextHandle

Handle for constraint navigator inference

◆ TabularDataHandle

typedef uint64_t TabularDataHandle

Handle for tabular data context

◆ Time

typedef int64_t Time

timestamps and durations

◆ TimeseriesDataHandle

typedef uint64_t TimeseriesDataHandle

Handle for data context

Function Documentation

◆ aivis_constraint_navigator_hub_create()

ConstraintNavigatorHubHandle aivis_constraint_navigator_hub_create ( ModelContextHandle  model_context_handle,
const uint8_t *  config_json_ptr,
size_t  config_json_len,
const struct Error **  out_err 
)

Create constraint navigator hub for given model context handle and config. Returned handle uniquely identifies this hub for use in other functions. Make sure to delete this instance with aivis_constraint_navigator_hub_destroy().

Flavour requirement: FULL

Parameters
[in]model_context_handleHandle to model context
[in]config_json_ptrPointer to JSON byte array of DtoHubConfig
[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 constraint navigator hub, or 0 if an error occurs.

◆ aivis_constraint_navigator_hub_destroy()

void aivis_constraint_navigator_hub_destroy ( ConstraintNavigatorHubHandle  handle,
const struct Error **  out_err 
)

Destroy constraint navigator hub. It's always safe to destroy an instance. Internally the destruction only takes place after all references to this object have been released.

Flavour requirement: FULL

Parameters
[in]handleHandle to constraint navigator hub
[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_constraint_navigator_hub_get_model()

const struct List_u8* aivis_constraint_navigator_hub_get_model ( ConstraintNavigatorHubHandle  handle,
const struct Error **  out_err 
)

Get DtoConstraintModel as JSON byte array for given hub handle

Flavour requirement: FULL

Parameters
[in]handleHandle to constraint navigator hub
[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 DtoHubModel, or null if an error occurs (Non-Null pointer must be freed with aivis_free())

◆ aivis_constraint_navigator_hub_get_report()

const struct List_u8* aivis_constraint_navigator_hub_get_report ( ConstraintNavigatorHubHandle  handle,
const struct Error **  out_err 
)

Get DtoReport as JSON byte array for given hub handle

Flavour requirement: FULL

Parameters
[in]handleHandle to constraint navigator hub
[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 DtoHubReport, or null if an error occurs (Non-Null pointer must be freed with aivis_free())

◆ aivis_constraint_navigator_inference_create_by_hub_handle()

ConstraintNavigatorInferenceHandle aivis_constraint_navigator_inference_create_by_hub_handle ( ConstraintNavigatorHubHandle  hub_handle,
const uint8_t *  config_json_ptr,
size_t  config_json_len,
const struct Error **  out_err 
)

Create constraint navigator inference for given hub and config. Returned handle uniquely identifies this inference for use in other functions. Make sure to delete this inference with aivis_constraint_navigator_inference_destroy().

To create predictions with this inference instance, use any of:

  • aivis_constraint_navigator_inference_infer_models_with_next_normal()

Flavour requirement: FULL

Parameters
[in]hub_handleHandle to constraint navigator hub
[in]config_json_ptrPointer to JSON byte array of DtoInferenceConfig
[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 constraint navigator inference, or 0 if an error occurs.

◆ aivis_constraint_navigator_inference_create_by_hub_model()

ConstraintNavigatorInferenceHandle aivis_constraint_navigator_inference_create_by_hub_model ( const uint8_t *  hub_model_json_ptr,
size_t  hub_model_json_len,
const uint8_t *  config_json_ptr,
size_t  config_json_len,
const struct Error **  out_err 
)

Create constraint navigator inference for given DtoConstraintModel and config. Returned handle uniquely identifies this inference for use in other functions. Make sure to delete this inference with aivis_constraint_navigator_inference_destroy().

To create predictions with this inference instance, use any of:

Flavour requirement: FULL, INFERENCE

Parameters
[in]constraint_model_json_ptrPointer to JSON byte array of DtoHubModel
[in]constraint_model_json_lenLength of JSON byte array of DtoHubModel
[in]config_json_ptrPointer to JSON byte array of DtoInferenceConfig
[in]config_json_lenLength of JSON byte array of DtoInferenceConfig
[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 constraint navigator inference, or 0 if an error occurs.

◆ aivis_constraint_navigator_inference_destroy()

void aivis_constraint_navigator_inference_destroy ( ConstraintNavigatorInferenceHandle  handle,
const struct Error **  out_err 
)

Destroy constraint navigator inference. It's always safe to destroy an inference. Internally the destruction only takes place after all references to this object have been released.

Flavour requirement: FULL, INFERENCE

Parameters
[in]handleHandle to constraint navigator inference
[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_constraint_navigator_inference_get_data_specification()

const struct List_u8* aivis_constraint_navigator_inference_get_data_specification ( ConstraintNavigatorInferenceHandle  handle,
const struct Error **  out_err 
)

Get DtoInferenceDataSpecification as JSON byte array for given inference handle

Flavour requirement: FULL, INFERENCE

Parameters
[in]handleHandle to constraint navigator inference
[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 DtoInferenceDataSpecification, or null if an error occurs (Non-Null pointer must be freed with aivis_free())

◆ aivis_constraint_navigator_inference_infer_float()

const struct List_DtoFloatConstraintValues* aivis_constraint_navigator_inference_infer_float ( ConstraintNavigatorInferenceHandle  inference_handle,
TimeseriesDataHandle  data_handle,
const Time timestamps_ptr,
size_t  timestamps_len,
const struct Error **  out_err 
)

Calculate the inference on the float valued models within the hub model. The result will be a list of DtoFloatConstraintValues instances corresponding to given timestamps. Make sure to fill the data context with all data needed for calculation. Check the hub model's DtoInferenceDataSpecification for needed signals and time ranges.

Flavour requirement: FULL, INFERENCE

Parameters:

Parameters
[in]inference_handleHandle to constraint navigator inference
[in]data_handleHandle to data context
[in]timestamps_ptrPointer to array of Time
[in]timestamps_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
Pointer to list of DtoFloatConstraintValues, or null if an error occurs (Non-Null pointer must be freed with aivis_free())

◆ aivis_constraint_navigator_inference_infer_float_with_next_normal()

const struct List_DtoFloatConstraintValuesWithNextNormal* aivis_constraint_navigator_inference_infer_float_with_next_normal ( ConstraintNavigatorInferenceHandle  inference_handle,
TimeseriesDataHandle  data_handle,
const Time timestamps_ptr,
size_t  timestamps_len,
const uint8_t *  config_json_ptr,
size_t  config_json_len,
const struct Error **  out_err 
)

Calculate the inference and the closest point that satisfies the given conditions on the provided float valued models. The result will be a list of DtoFloatConstraintValuesWithNextNormal instances corresponding to given timestamps. Make sure to fill the data context with all data needed for calculation. Check the hub model's DtoInferenceDataSpecification for needed signals and time ranges.

Flavour requirement: FULL, INFERENCE

Parameters:

Parameters
[in]inference_handleHandle to constraint navigator inference
[in]data_handleHandle to data context
[in]timestamps_ptrPointer to array of Time
[in]timestamps_lenLength of data array
[in]config_json_ptrPointer to JSON byte array of DtoFloatNextNormalConfig
[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
Pointer to list of DtoFloatConstraintValuesWithNextNormal, or null if an error occurs (Non-Null pointer must be freed with aivis_free())

◆ 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_model_context_add_anomaly_detection()

ModelContextHandle aivis_model_context_add_anomaly_detection ( ModelContextHandle  model_context_handle,
const char *  model_id,
const uint8_t *  dto_model_json_ptr,
size_t  dto_model_json_len,
const struct Error **  out_err 
)

Add a anomaly detection model (DtoModel) to model context. The added model will be used for constructing constraints.

Flavour requirement: FULL

Parameters
[in]model_context_handleHandle to model context
[in]model_idModel-ID as string
[in]dto_model_json_ptrPointer to JSON byte array of DtoModel of Anomaly Detection
[in]dto_model_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
The input model_context_handle, which indicates that in the python and java worlds, this function call can be chained, or 0 if an error occurs.

◆ aivis_model_context_add_signal_prediction()

ModelContextHandle aivis_model_context_add_signal_prediction ( ModelContextHandle  model_context_handle,
const char *  model_id,
const uint8_t *  dto_model_json_ptr,
size_t  dto_model_json_len,
const struct Error **  out_err 
)

Add a signal prediction model (DtoModel) to model context. The added model will be used for constructing constraints.

Flavour requirement: FULL

Parameters
[in]model_context_handleHandle to model context
[in]model_idModel-ID as string
[in]dto_model_json_ptrPointer to JSON byte array of DtoModel of Signal Prediction
[in]dto_model_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
The input model_context_handle, which indicates that in the python and java worlds, this function call can be chained, or 0 if an error occurs.

◆ aivis_model_context_add_state_detection()

ModelContextHandle aivis_model_context_add_state_detection ( ModelContextHandle  model_context_handle,
const char *  model_id,
const uint8_t *  dto_model_json_ptr,
size_t  dto_model_json_len,
int64_t  segment_id,
const struct Error **  out_err 
)

Add a state detection model (DtoModel) of a given segment id to model context. The added model will be used for constructing constraints.

Flavour requirement: FULL

Parameters
[in]model_context_handleHandle to model context
[in]model_idModel-ID as string
[in]dto_model_json_ptrPointer to JSON byte array of DtoModel of Anomaly Detection
[in]dto_model_json_lenLength of byte array
[in]segment_idDtoSegmentId as i64
[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
The input model_context_handle, which indicates that in the python and java worlds, this function call can be chained, or 0 if an error occurs.

◆ aivis_model_context_create()

ModelContextHandle aivis_model_context_create ( const struct Error **  out_err)

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

Flavour requirement: FULL

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 model context, or 0 if an error occurs.

◆ aivis_model_context_destroy()

void aivis_model_context_destroy ( ModelContextHandle  handle,
const struct Error **  out_err 
)

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

Flavour requirement: FULL

Parameters
[in]handleHandle to model 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_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_tabular_data_read_files()

void aivis_tabular_data_read_files ( TabularDataHandle  handle,
const uint8_t *  config_json_ptr,
size_t  config_json_len,
const struct Error **  out_err 
)

Read and ingest files to tabular data context. This function does NOT free the pointer memory.

Flavour requirement: FULL, INFERENCE

Parameters
[in]handleHandle to tabular data context
[in]config_json_ptrPointer to JSON byte array of DtoTabularFilesReaderConfig
[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
Nothing

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

◆ aivis_timeseries_data_read_files()

void aivis_timeseries_data_read_files ( TimeseriesDataHandle  handle,
const uint8_t *  config_json_ptr,
size_t  config_json_len,
const struct Error **  out_err 
)

Read and ingest files to timeseries data context. This function does NOT free the pointer memory.

Flavour requirement: FULL, INFERENCE

Parameters
[in]handleHandle to timeseries data context
[in]config_json_ptrPointer to JSON byte array of DtoTimeseriesFilesReaderConfig
[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
Nothing