nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches
sensor_event Struct Reference

Sensor event. More...

#include <sensor_event.h>

Data Fields

struct app_event_header header
 
const char * descr
 
struct event_dyndata dyndata
 

Detailed Description

Sensor event.

The sensor event is submitted when a sensor is sampled.

The description field is a pointer to a string that is used to identify the sensor by the application. The Common Application Framework does not impose any standard way of describing sensors. Format and content of the sensor description is defined by the application.

The dyndata contains sensor readouts represented as array of fixed-point values. Content of the array depends only on selected sensor. For example an accelerometer may report acceleration in X, Y and Z axis as three fixed-point values. sensor_event_get_data_cnt and sensor_event_get_data_ptr can be used to access the sensor data provided by a given sensor event.

Note
The sensor event related to the given sensor must use the same description as sensor_state_event related to the sensor.

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