blob: d34368a514435f739645d10830abff0be7630992 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
// @file sns_ppg.proto
//
// Defines the API for PPG Sensors.
//
// Copyright (c) 2017-2018,2020 Qualcomm Technologies, Inc.
// All Rights Reserved.
// Confidential and Proprietary - Qualcomm Technologies, Inc.
syntax = "proto2";
import "nanopb.proto";
import "sns_std_sensor.proto";
import "sns_physical_sensor_test.proto";
// Attribute requirements:
// The PPG Sensor publishes:
// 1. SNS_STD_SENSOR_ATTRID_TYPE attribute value as "ppg".
// 2. SNS_STD_SENSOR_ATTRID_RATES attribute values in Hz.
// Handling stream requests:
// 1. The PPG Sensor handles the sns_std_sensor_config
// message request with msgid SNS_STD_SENSOR_MSGID_SNS_STD_SENSOR_CONFIG
// for all stream enable/update requests.
// SNS_STD_SENSOR_ATTRID_STREAM_TYPE: SNS_STD_SENSOR_STREAM_TYPE_STREAMING
// 2. The PPG Sensor uses batching_period item in
// sns_std_request as the requested batching rate to determine
// hardware FIFO watermark.
// Handling stream events:
// 1. The PPG Sensor publishes PPG data stream events
// using the sns_std_sensor_event message.
// 2. Each stream event contains three output data fields
// data[0] => PPG ch1
// data[1] => PPG ch2
// data[2] => PPG ch3
// data[3] => PPG ch4
// data[4] => TOUCH_FLAG. 128 if onbody detect, 0 otherwise
// data[5] => WEAR_INDEX. 1 if wear loose, 0 otherwise
// 3. Each stream event publishes an accuracy field:
// SNS_STD_SENSOR_SAMPLE_STATUS_UNRELIABLE to mark invalid samples when hardware is
// yet to stabilize after the sensor is configured.
// SNS_STD_SENSOR_SAMPLE_STATUS_ACCURACY_HIGH to mark samples when they are valid.
// 4. The PPG Sensor publishes a configuration event using the
// sns_std_sensor_physical_config_event message.
// It publishes this event each time there is change in hardware config of the sensor
// and contains current physical sensor config of the sensor.
|