MT2523 API Reference  LinkIt SDK v4
sensor_alg_interface.h
1 /* Copyright Statement:
2  *
3  * (C) 2005-2017 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_MOTION_DETECT (SENSOR_VIRTUAL_TYPE_START+13)
135 
136 #define SENSOR_TYPE_ELECTRIC_HEART_RATE_MONITOR (SENSOR_VIRTUAL_TYPE_START+14)
137 
138 #define SENSOR_TYPE_ALL (SENSOR_VIRTUAL_TYPE_START+15)
139 
225 typedef enum {
240 
242 typedef enum {
252 
254 typedef enum {
260 
262 typedef enum {
267 
269 typedef enum {
276 
286 typedef struct {
287  union {
288  int32_t v[3];
289  struct {
290  int32_t x;
291  int32_t y;
292  int32_t z;
293  };
294  struct {
295  int32_t azimuth;
296  int32_t pitch;
297  int32_t roll;
298  };
299  };
300  uint32_t status;
301  int32_t reserved[3];
302 } sensor_vec_t;
303 
305 typedef struct {
306  union {
307  int32_t uncali[3];
308  struct {
309  int32_t x_uncali;
310  int32_t y_uncali;
311  int32_t z_uncali;
312  };
313  };
314  union {
315  int32_t bias[3];
316  struct {
317  int32_t x_bias;
318  int32_t y_bias;
319  int32_t z_bias;
320  };
321  };
323 
325 typedef struct {
326  int32_t bpm;
327  int32_t status;
329 
331 typedef struct {
332  int32_t SDNN;
333  int32_t LF;
334  int32_t HF;
335  int32_t LF_HF;
336  int32_t bpm;
337  int32_t status;
338  int32_t *beatPos;
339  int32_t numBeatPos;
340  int32_t feature_type;
342 
344 typedef struct {
345  int32_t sbp;
346  int32_t dbp;
347  int32_t bpm;
348  int32_t status;
349  int32_t *pwtt;
350  int32_t numPwtt;
351  int32_t feature_type;
353 
355 typedef struct {
356  int32_t type;
357  uint32_t data;
358 } sensor_bio_t;
359 
361 typedef struct {
362  int32_t probability[SENSOR_ACTIVITY_MAX];
364 
366 typedef struct {
367  int32_t probability;
369 
371 typedef struct {
374  uint32_t step_frequency;
375  uint32_t step_length;
376  uint8_t step_type;
378 
380 typedef struct {
381  int32_t pressure;
382  int32_t temperature;
383  uint32_t status;
385 
387 typedef struct {
389  int32_t temperature;
390  uint32_t status;
392 
394 typedef struct {
395  int32_t state;
396  int32_t *feature;
397  int32_t feature_num;
398  int32_t feature_type;
400 
402 typedef struct {
403  int32_t probability[SENSOR_FALL_MAX];
404 } sensor_fall_t;
405 
407 typedef struct {
408  uint32_t sensor_type;
409  uint32_t time_stamp;
410  union {
411  union {
418  int32_t light;
419  int32_t distance;
437  int32_t value[16];
438  };
439  union {
440  uint64_t data[8];
441  uint64_t step_counter;
442  };
443  };
445 
447 typedef struct sensor_data {
449  uint32_t fifo_max_size;
450  uint32_t data_exist_count;
451 } sensor_data_t;
452 
454 typedef struct sensor_input_list {
455  uint32_t input_type;
456  uint32_t sampling_delay;
458  uint32_t timeout;
460 
476 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);
477 
481 typedef int32_t (*sensor_descriptor_get_result_callback_t)(sensor_data_t *const output);
482 
487 typedef int32_t (*sensor_descriptor_process_data_callback_t)(const sensor_data_t *input_list, void *reserved);
488 
498 typedef struct sensor_descriptor {
499  uint32_t sensor_type;
500  int32_t version;
501  int32_t report_mode;
506  int32_t accumulate;
508 
517 
522 int32_t sensor_fusion_algorithm_register_data_buffer(uint32_t sensor_type, uint32_t exist_data_count);
523 
527 int32_t sensor_fusion_algorithm_notify(uint32_t sensor_type);
528 
603 #define SENSOR_DEFAULT_DELAY (200)
604 
606 #define SENSOR_DELAY 0x01
607 
608 #define SENSOR_ENABLE 0x02
609 
610 #define SENSOR_GET_DATA 0x04
611 
612 #define SENSOR_CUST 0x08
613 
614 #define SENSOR_BATCH 0x10
615 
637 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,
638  void *buff_in, int32_t size_in);
648 typedef struct sensor_driver_object {
649  void *self;
650  int32_t polling;
653 
662 int32_t sensor_driver_attach(uint32_t sensor_type, sensor_driver_object_t *obj);
663 
735 typedef int32_t (*sensor_subscriber_send_digest_callback_t)(sensor_data_t *const output);
736 
742 #define SENSOR_MAX_SUBSCRIBER_NAME_LEN ( 8 )
743 
749 typedef struct sensor_subscriber {
751  int32_t handle;
752  uint32_t type;
753  uint32_t delay;
755  uint32_t timeout;
757 
764 int32_t sensor_manager_init(void);
765 
770 int32_t sensor_get_latest_sensor_data(uint32_t type, sensor_data_t *const output);
771 
775 int32_t sensor_subscribe_sensor(sensor_subscriber_t *subscriber);
776 
780 int32_t sensor_unsubscribe_sensor(int32_t handle);
781 
787 int sensor_manager_set_cust_from_app(uint32_t sensor_type, void *in_data_buf, int32_t in_size);
788 
793 #ifdef __cplusplus
794 }
795 #endif
796 
801 #endif /*__SENSOR_ALG_INTERFACE_H__*/
802 
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:335
int32_t z_uncali
Value of the Z-axis.
Definition: sensor_alg_interface.h:311
int32_t HF
ECG autonomic nervous system high frequency band.
Definition: sensor_alg_interface.h:334
This sensor is reporting data with low accuracy.
Definition: sensor_alg_interface.h:272
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:456
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:487
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:265
uint64_t step_counter
The number of steps taken.
Definition: sensor_alg_interface.h:441
int32_t relative_humidity
Relative humidity measurement.
Definition: sensor_alg_interface.h:388
sensor_uncalibrated_event_t uncalibrated_acc_t
Uncalibrated accelerometer sensor event data.
Definition: sensor_alg_interface.h:423
sensor_status_t
Measurement status of the sensor.
Definition: sensor_alg_interface.h:269
sensor_vec_t orientation_t
Orientation sensor event data.
Definition: sensor_alg_interface.h:415
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:319
int32_t status
Quality of the measurement, subject to fusion algorithm design.
Definition: sensor_alg_interface.h:337
uint32_t data
Biosensor data.
Definition: sensor_alg_interface.h:357
int32_t(* sensor_subscriber_send_digest_callback_t)(sensor_data_t *const output)
Sends sensor data to the subscriber.
Definition: sensor_alg_interface.h:735
Pedometer sensor event data.
Definition: sensor_alg_interface.h:371
int32_t * beatPos
The count of each heartbeat occurrence depending on the EKG sampling rate.
Definition: sensor_alg_interface.h:338
Fall detection sensor event data.
Definition: sensor_alg_interface.h:402
Falling.
Definition: sensor_alg_interface.h:256
int32_t * feature
Intermediate features for sleep monitor.
Definition: sensor_alg_interface.h:396
Stationary.
Definition: sensor_alg_interface.h:226
int32_t numPwtt
The total number of PWTT contained in the sequence.
Definition: sensor_alg_interface.h:350
No fall is detected.
Definition: sensor_alg_interface.h:255
int32_t y
Value of the Y-axis.
Definition: sensor_alg_interface.h:291
sensor_uncalibrated_event_t uncalibrated_gyro_t
Uncalibrated gyroscope sensor event data.
Definition: sensor_alg_interface.h:425
sensor_fall_type_t
The types of fall detection.
Definition: sensor_alg_interface.h:254
uint32_t type
The sensor type for the subscription.
Definition: sensor_alg_interface.h:752
int32_t bpm
Beats per minute.
Definition: sensor_alg_interface.h:326
Biosensor event data.
Definition: sensor_alg_interface.h:355
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:258
struct sensor_driver_object sensor_driver_object_t
The sensor driver object of a physical sensor.
In vehicle.
Definition: sensor_alg_interface.h:235
Relative humidity sensor event data.
Definition: sensor_alg_interface.h:387
int32_t status
Quality of the measurement, subject to fusion algorithm design.
Definition: sensor_alg_interface.h:327
Gesture of checking the time or a glance at the screen.
Definition: sensor_alg_interface.h:250
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:232
uint32_t input_type
Sensor type.
Definition: sensor_alg_interface.h:455
int32_t y_bias
Bias of the Y-axis.
Definition: sensor_alg_interface.h:318
sensor_activity_t activity_data_t
Activity recognition sensor event data.
Definition: sensor_alg_interface.h:433
The description for a virtual sensor (fusion algorithm) registration.
Definition: sensor_alg_interface.h:498
The subscriber information for the sensor event of the specified sensor.
Definition: sensor_alg_interface.h:749
sensor_descriptor_get_result_callback_t get_result
Call this function to get the fused results.
Definition: sensor_alg_interface.h:504
int32_t x
Value of the X-axis.
Definition: sensor_alg_interface.h:290
The sensor driver object of a physical sensor.
Definition: sensor_alg_interface.h:648
int32_t dbp
Diastolic blood pressure in mmHg.
Definition: sensor_alg_interface.h:346
int32_t x_uncali
Value of the X-axis.
Definition: sensor_alg_interface.h:309
Standing.
Definition: sensor_alg_interface.h:227
int32_t feature_type
An indicator to heart rate variability monitor output parameters.
Definition: sensor_alg_interface.h:340
This sensor cannot be trusted because the sensor had no contact with what it was measuring.
Definition: sensor_alg_interface.h:270
int32_t light
Light sensor event data.
Definition: sensor_alg_interface.h:418
Gesture of flipping the device.
Definition: sensor_alg_interface.h:247
uint32_t status
Quality of the measurement.
Definition: sensor_alg_interface.h:300
Gesture of picking up the device.
Definition: sensor_alg_interface.h:249
int32_t numBeatPos
The total number of the counts.
Definition: sensor_alg_interface.h:339
uint32_t accumulated_step_count
Accumulated step count.
Definition: sensor_alg_interface.h:372
sensor_fall_t fall_data_t
Fall detection sensor event data.
Definition: sensor_alg_interface.h:435
int32_t y_uncali
Value of the Y-axis.
Definition: sensor_alg_interface.h:310
No gesture is detected.
Definition: sensor_alg_interface.h:243
uint32_t timeout
The batch timeout in ms.
Definition: sensor_alg_interface.h:755
uint32_t step_length
Step length.
Definition: sensor_alg_interface.h:375
int32_t bpm
Heart rate measurement.
Definition: sensor_alg_interface.h:347
int32_t probability
Probability of gesture detection, the range is from 0 to 100.
Definition: sensor_alg_interface.h:367
uint32_t accumulated_step_length
Accumulated step length.
Definition: sensor_alg_interface.h:373
uint32_t time_stamp
Timestamp.
Definition: sensor_alg_interface.h:409
In motion.
Definition: sensor_alg_interface.h:230
Timstamped sensor event data.
Definition: sensor_alg_interface.h:407
sensor_activity_type_t
The types of activity recognition.
Definition: sensor_alg_interface.h:225
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:476
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:274
sensor_relative_humidity_vec_t relative_humidity_t
Relative humidity sensor event data.
Definition: sensor_alg_interface.h:421
On bicycle.
Definition: sensor_alg_interface.h:234
Heart rate sensor event data.
Definition: sensor_alg_interface.h:325
This sensor is reporting data with an average level of accuracy.
Definition: sensor_alg_interface.h:273
int32_t polling
Data acquisition via polling mode or interrupt driven.
Definition: sensor_alg_interface.h:650
Activity recognition sensor event data.
Definition: sensor_alg_interface.h:361
sensor_pressure_vec_t pressure_t
Pressure sensor event data.
Definition: sensor_alg_interface.h:420
Sensor event data over 3-axis.
Definition: sensor_alg_interface.h:286
The values returned by this sensor cannot be trusted.
Definition: sensor_alg_interface.h:271
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:263
uint32_t status
Status of the measurement.
Definition: sensor_alg_interface.h:383
Gesture of positioning the device to take a snapshot.
Definition: sensor_alg_interface.h:248
sensor_uncalibrated_event_t uncalibrated_mag_t
Uncalibrated magnetic field sensor event data.
Definition: sensor_alg_interface.h:424
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:637
sensor_data_unit_t * data
The link-listed timestamped sensor event data.
Definition: sensor_alg_interface.h:448
Climbing.
Definition: sensor_alg_interface.h:233
int32_t report_mode
Report mode.
Definition: sensor_alg_interface.h:501
int32_t type
Biosensor type.
Definition: sensor_alg_interface.h:356
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:754
Heart rate variability sensor event data.
Definition: sensor_alg_interface.h:331
int32_t distance
Proximity sensor event data.
Definition: sensor_alg_interface.h:419
Tilting, the vertical direction of the device changes by at least 35 degrees in the predefined period...
Definition: sensor_alg_interface.h:236
int32_t accumulate
Not used.
Definition: sensor_alg_interface.h:506
uint32_t status
Status of the measurement.
Definition: sensor_alg_interface.h:390
int32_t feature_type
An indicator to blood pressure monitor sensor output parameters.
Definition: sensor_alg_interface.h:351
int32_t handle
Handle of this subscription, filled in sensor_subscribe_sensor.
Definition: sensor_alg_interface.h:751
Sensor events are generated upon the detection.
Definition: sensor_alg_interface.h:264
sensor_vec_t gyroscope_t
Gyroscope sensor event data.
Definition: sensor_alg_interface.h:413
Sitting.
Definition: sensor_alg_interface.h:228
int32_t state
The detected state of a person&#39;s sleep, subject to fusion algorithm design.
Definition: sensor_alg_interface.h:395
int32_t temperature
Temperature measurement.
Definition: sensor_alg_interface.h:382
sensor_sleepmonitor_event_t sleep_data_t
Sleep monitor sensor event data.
Definition: sensor_alg_interface.h:432
uint32_t fifo_max_size
Not used.
Definition: sensor_alg_interface.h:449
int sensor_manager_set_cust_from_app(uint32_t sensor_type, void *in_data_buf, int32_t in_size)
This function sends the sensor event for a specified sensor type from application layer...
uint8_t step_type
Step type: 1 for walk, 2 for run, and 3 for jogging.
Definition: sensor_alg_interface.h:376
Laying.
Definition: sensor_alg_interface.h:229
int32_t x_bias
Bias of the X-axis.
Definition: sensor_alg_interface.h:317
int32_t pressure
Pressure measurement.
Definition: sensor_alg_interface.h:381
Blood pressure sensor event data.
Definition: sensor_alg_interface.h:344
sensor_vec_t pdr_event
PDR sensor event data.
Definition: sensor_alg_interface.h:416
The maximum number of activity types.
Definition: sensor_alg_interface.h:238
sensor_bio_t bio_data
Biosensor event data.
Definition: sensor_alg_interface.h:436
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:505
sensor_heart_rate_event_t heart_rate_t
Heart rate sensor event data.
Definition: sensor_alg_interface.h:428
int32_t version
Fusion algorithm API version.
Definition: sensor_alg_interface.h:500
Gesture detection sensor event data.
Definition: sensor_alg_interface.h:366
sensor_input_list_t * input_list
Required input sensor list.
Definition: sensor_alg_interface.h:502
int32_t feature_num
The number of intermediate features.
Definition: sensor_alg_interface.h:397
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:481
sensor_gesture_t gesture_data_t
Gesture detection sensor event data.
Definition: sensor_alg_interface.h:434
int32_t sbp
Systolic blood pressure in mmHg.
Definition: sensor_alg_interface.h:345
sensor_gesture_type_t
The types of gesture detection defined in the fusion algorithm design.
Definition: sensor_alg_interface.h:242
sensor_vec_t accelerometer_t
Accelerometer sensor event data.
Definition: sensor_alg_interface.h:412
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:245
uint32_t step_frequency
Step frequency.
Definition: sensor_alg_interface.h:374
uint32_t delay
The sampling interval for the sensor event.
Definition: sensor_alg_interface.h:753
A fall type that can be customized for a special fusion algorithm.
Definition: sensor_alg_interface.h:257
sensor_report_mode_t
Methods to generate events with sensors.
Definition: sensor_alg_interface.h:262
Uncalibrated sensor event data over 3-axis.
Definition: sensor_alg_interface.h:305
int32_t status
Quality of the measurement, subject to fusion algorithm design.
Definition: sensor_alg_interface.h:348
The required input physical sensor list to register the fusion algorithms.
Definition: sensor_alg_interface.h:454
sensor_heart_rate_variability_event_t heart_rate_variability_t
Heart rate sensor event data.
Definition: sensor_alg_interface.h:429
sensor_descriptor_operate_callback_t operate
To set customized parameter to fusion algorithms, such as step length for pedometer.
Definition: sensor_alg_interface.h:503
Walking.
Definition: sensor_alg_interface.h:231
Pressure sensor event data.
Definition: sensor_alg_interface.h:380
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:349
int32_t temperature
Temperature measurement.
Definition: sensor_alg_interface.h:389
int32_t feature_type
The intermediate feature type.
Definition: sensor_alg_interface.h:398
uint32_t data_exist_count
The count of sensor_data_unit_t in data.
Definition: sensor_alg_interface.h:450
#define SENSOR_MAX_SUBSCRIBER_NAME_LEN
The maximum sensor subscriber name length.
Definition: sensor_alg_interface.h:742
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:414
uint32_t sensor_type
Sensor type.
Definition: sensor_alg_interface.h:499
int32_t LF
ECG autonomic nervous system low frequency band.
Definition: sensor_alg_interface.h:333
Gesture of shaking the device up and down or left and right.
Definition: sensor_alg_interface.h:244
int32_t z
Value of the Z-axis.
Definition: sensor_alg_interface.h:292
struct sensor_input_list * next_input
The next data in the linked list.
Definition: sensor_alg_interface.h:457
int32_t azimuth
Rotation around the Z-axis.
Definition: sensor_alg_interface.h:295
sensor_pedometer_event_t pedometer_t
Pedometer sensor event data.
Definition: sensor_alg_interface.h:427
int32_t bpm
Heart rate measurement.
Definition: sensor_alg_interface.h:336
sensor_driver_object_operate_callback_t sensor_operate
Operates on this physical sensor.
Definition: sensor_alg_interface.h:651
Link-listed timestamped sensor event data.
Definition: sensor_alg_interface.h:447
sensor_blood_pressure_event_t blood_pressure_t
Blood pressure sensor event data.
Definition: sensor_alg_interface.h:430
uint32_t timeout
Sets the batch timeout in ms.
Definition: sensor_alg_interface.h:458
uint32_t sensor_type
Sensor type.
Definition: sensor_alg_interface.h:408
int32_t pitch
Rotation around the X-axis.
Definition: sensor_alg_interface.h:296
int32_t SDNN
Standard deviation of ECG normal to normal beat interval.
Definition: sensor_alg_interface.h:332
Sleep monitor sensor event data.
Definition: sensor_alg_interface.h:394
Unknown activity type.
Definition: sensor_alg_interface.h:237
int32_t roll
Rotation around the Y-axis.
Definition: sensor_alg_interface.h:297
Gesture of twisting the device attached to the wrist.
Definition: sensor_alg_interface.h:246