MT2523 API Reference  LinkIt SDK v4
sensor_alg_interface.h
1 /* Copyright Statement:
2  *
3  * (C) 2005-2016 MediaTek Inc. All rights reserved.
4  *
5  * This software/firmware and related documentation ("MediaTek Software") are
6  * protected under relevant copyright laws. The information contained herein
7  * is confidential and proprietary to MediaTek Inc. ("MediaTek") and/or its licensors.
8  * Without the prior written permission of MediaTek and/or its licensors,
9  * any reproduction, modification, use or disclosure of MediaTek Software,
10  * and information contained herein, in whole or in part, shall be strictly prohibited.
11  * You may only use, reproduce, modify, or distribute (as applicable) MediaTek Software
12  * if you have agreed to and been bound by the applicable license agreement with
13  * MediaTek ("License Agreement") and been granted explicit permission to do so within
14  * the License Agreement ("Permitted User"). If you are not a Permitted User,
15  * please cease any access or use of MediaTek Software immediately.
16  * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
17  * THAT MEDIATEK SOFTWARE RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES
18  * ARE PROVIDED TO RECEIVER ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
19  * WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
20  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
21  * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
22  * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
23  * SUPPLIED WITH MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
24  * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
25  * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
26  * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
27  * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
28  * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
29  * CUMULATIVE LIABILITY WITH RESPECT TO MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
30  * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE MEDIATEK SOFTWARE AT ISSUE,
31  * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
32  * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
33  */
34 
35 #ifndef __SENSOR_ALG_INTERFACE_H__
36 #define __SENSOR_ALG_INTERFACE_H__
37 
62 #ifdef __cplusplus
63 extern "C" {
64 #endif
65 
66 #include <stdint.h>
67 #include <math.h>
68 
69 #if defined(__CC_ARM)
70  #pragma anon_unions
71 #elif defined(__ICCARM__)
72  #pragma language=extended
73 #elif defined(__GNUC__)
74 /* Anonymous unions are enabled by default. */
75 #endif
76 
78 #define SENSOR_TYPE_ACCELEROMETER (0)
79 
80 #define SENSOR_TYPE_MAGNETIC_FIELD (1)
81 
82 #define SENSOR_TYPE_PRESSURE (2)
83 
84 #define SENSOR_TYPE_GYROSCOPE (3)
85 
86 #define SENSOR_TYPE_PROXIMITY (4)
87 
88 #define SENSOR_TYPE_BIOSENSOR_EKG (5)
89 
90 #define SENSOR_TYPE_BIOSENSOR_EEG (6)
91 
92 #define SENSOR_TYPE_BIOSENSOR_EMG (7)
93 
94 #define SENSOR_TYPE_BIOSENSOR_GSR (8)
95 
96 #define SENSOR_TYPE_BIOSENSOR_PPG1 (9)
97 
98 #define SENSOR_TYPE_BIOSENSOR_PPG2 (10)
99 
100 #define SENSOR_TYPE_BIOSENSOR_BISI (11)
101 
102 #define SENSOR_TYPE_BIOSENSOR_PPG1_512HZ (12)
103 
104 #define SENSOR_PHYSICAL_TYPE_ALL (13)
105 
106 #define SENSOR_VIRTUAL_TYPE_START (13)
107 
108 #define SENSOR_TYPE_PEDOMETER (SENSOR_VIRTUAL_TYPE_START)
109 
110 #define SENSOR_TYPE_ACTIVITY (SENSOR_VIRTUAL_TYPE_START+1)
111 
112 #define SENSOR_TYPE_GESTURE_CHECK_TIME (SENSOR_VIRTUAL_TYPE_START+2)
113 
114 #define SENSOR_TYPE_GESTURE_TAP (SENSOR_VIRTUAL_TYPE_START+3)
115 
116 #define SENSOR_TYPE_GESTURE_SHAKE (SENSOR_VIRTUAL_TYPE_START+4)
117 
118 #define SENSOR_TYPE_GESTURE_TWIST (SENSOR_VIRTUAL_TYPE_START+5)
119 
120 #define SENSOR_TYPE_FALL (SENSOR_VIRTUAL_TYPE_START+6)
121 
122 #define SENSOR_TYPE_SLEEP (SENSOR_VIRTUAL_TYPE_START+7)
123 
124 #define SENSOR_TYPE_PDR (SENSOR_VIRTUAL_TYPE_START+8)
125 
126 #define SENSOR_TYPE_HEART_RATE_MONITOR (SENSOR_VIRTUAL_TYPE_START+9)
127 
128 #define SENSOR_TYPE_HEART_RATE_VARIABILITY_MONITOR (SENSOR_VIRTUAL_TYPE_START+10)
129 
130 #define SENSOR_TYPE_BLOOD_PRESSURE_MONITOR (SENSOR_VIRTUAL_TYPE_START+11)
131 
132 #define SENSOR_TYPE_SLEEP_STAGING (SENSOR_VIRTUAL_TYPE_START+12)
133 
134 #define SENSOR_TYPE_ALL (SENSOR_VIRTUAL_TYPE_START+13)
135 
222 typedef enum {
237 
239 typedef enum {
249 
251 typedef enum {
257 
259 typedef enum {
264 
266 typedef enum {
273 
283 typedef struct {
284  union {
285  int32_t v[3];
286  struct {
287  int32_t x;
288  int32_t y;
289  int32_t z;
290  };
291  struct {
292  int32_t azimuth;
293  int32_t pitch;
294  int32_t roll;
295  };
296  };
297  uint32_t status;
298  int32_t reserved[3];
299 } sensor_vec_t;
300 
302 typedef struct {
303  union {
304  int32_t uncali[3];
305  struct {
306  int32_t x_uncali;
307  int32_t y_uncali;
308  int32_t z_uncali;
309  };
310  };
311  union {
312  int32_t bias[3];
313  struct {
314  int32_t x_bias;
315  int32_t y_bias;
316  int32_t z_bias;
317  };
318  };
320 
322 typedef struct {
323  int32_t bpm;
324  int32_t status;
326 
328 typedef struct {
329  int32_t SDNN;
330  int32_t LF;
331  int32_t HF;
332  int32_t LF_HF;
333  int32_t bpm;
334  int32_t status;
335  int32_t *beatPos;
336  int32_t numBeatPos;
337  int32_t feature_type;
339 
341 typedef struct {
342  int32_t sbp;
343  int32_t dbp;
344  int32_t bpm;
345  int32_t status;
346  int32_t *pwtt;
347  int32_t numPwtt;
348  int32_t feature_type;
350 
352 typedef struct {
353  int32_t type;
354  uint32_t data;
355 } sensor_bio_t;
356 
358 typedef struct {
359  int32_t probability[SENSOR_ACTIVITY_MAX];
361 
363 typedef struct {
364  int32_t probability;
366 
368 typedef struct {
371  uint32_t step_frequency;
372  uint32_t step_length;
373  uint8_t step_type;
375 
377 typedef struct {
378  int32_t pressure;
379  int32_t temperature;
380  uint32_t status;
382 
384 typedef struct {
386  int32_t temperature;
387  uint32_t status;
389 
391 typedef struct {
392  int32_t state;
393  int32_t *feature;
394  int32_t feature_num;
395  int32_t feature_type;
397 
399 typedef struct {
400  int32_t probability[SENSOR_FALL_MAX];
401 } sensor_fall_t;
402 
404 typedef struct {
405  uint32_t sensor_type;
406  uint32_t time_stamp;
407  union {
408  union {
415  int32_t light;
416  int32_t distance;
434  int32_t value[16];
435  };
436  union {
437  uint64_t data[8];
438  uint64_t step_counter;
439  };
440  };
442 
444 typedef struct sensor_data {
446  uint32_t fifo_max_size;
447  uint32_t data_exist_count;
448 } sensor_data_t;
449 
451 typedef struct sensor_input_list {
452  uint32_t input_type;
453  uint32_t sampling_delay;
455  uint32_t timeout;
457 
473 typedef int32_t (*sensor_descriptor_operate_callback_t)(int32_t command, void *buffer_out, int32_t size_out, void *buffer_in, int32_t size_in);
474 
478 typedef int32_t (*sensor_descriptor_get_result_callback_t)(sensor_data_t *const output);
479 
484 typedef int32_t (*sensor_descriptor_process_data_callback_t)(const sensor_data_t *input_list, void *reserved);
485 
495 typedef struct sensor_descriptor {
496  uint32_t sensor_type;
497  int32_t version;
498  int32_t report_mode;
503  int32_t accumulate;
505 
514 
519 int32_t sensor_fusion_algorithm_register_data_buffer(uint32_t sensor_type, uint32_t exist_data_count);
520 
524 int32_t sensor_fusion_algorithm_notify(uint32_t sensor_type);
525 
600 #define SENSOR_DEFAULT_DELAY (200)
601 
603 #define SENSOR_DELAY 0x01
604 
605 #define SENSOR_ENABLE 0x02
606 
607 #define SENSOR_GET_DATA 0x04
608 
609 #define SENSOR_CUST 0x08
610 
611 #define SENSOR_BATCH 0x10
612 
634 typedef int32_t (*sensor_driver_object_operate_callback_t)(void *self, uint32_t command, void *buff_out, int32_t size_out, int32_t *actual_out,
635  void *buff_in, int32_t size_in);
645 typedef struct sensor_driver_object {
646  void *self;
647  int32_t polling;
650 
659 int32_t sensor_driver_attach(uint32_t sensor_type, sensor_driver_object_t *obj);
660 
732 typedef int32_t (*sensor_subscriber_send_digest_callback_t)(sensor_data_t *const output);
733 
739 #define SENSOR_MAX_SUBSCRIBER_NAME_LEN ( 8 )
740 
746 typedef struct sensor_subscriber {
748  int32_t handle;
749  uint32_t type;
750  uint32_t delay;
752  uint32_t timeout;
754 
761 int32_t sensor_manager_init(void);
762 
767 int32_t sensor_get_latest_sensor_data(uint32_t type, sensor_data_t *const output);
768 
772 int32_t sensor_subscribe_sensor(sensor_subscriber_t *subscriber);
773 
777 int32_t sensor_unsubscribe_sensor(int32_t handle);
778 
783 #ifdef __cplusplus
784 }
785 #endif
786 
791 #endif /*__SENSOR_ALG_INTERFACE_H__*/
792 
int32_t LF_HF
The balance of autonomic nervous system, represented by low frequency band to high frequency band rat...
Definition: sensor_alg_interface.h:332
int32_t z_uncali
Value of the Z-axis.
Definition: sensor_alg_interface.h:308
int32_t HF
ECG autonomic nervous system high frequency band.
Definition: sensor_alg_interface.h:331
This sensor is reporting data with low accuracy.
Definition: sensor_alg_interface.h:269
uint32_t sampling_delay
The sampling interval of the input data needs to be faster than this value, measured in milliseconds...
Definition: sensor_alg_interface.h:453
int32_t sensor_get_latest_sensor_data(uint32_t type, sensor_data_t *const output)
This function gets the latest data of the specified sensor type.
int32_t(* sensor_descriptor_process_data_callback_t)(const sensor_data_t *input_list, void *reserved)
Feeds input sensor data and trigger the fusion algorithm to execute.
Definition: sensor_alg_interface.h:484
struct sensor_input_list sensor_input_list_t
The required input physical sensor list to register the fusion algorithms.
Sensor events are generated at a constant rate.
Definition: sensor_alg_interface.h:262
uint64_t step_counter
The number of steps taken.
Definition: sensor_alg_interface.h:438
int32_t relative_humidity
Relative humidity measurement.
Definition: sensor_alg_interface.h:385
sensor_uncalibrated_event_t uncalibrated_acc_t
Uncalibrated accelerometer sensor event data.
Definition: sensor_alg_interface.h:420
sensor_status_t
Measurement status of the sensor.
Definition: sensor_alg_interface.h:266
sensor_vec_t orientation_t
Orientation sensor event data.
Definition: sensor_alg_interface.h:412
struct sensor_descriptor sensor_descriptor_t
The description for a virtual sensor (fusion algorithm) registration.
int32_t z_bias
Bias of the Z-axis.
Definition: sensor_alg_interface.h:316
int32_t status
Quality of the measurement, subject to fusion algorithm design.
Definition: sensor_alg_interface.h:334
uint32_t data
Biosensor data.
Definition: sensor_alg_interface.h:354
int32_t(* sensor_subscriber_send_digest_callback_t)(sensor_data_t *const output)
Sends sensor data to the subscriber.
Definition: sensor_alg_interface.h:732
Pedometer sensor event data.
Definition: sensor_alg_interface.h:368
int32_t * beatPos
The count of each heartbeat occurrence depending on the EKG sampling rate.
Definition: sensor_alg_interface.h:335
Fall detection sensor event data.
Definition: sensor_alg_interface.h:399
Falling.
Definition: sensor_alg_interface.h:253
int32_t * feature
Intermediate features for sleep monitor.
Definition: sensor_alg_interface.h:393
Stationary.
Definition: sensor_alg_interface.h:223
int32_t numPwtt
The total number of PWTT contained in the sequence.
Definition: sensor_alg_interface.h:347
No fall is detected.
Definition: sensor_alg_interface.h:252
int32_t y
Value of the Y-axis.
Definition: sensor_alg_interface.h:288
sensor_uncalibrated_event_t uncalibrated_gyro_t
Uncalibrated gyroscope sensor event data.
Definition: sensor_alg_interface.h:422
sensor_fall_type_t
The types of fall detection.
Definition: sensor_alg_interface.h:251
uint32_t type
The sensor type for the subscription.
Definition: sensor_alg_interface.h:749
int32_t bpm
Beats per minute.
Definition: sensor_alg_interface.h:323
Biosensor event data.
Definition: sensor_alg_interface.h:352
int32_t sensor_subscribe_sensor(sensor_subscriber_t *subscriber)
This function subscribes the sensor event for a specified sensor type.
The maximum number of fall types.
Definition: sensor_alg_interface.h:255
struct sensor_driver_object sensor_driver_object_t
The sensor driver object of a physical sensor.
In vehicle.
Definition: sensor_alg_interface.h:232
Relative humidity sensor event data.
Definition: sensor_alg_interface.h:384
int32_t status
Quality of the measurement, subject to fusion algorithm design.
Definition: sensor_alg_interface.h:324
Gesture of checking the time or a glance at the screen.
Definition: sensor_alg_interface.h:247
int32_t sensor_manager_init(void)
This function initializes the data structures in sensor manager.
int32_t sensor_fusion_algorithm_notify(uint32_t sensor_type)
For fusion algorithm to notify sensor manager of sensor event.
Running.
Definition: sensor_alg_interface.h:229
uint32_t input_type
Sensor type.
Definition: sensor_alg_interface.h:452
int32_t y_bias
Bias of the Y-axis.
Definition: sensor_alg_interface.h:315
sensor_activity_t activity_data_t
Activity recognition sensor event data.
Definition: sensor_alg_interface.h:430
The description for a virtual sensor (fusion algorithm) registration.
Definition: sensor_alg_interface.h:495
The subscriber information for the sensor event of the specified sensor.
Definition: sensor_alg_interface.h:746
sensor_descriptor_get_result_callback_t get_result
Call this function to get the fused results.
Definition: sensor_alg_interface.h:501
int32_t x
Value of the X-axis.
Definition: sensor_alg_interface.h:287
The sensor driver object of a physical sensor.
Definition: sensor_alg_interface.h:645
int32_t dbp
Diastolic blood pressure in mmHg.
Definition: sensor_alg_interface.h:343
int32_t x_uncali
Value of the X-axis.
Definition: sensor_alg_interface.h:306
Standing.
Definition: sensor_alg_interface.h:224
int32_t feature_type
An indicator to heart rate variability monitor output parameters.
Definition: sensor_alg_interface.h:337
This sensor cannot be trusted because the sensor had no contact with what it was measuring.
Definition: sensor_alg_interface.h:267
int32_t light
Light sensor event data.
Definition: sensor_alg_interface.h:415
Gesture of flipping the device.
Definition: sensor_alg_interface.h:244
uint32_t status
Quality of the measurement.
Definition: sensor_alg_interface.h:297
Gesture of picking up the device.
Definition: sensor_alg_interface.h:246
int32_t numBeatPos
The total number of the counts.
Definition: sensor_alg_interface.h:336
uint32_t accumulated_step_count
Accumulated step count.
Definition: sensor_alg_interface.h:369
sensor_fall_t fall_data_t
Fall detection sensor event data.
Definition: sensor_alg_interface.h:432
int32_t y_uncali
Value of the Y-axis.
Definition: sensor_alg_interface.h:307
No gesture is detected.
Definition: sensor_alg_interface.h:240
uint32_t timeout
The batch timeout in ms.
Definition: sensor_alg_interface.h:752
uint32_t step_length
Step length.
Definition: sensor_alg_interface.h:372
int32_t bpm
Heart rate measurement.
Definition: sensor_alg_interface.h:344
int32_t probability
Probability of gesture detection, the range is from 0 to 100.
Definition: sensor_alg_interface.h:364
uint32_t accumulated_step_length
Accumulated step length.
Definition: sensor_alg_interface.h:370
uint32_t time_stamp
Timestamp.
Definition: sensor_alg_interface.h:406
In motion.
Definition: sensor_alg_interface.h:227
Timstamped sensor event data.
Definition: sensor_alg_interface.h:404
sensor_activity_type_t
The types of activity recognition.
Definition: sensor_alg_interface.h:222
int32_t(* sensor_descriptor_operate_callback_t)(int32_t command, void *buffer_out, int32_t size_out, void *buffer_in, int32_t size_in)
Sets customized parameters in the sensor_descriptor structure.
Definition: sensor_alg_interface.h:473
struct sensor_subscriber sensor_subscriber_t
The subscriber information for the sensor event of the specified sensor.
This sensor is reporting data with maximum accuracy.
Definition: sensor_alg_interface.h:271
sensor_relative_humidity_vec_t relative_humidity_t
Relative humidity sensor event data.
Definition: sensor_alg_interface.h:418
On bicycle.
Definition: sensor_alg_interface.h:231
Heart rate sensor event data.
Definition: sensor_alg_interface.h:322
This sensor is reporting data with an average level of accuracy.
Definition: sensor_alg_interface.h:270
int32_t polling
Data acquisition via polling mode or interrupt driven.
Definition: sensor_alg_interface.h:647
Activity recognition sensor event data.
Definition: sensor_alg_interface.h:358
sensor_pressure_vec_t pressure_t
Pressure sensor event data.
Definition: sensor_alg_interface.h:417
Sensor event data over 3-axis.
Definition: sensor_alg_interface.h:283
The values returned by this sensor cannot be trusted.
Definition: sensor_alg_interface.h:268
int32_t sensor_unsubscribe_sensor(int32_t handle)
This function unsubscribes the sensor event for a specified sensor type.
Sensor events are generated only if the measured values are changed.
Definition: sensor_alg_interface.h:260
uint32_t status
Status of the measurement.
Definition: sensor_alg_interface.h:380
Gesture of positioning the device to take a snapshot.
Definition: sensor_alg_interface.h:245
sensor_uncalibrated_event_t uncalibrated_mag_t
Uncalibrated magnetic field sensor event data.
Definition: sensor_alg_interface.h:421
int32_t(* sensor_driver_object_operate_callback_t)(void *self, uint32_t command, void *buff_out, int32_t size_out, int32_t *actual_out, void *buff_in, int32_t size_in)
Operates on the physical sensor.
Definition: sensor_alg_interface.h:634
sensor_data_unit_t * data
The link-listed timestamped sensor event data.
Definition: sensor_alg_interface.h:445
Climbing.
Definition: sensor_alg_interface.h:230
int32_t report_mode
Report mode.
Definition: sensor_alg_interface.h:498
int32_t type
Biosensor type.
Definition: sensor_alg_interface.h:353
struct sensor_data sensor_data_t
Link-listed timestamped sensor event data.
sensor_subscriber_send_digest_callback_t send_digest
To notify a sensor event to this subscriber.
Definition: sensor_alg_interface.h:751
Heart rate variability sensor event data.
Definition: sensor_alg_interface.h:328
int32_t distance
Proximity sensor event data.
Definition: sensor_alg_interface.h:416
Tilting, the vertical direction of the device changes by at least 35 degrees in the predefined period...
Definition: sensor_alg_interface.h:233
int32_t accumulate
Not used.
Definition: sensor_alg_interface.h:503
uint32_t status
Status of the measurement.
Definition: sensor_alg_interface.h:387
int32_t feature_type
An indicator to blood pressure monitor sensor output parameters.
Definition: sensor_alg_interface.h:348
int32_t handle
Handle of this subscription, filled in sensor_subscribe_sensor.
Definition: sensor_alg_interface.h:748
Sensor events are generated upon the detection.
Definition: sensor_alg_interface.h:261
sensor_vec_t gyroscope_t
Gyroscope sensor event data.
Definition: sensor_alg_interface.h:410
Sitting.
Definition: sensor_alg_interface.h:225
int32_t state
The detected state of a person&#39;s sleep, subject to fusion algorithm design.
Definition: sensor_alg_interface.h:392
int32_t temperature
Temperature measurement.
Definition: sensor_alg_interface.h:379
sensor_sleepmonitor_event_t sleep_data_t
Sleep monitor sensor event data.
Definition: sensor_alg_interface.h:429
uint32_t fifo_max_size
Not used.
Definition: sensor_alg_interface.h:446
uint8_t step_type
Step type: 1 for walk, 2 for run, and 3 for jogging.
Definition: sensor_alg_interface.h:373
Laying.
Definition: sensor_alg_interface.h:226
int32_t x_bias
Bias of the X-axis.
Definition: sensor_alg_interface.h:314
int32_t pressure
Pressure measurement.
Definition: sensor_alg_interface.h:378
Blood pressure sensor event data.
Definition: sensor_alg_interface.h:341
sensor_vec_t pdr_event
PDR sensor event data.
Definition: sensor_alg_interface.h:413
The maximum number of activity types.
Definition: sensor_alg_interface.h:235
sensor_bio_t bio_data
Biosensor event data.
Definition: sensor_alg_interface.h:433
sensor_descriptor_process_data_callback_t process_data
Call this function if one of the input sensors of the fusion algorithm has updated data to be used fo...
Definition: sensor_alg_interface.h:502
sensor_heart_rate_event_t heart_rate_t
Heart rate sensor event data.
Definition: sensor_alg_interface.h:425
int32_t version
Fusion algorithm API version.
Definition: sensor_alg_interface.h:497
Gesture detection sensor event data.
Definition: sensor_alg_interface.h:363
sensor_input_list_t * input_list
Required input sensor list.
Definition: sensor_alg_interface.h:499
int32_t feature_num
The number of intermediate features.
Definition: sensor_alg_interface.h:394
int32_t(* sensor_descriptor_get_result_callback_t)(sensor_data_t *const output)
Gets the fusion algorithm results of the sensor event.
Definition: sensor_alg_interface.h:478
sensor_gesture_t gesture_data_t
Gesture detection sensor event data.
Definition: sensor_alg_interface.h:431
int32_t sbp
Systolic blood pressure in mmHg.
Definition: sensor_alg_interface.h:342
sensor_gesture_type_t
The types of gesture detection defined in the fusion algorithm design.
Definition: sensor_alg_interface.h:239
sensor_vec_t accelerometer_t
Accelerometer sensor event data.
Definition: sensor_alg_interface.h:409
int32_t sensor_fusion_algorithm_register_type(const sensor_descriptor_t *desp)
Registers fusion algorithm of the specified sensor_descriptor.
Gesture of tapping the screen.
Definition: sensor_alg_interface.h:242
uint32_t step_frequency
Step frequency.
Definition: sensor_alg_interface.h:371
uint32_t delay
The sampling interval for the sensor event.
Definition: sensor_alg_interface.h:750
A fall type that can be customized for a special fusion algorithm.
Definition: sensor_alg_interface.h:254
sensor_report_mode_t
Methods to generate events with sensors.
Definition: sensor_alg_interface.h:259
Uncalibrated sensor event data over 3-axis.
Definition: sensor_alg_interface.h:302
int32_t status
Quality of the measurement, subject to fusion algorithm design.
Definition: sensor_alg_interface.h:345
The required input physical sensor list to register the fusion algorithms.
Definition: sensor_alg_interface.h:451
sensor_heart_rate_variability_event_t heart_rate_variability_t
Heart rate sensor event data.
Definition: sensor_alg_interface.h:426
sensor_descriptor_operate_callback_t operate
To set customized parameter to fusion algorithms, such as step length for pedometer.
Definition: sensor_alg_interface.h:500
Walking.
Definition: sensor_alg_interface.h:228
Pressure sensor event data.
Definition: sensor_alg_interface.h:377
int32_t * pwtt
The sequence of each Pulse Wave Transit Time (PWTT) interval between ECG and PPG in sampling rate uni...
Definition: sensor_alg_interface.h:346
int32_t temperature
Temperature measurement.
Definition: sensor_alg_interface.h:386
int32_t feature_type
The intermediate feature type.
Definition: sensor_alg_interface.h:395
uint32_t data_exist_count
The count of sensor_data_unit_t in data.
Definition: sensor_alg_interface.h:447
#define SENSOR_MAX_SUBSCRIBER_NAME_LEN
The maximum sensor subscriber name length.
Definition: sensor_alg_interface.h:739
int32_t sensor_fusion_algorithm_register_data_buffer(uint32_t sensor_type, uint32_t exist_data_count)
Registers the required data buffer of fusion algorithm of the specified sensor type.
int32_t sensor_driver_attach(uint32_t sensor_type, sensor_driver_object_t *obj)
Registers the physical sensor driver.
sensor_vec_t magnetic_t
Magnetic field sensor event data.
Definition: sensor_alg_interface.h:411
uint32_t sensor_type
Sensor type.
Definition: sensor_alg_interface.h:496
int32_t LF
ECG autonomic nervous system low frequency band.
Definition: sensor_alg_interface.h:330
Gesture of shaking the device up and down or left and right.
Definition: sensor_alg_interface.h:241
int32_t z
Value of the Z-axis.
Definition: sensor_alg_interface.h:289
struct sensor_input_list * next_input
The next data in the linked list.
Definition: sensor_alg_interface.h:454
int32_t azimuth
Rotation around the Z-axis.
Definition: sensor_alg_interface.h:292
sensor_pedometer_event_t pedometer_t
Pedometer sensor event data.
Definition: sensor_alg_interface.h:424
int32_t bpm
Heart rate measurement.
Definition: sensor_alg_interface.h:333
sensor_driver_object_operate_callback_t sensor_operate
Operates on this physical sensor.
Definition: sensor_alg_interface.h:648
Link-listed timestamped sensor event data.
Definition: sensor_alg_interface.h:444
sensor_blood_pressure_event_t blood_pressure_t
Blood pressure sensor event data.
Definition: sensor_alg_interface.h:427
uint32_t timeout
Sets the batch timeout in ms.
Definition: sensor_alg_interface.h:455
uint32_t sensor_type
Sensor type.
Definition: sensor_alg_interface.h:405
int32_t pitch
Rotation around the X-axis.
Definition: sensor_alg_interface.h:293
int32_t SDNN
Standard deviation of ECG normal to normal beat interval.
Definition: sensor_alg_interface.h:329
Sleep monitor sensor event data.
Definition: sensor_alg_interface.h:391
Unknown activity type.
Definition: sensor_alg_interface.h:234
int32_t roll
Rotation around the Y-axis.
Definition: sensor_alg_interface.h:294
Gesture of twisting the device attached to the wrist.
Definition: sensor_alg_interface.h:243