// @file sns_heart_rate.proto // // Defines the API for Heart Rate Detection Sensors. // // Copyright (c) 2017-2018 Qualcomm Technologies, Inc. // All Rights Reserved. // Confidential and Proprietary - Qualcomm Technologies, Inc. syntax = "proto2"; import "nanopb.proto"; import "sns_std_sensor.proto"; // A sensor of this type returns the current heart rate in beats per minute // (BPM). Because this sensor is on-change, events must be generated when and // only when BPM or status have changed since the last event. // // Upon the first activation, unless the device is known to not be on the // body, the status field of the first event must be set to UNRELIABLE. // // ## Heart Rate sensor attributes: // SNS_STD_SENSOR_ATTRID_TYPE is "heart_rate" // // ## Request Message: SNS_STD_SENSOR_MSGID_SNS_STD_ON_CHANGE_CONFIG // No configuration is available for this sensor. // // ## Event Message: sns_std_sensor_event // Output of the Heart Rate sensor will be populated in sns_std_sensor_event. // // SNS_HEART_RATE_MSGID_SNS_HEART_RATE_EVENT::data[0] = current heart rate in beats per minute (BPM) // // SNS_HEART_RATE_MSGID_SNS_HEART_RATE_EVENT::status specifies the reliability of the sample value // value is of type sns_heart_rate_event_type. enum sns_heart_rate_msgid { option (nanopb_enumopt).long_names = false; SNS_HEART_RATE_MSGID_SNS_HEART_RATE_EVENT = 779; } enum sns_heart_rate_event_type { option (nanopb_enumopt).long_names = false; SNS_HR_STATUS_NO_CONTACT = -1; SNS_HR_STATUS_UNRELIABLE = 0; SNS_HR_STATUS_ACCURACY_LOW = 1; SNS_HR_STATUS_ACCURACY_MEDIUM = 2; SNS_HR_STATUS_ACCURACY_HIGH = 3; } // Events types from heart_rate Sensor message sns_heart_rate_event { required float heart_rate = 1; required sns_heart_rate_event_type heart_rate_event_type = 2 [default = SNS_HR_STATUS_NO_CONTACT]; }