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_config
 
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 void *config, 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 <infuse/algorithm_runner/algorithms/stationary_windowed.h>

Value:
static const struct algorithm_stationary_windowed_config name##_config = { \
.common = \
{ \
.algorithm_id = 0x15F20000, \
.zbus_channel = INFUSE_ZBUS_CHAN_IMU_ACC_MAG, \
.state_size = sizeof(struct algorithm_stationary_windowed_data), \
.logging = \
{ \
.loggers = loggers_, \
.tdf_mask = tdfs, \
}, \
}, \
.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.common, \
.runtime_state = &name##_data, \
}
@ INFUSE_ZBUS_CHAN_IMU_ACC_MAG
Data type: imu_magnitude_array.
Definition channels.h:54
void algorithm_stationary_windowed_fn(const struct zbus_channel *chan, const void *config, void *data)
Algorithm implementation, see algorithm_run_fn.
Definition runner.h:60
Definition stationary_windowed.h:37
struct algorithm_runner_common_config common
Definition stationary_windowed.h:39
Definition stationary_windowed.h:46

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 <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 void * config,
void * data )