12#ifndef INFUSE_SDK_INCLUDE_INFUSE_ALGORITHM_RUNNER_ALGORITHMS_STATIONARY_WINDOWED_H_
13#define INFUSE_SDK_INCLUDE_INFUSE_ALGORITHM_RUNNER_ALGORITHMS_STATIONARY_WINDOWED_H_
17#include <zephyr/toolchain.h>
66#define ALGORITHM_STATIONARY_WINDOWED_DEFINE(name, loggers_, tdfs, window_seconds_, threshold_ug) \
67 static const struct algorithm_stationary_windowed_config name##_config = { \
70 .algorithm_id = 0x15F20000, \
71 .zbus_channel = INFUSE_ZBUS_CHAN_IMU_ACC_MAG, \
72 .state_size = sizeof(struct algorithm_stationary_windowed_data), \
75 .loggers = loggers_, \
79 .window_seconds = window_seconds_, \
80 .std_dev_threshold_ug = threshold_ug, \
82 static struct algorithm_stationary_windowed_data name##_data; \
83 static struct algorithm_runner_algorithm name = { \
84 .impl = algorithm_stationary_windowed_fn, \
85 .config = &name##_config.common, \
86 .runtime_state = &name##_data, \
Infuse-IoT algorithm runner.
Infuse-IoT zbus channels.
void algorithm_stationary_windowed_fn(const struct zbus_channel *chan, const void *config, void *data)
Algorithm implementation, see algorithm_run_fn.
@ ALGORITHM_STATIONARY_WINDOWED_LOG_WINDOW_STD_DEV
Definition stationary_windowed.h:34
Infuse-IoT statistics helpers.
Definition stationary_windowed.h:37
uint32_t window_seconds
Duration of window to examine.
Definition stationary_windowed.h:41
uint32_t std_dev_threshold_ug
Definition stationary_windowed.h:43
struct algorithm_runner_common_config common
Definition stationary_windowed.h:39
Definition stationary_windowed.h:46
uint32_t window_end
Definition stationary_windowed.h:48
struct statistics_state stats
Definition stationary_windowed.h:47
uint32_t print_end
Definition stationary_windowed.h:49
Definition statistics.h:31