Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
|
demo API More...
Data Structures | |
struct | algorithm_demo_common_config |
union | algorithm_demo_common_data |
Macros | |
#define | ALGORITHM_DEMO_EVENT_DEFINE(name, loggers_, tdfs, event_chance_percent) |
Statically define an instance of the demo event algorithm. | |
#define | ALGORITHM_DEMO_STATE_DEFINE(name, loggers_, tdfs) |
Statically define an instance of the demo state algorithm. | |
#define | ALGORITHM_DEMO_METRIC_DEFINE(name, loggers_, tdfs, metric_compute_len) |
Statically define an instance of the demo compute algorithm. | |
Enumerations | |
enum | { ALGORITHM_DEMO_EVENT_LOG = BIT(0) , ALGORITHM_DEMO_STATE_LOG = BIT(0) , ALGORITHM_DEMO_METRIC_LOG = BIT(0) } |
Functions | |
void | algorithm_demo_event_fn (const struct zbus_channel *chan, const void *config, void *data) |
Algorithm implementation, see algorithm_run_fn. | |
void | algorithm_demo_state_fn (const struct zbus_channel *chan, const void *config, void *data) |
Algorithm implementation, see algorithm_run_fn. | |
void | algorithm_demo_metric_fn (const struct zbus_channel *chan, const void *config, void *data) |
Algorithm implementation, see algorithm_run_fn. | |
demo API
#define ALGORITHM_DEMO_EVENT_DEFINE | ( | name, | |
loggers_, | |||
tdfs, | |||
event_chance_percent ) |
#include <infuse/algorithm_runner/algorithms/demo.h>
Statically define an instance of the demo event algorithm.
This algorithm randomly generates events, with a percentage chance equal to the argument on each IMU sample buffer that arrives.
name | Variable name base |
loggers_ | TDF loggers to log outputs to |
tdfs | TDFs to log |
event_chance_percent | Chance to emit an event on each buffer |
#define ALGORITHM_DEMO_METRIC_DEFINE | ( | name, | |
loggers_, | |||
tdfs, | |||
metric_compute_len ) |
#include <infuse/algorithm_runner/algorithms/demo.h>
Statically define an instance of the demo compute algorithm.
This algorithm generates a compute metric, with one metric computed every N samples
name | Variable name base |
loggers_ | TDF loggers to log outputs to |
tdfs | TDFs to log |
metric_compute_len | Number of samples to compute metric over |
#define ALGORITHM_DEMO_STATE_DEFINE | ( | name, | |
loggers_, | |||
tdfs ) |
#include <infuse/algorithm_runner/algorithms/demo.h>
Statically define an instance of the demo state algorithm.
This algorithm randomly transitions between states on IMU buffers
name | Variable name base |
loggers_ | TDF loggers to log outputs to |
tdfs | TDFs to log |
anonymous enum |
#include <infuse/algorithm_runner/algorithms/demo.h>
Enumerator | |
---|---|
ALGORITHM_DEMO_EVENT_LOG | |
ALGORITHM_DEMO_STATE_LOG | |
ALGORITHM_DEMO_METRIC_LOG |
void algorithm_demo_event_fn | ( | const struct zbus_channel * | chan, |
const void * | config, | ||
void * | data ) |
#include <infuse/algorithm_runner/algorithms/demo.h>
Algorithm implementation, see algorithm_run_fn.
void algorithm_demo_metric_fn | ( | const struct zbus_channel * | chan, |
const void * | config, | ||
void * | data ) |
#include <infuse/algorithm_runner/algorithms/demo.h>
Algorithm implementation, see algorithm_run_fn.
void algorithm_demo_state_fn | ( | const struct zbus_channel * | chan, |
const void * | config, | ||
void * | data ) |
#include <infuse/algorithm_runner/algorithms/demo.h>
Algorithm implementation, see algorithm_run_fn.