device/valio/motion_sensor.h header reference
[Valio device attributes module]

The source code of this header can be browsed online.

Description [link] 

Value IO interface definition for motion sensors

Members [link] 

Types [link] 

Members detail [link] 

#define LIBDEVICE_VALIO_MOTION_SENSOR_H_ [link] 

This macro is declared in device/valio/motion_sensor.h source file, line 28.

enum valio_ms_att_e [link] 

This enum is declared in device/valio/motion_sensor.h source file, line 33.

IdentifierDescription
VALIO_MS_STATEA struct valio_ms_state_s with current gravity vector, instant rotation and magnetic measurements. Read or Wait event based on a defined status.
VALIO_MS_CALIBA struct valio_ms_data with all possible values. Set offset registers.
VALIO_MS_CONFIGA struct struct valio_ms_config_s. Read or Write.

enum valio_ms_axis_e [link] 

This enum is declared in device/valio/motion_sensor.h source file, line 51.

Defined axis for a motion sensor unit. Not all devices are required to support all axis.

IdentifierDescription
VALIO_MS_ACCEL_X
VALIO_MS_ACCEL_Y
VALIO_MS_ACCEL_Z
VALIO_MS_GYRO_X
VALIO_MS_GYRO_Y
VALIO_MS_GYRO_Z
VALIO_MS_COMPASS_X
VALIO_MS_COMPASS_Y
VALIO_MS_COMPASS_Z
VALIO_MS_AXIS_COUNT

struct valio_ms_config_s [link] 

This struct is declared in device/valio/motion_sensor.h source file, line 86.

FieldDescription
uint16_t period;Main data streaming period, in ms.
uint16_t threshold;Accelerometer threshold, in mG, over/under which device decide it is active/inactive.
uint16_t sleep_time;Minimum time in ms to stay with changes in acceleration less than threshold in order to be declared inactive. This is a best case timing. Inactivity should not be declared before this time.
uint16_t wakeup_time;Maximum time in ms to run with changes in acceleration values over threshold in order to be declared active. This is a worst case timing. Active mode could be declared before that.

struct valio_ms_data_s [link] 

This struct is declared in device/valio/motion_sensor.h source file, line 73.

For an object lying still, in its natural orientation, nominal terrestrial gravity is -1g along Z axis.

Acceleration values are in mG (1e-3 g). Rotation values are in 1/64 dps (2^-6 degrees per second). Magnetic sensing values are in µT (1e-6 Tesla)

FieldDescription
int16_t axis[VALIO_MS_AXIS_COUNT];

struct valio_ms_state_s [link] 

This struct is declared in device/valio/motion_sensor.h source file, line 78.

FieldDescription
struct valio_ms_data_s data;
bool_t active;Whether device is currently considered active (see config).
Valid XHTML 1.0 StrictGenerated by diaxen on Thu Aug 4 15:44:06 2022 using MkDoc