nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches
ei_wrapper.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
11#ifndef _EI_WRAPPER_H_
12#define _EI_WRAPPER_H_
13
14
22#include <zephyr/kernel.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
34typedef void (*ei_wrapper_result_ready_cb)(int err);
35
36
43
44
51
52
59
60
66
67
73
74
83const char *ei_wrapper_get_classifier_label(size_t idx);
84
85
96int ei_wrapper_add_data(const float *data, size_t data_size);
97
98
113int ei_wrapper_clear_data(bool *cancelled);
114
115
129int ei_wrapper_start_prediction(size_t window_shift, size_t frame_shift);
130
131
150int ei_wrapper_get_next_classification_result(const char **label, float *value, size_t *idx);
151
152
164int ei_wrapper_get_anomaly(float *anomaly);
165
166
188int ei_wrapper_get_timing(int *dsp_time, int *classification_time,
189 int *anomaly_time);
190
191
200
201
202#ifdef __cplusplus
203}
204#endif
205
210#endif /* _EI_WRAPPER_H_ */
int ei_wrapper_init(ei_wrapper_result_ready_cb cb)
const char * ei_wrapper_get_classifier_label(size_t idx)
size_t ei_wrapper_get_window_size(void)
int ei_wrapper_add_data(const float *data, size_t data_size)
size_t ei_wrapper_get_frame_size(void)
int ei_wrapper_clear_data(bool *cancelled)
size_t ei_wrapper_get_classifier_label_count(void)
bool ei_wrapper_classifier_has_anomaly(void)
int ei_wrapper_get_timing(int *dsp_time, int *classification_time, int *anomaly_time)
int ei_wrapper_start_prediction(size_t window_shift, size_t frame_shift)
int ei_wrapper_get_anomaly(float *anomaly)
int ei_wrapper_get_next_classification_result(const char **label, float *value, size_t *idx)
size_t ei_wrapper_get_classifier_frequency(void)
void(* ei_wrapper_result_ready_cb)(int err)
Callback executed by the wrapper when the result is ready.
Definition ei_wrapper.h:34