Doly C++ SDK v1.00
Loading...
Searching...
No Matches
ImuEvent.h File Reference

Event registration helpers for the IMU subsystem. More...

#include "ImuEventListener.h"
#include <string>

Go to the source code of this file.

Namespaces

namespace  ImuEvent

Functions

void ImuEvent::AddListener (ImuEventListener *observer, bool priority=false)
 Register an ImuEventListener instance.
void ImuEvent::RemoveListener (ImuEventListener *observer)
 Unregister a previously registered ImuEventListener instance.
void ImuEvent::AddListenerUpdateEvent (void(*Imu_callback)(ImuData data))
 Register a static/free function to receive IMU update events.
void ImuEvent::RemoveListenerUpdateEvent (void(*Imu_callback)(ImuData data))
 Unregister a previously registered IMU update callback.
void ImuEvent::AddListenerGestureEvent (void(*gesture_cb)(ImuGesture type, GestureDirection from))
 Register a static/free function to receive gesture events.
void ImuEvent::RemoveListenerGestureEvent (void(*gesture_cb)(ImuGesture type, GestureDirection from))
 Unregister a previously registered gesture callback.
std::string ImuEvent::getGestureStr (ImuGesture type)
 Convert a gesture enum value to a human-readable string.
std::string ImuEvent::getDirectionStr (GestureDirection from)
 Convert a direction enum value to a human-readable string.

Detailed Description

Event registration helpers for the IMU subsystem.

Use this API to subscribe to IMU updates and gesture notifications. Two callback styles are supported:

  • Object listeners (ImuEventListener*)
  • Static/free function callbacks (function pointers)

Threading notes:

  • Callbacks may be invoked from an internal worker/event thread.