Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
stationary_windowed APIs

stationary_windowed API More...

Data Structures

struct  algorithm_stationary_windowed_data

Macros

#define ALGORITHM_STATIONARY_WINDOWED_DEFINE(name, loggers_, tdfs, window_seconds_, threshold_ug)
 Statically define an instance of the stationary windows algorithm.

Enumerations

enum  { ALGORITHM_STATIONARY_WINDOWED_LOG_WINDOW_STD_DEV = BIT(0) }

Functions

void algorithm_stationary_windowed_fn (const struct zbus_channel *chan, const struct algorithm_runner_common_config *common, const void *args, void *data)
 Algorithm implementation, see algorithm_run_fn.

Detailed Description

stationary_windowed API

Macro Definition Documentation

◆ ALGORITHM_STATIONARY_WINDOWED_DEFINE

#define ALGORITHM_STATIONARY_WINDOWED_DEFINE ( name,
loggers_,
tdfs,
window_seconds_,
threshold_ug )

#include </__w/infuse-sdk/infuse-sdk/infuse-sdk/include/infuse/algorithm_runner/algorithms/stationary_windowed.h>

Value:
static const struct algorithm_runner_common_config name##_config = { \
.algorithm_id = 0x15F20000, \
.zbus_channel = INFUSE_ZBUS_CHAN_IMU_ACC_MAG, \
.arguments_size = sizeof(struct kv_alg_stationary_windowed_args), \
.state_size = sizeof(struct algorithm_stationary_windowed_data), \
.arguments_kv_key = KV_KEY_ALG_STATIONARY_WINDOWED_ARGS, \
}; \
static struct kv_alg_stationary_windowed_args name##_default_args = { \
.logging = \
{ \
.loggers = loggers_, \
.tdf_mask = tdfs, \
}, \
.args = \
{ \
.window_seconds = window_seconds_, \
.std_dev_threshold_ug = threshold_ug, \
}, \
}; \
static struct algorithm_stationary_windowed_data name##_data; \
static struct algorithm_runner_algorithm name = { \
.config = &name##_config, \
.arguments = &name##_default_args, \
.runtime_state = &name##_data, \
}
@ KV_KEY_ALG_STATIONARY_WINDOWED_ARGS
Configuration for the 'Stationary Windowed' algorithm.
Definition kv_types.h:638
@ INFUSE_ZBUS_CHAN_IMU_ACC_MAG
Data type: imu_magnitude_array.
Definition channels.h:55
void algorithm_stationary_windowed_fn(const struct zbus_channel *chan, const struct algorithm_runner_common_config *common, const void *args, void *data)
Algorithm implementation, see algorithm_run_fn.
Definition runner.h:31
Definition stationary_windowed.h:37
Configuration for the 'Stationary Windowed' algorithm.
Definition kv_types.h:474

Statically define an instance of the stationary windows algorithm.

Parameters
nameVariable name base
loggers_TDF loggers to log outputs to
tdfsTDFs to log
window_seconds_Duration of the time windows to examine in seconds
threshold_ugStandard deviation threshold in micro-g, above this value the device is moving.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

#include </__w/infuse-sdk/infuse-sdk/infuse-sdk/include/infuse/algorithm_runner/algorithms/stationary_windowed.h>

Enumerator
ALGORITHM_STATIONARY_WINDOWED_LOG_WINDOW_STD_DEV 

Function Documentation

◆ algorithm_stationary_windowed_fn()

void algorithm_stationary_windowed_fn ( const struct zbus_channel * chan,
const struct algorithm_runner_common_config * common,
const void * args,
void * data )