SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
Loading...
Searching...
No Matches
SensorBMA423::EventCallbacks Struct Reference

Event callbacks for the sensor. More...

#include <SensorBMA423.hpp>

Public Attributes

std::function< void(TapType)> onTap = nullptr
 Callback for tap detection events.
 
std::function< void()> onStepDetected = nullptr
 Callback for step detection events.
 
std::function< void(uint32_t)> onStepCount = nullptr
 Callback for step count updates.
 
std::function< void(ActivityType)> onActivity = nullptr
 Callback for activity recognition events.
 
std::function< void()> onAnyMotion = nullptr
 Callback for any-motion detection.
 
std::function< void()> onNoMotion = nullptr
 Callback for no-motion detection.
 
std::function< void()> onTiltDetected = nullptr
 Callback for tilt detection.
 
std::function< void(AccelerometerData &)> onDataReady = nullptr
 Callback for new accelerometer data.
 

Detailed Description

Event callbacks for the sensor.

Note
This structure holds the callback functions for various sensor events. Each callback can be set individually and will be called when the corresponding event occurs.

Definition at line 129 of file sensor/accelerometer/bma/SensorBMA423.hpp.

Member Data Documentation

◆ onActivity

std::function<void(ActivityType)> SensorBMA423::EventCallbacks::onActivity = nullptr

Callback for activity recognition events.

Definition at line 133 of file sensor/accelerometer/bma/SensorBMA423.hpp.

Referenced by SensorBMA423::setOnActivityCallback(), and SensorBMA423::update().

◆ onAnyMotion

std::function<void()> SensorBMA423::EventCallbacks::onAnyMotion = nullptr

Callback for any-motion detection.

Definition at line 134 of file sensor/accelerometer/bma/SensorBMA423.hpp.

Referenced by SensorBMA423::setOnAnyMotionCallback(), and SensorBMA423::update().

◆ onDataReady

std::function<void(AccelerometerData &)> SensorBMA423::EventCallbacks::onDataReady = nullptr

Callback for new accelerometer data.

Definition at line 137 of file sensor/accelerometer/bma/SensorBMA423.hpp.

Referenced by SensorBMA423::setOnDataReadyCallback(), and SensorBMA423::update().

◆ onNoMotion

std::function<void()> SensorBMA423::EventCallbacks::onNoMotion = nullptr

Callback for no-motion detection.

Definition at line 135 of file sensor/accelerometer/bma/SensorBMA423.hpp.

Referenced by SensorBMA423::setOnNoMotionCallback(), and SensorBMA423::update().

◆ onStepCount

std::function<void(uint32_t)> SensorBMA423::EventCallbacks::onStepCount = nullptr

Callback for step count updates.

Definition at line 132 of file sensor/accelerometer/bma/SensorBMA423.hpp.

Referenced by SensorBMA423::setOnStepCountCallback(), and SensorBMA423::update().

◆ onStepDetected

std::function<void()> SensorBMA423::EventCallbacks::onStepDetected = nullptr

Callback for step detection events.

Definition at line 131 of file sensor/accelerometer/bma/SensorBMA423.hpp.

Referenced by SensorBMA423::setOnStepDetectedCallback(), and SensorBMA423::update().

◆ onTap

std::function<void(TapType)> SensorBMA423::EventCallbacks::onTap = nullptr

Callback for tap detection events.

Definition at line 130 of file sensor/accelerometer/bma/SensorBMA423.hpp.

Referenced by SensorBMA423::setOnTapCallback(), and SensorBMA423::update().

◆ onTiltDetected

std::function<void()> SensorBMA423::EventCallbacks::onTiltDetected = nullptr

Callback for tilt detection.

Definition at line 136 of file sensor/accelerometer/bma/SensorBMA423.hpp.

Referenced by SensorBMA423::setOnTiltDetectedCallback(), and SensorBMA423::update().


The documentation for this struct was generated from the following file: