summaryrefstree
path: root/vendor/etc/sensors/proto/sns_pedometer.proto
blob: 4b1e1b102161386f5a4539a4d4c1608e38cc2b03 (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
47
48
49
50
51
52
53
54
55
56
// @file sns_pedometer.proto
//
// Defines message types for the Pedometer Sensor.
//
// Copyright (c) 2017-2019 Qualcomm Technologies, Inc.
// All Rights Reserved.
// Confidential and Proprietary - Qualcomm Technologies, Inc.

syntax = "proto2";
import "nanopb.proto";
import "sns_std_sensor.proto";

// The Pedometer Sensor detects steps taken by the user
//
// The Pedometer step event includes the latest step count accumulated since 
// activation.
// All clients to Pedometer get the same step event.
// The timestamp of the event indicates the time of the latest detected step.

// Pedometer Sensor Attribute Requirements:
// SNS_STD_SENSOR_ATTRID_TYPE: "pedometer"
// SNS_STD_SENSOR_ATTRID_STREAM_TYPE: SNS_STD_SENSOR_STREAM_TYPE_ON_CHANGE

// Stream Requests:
// - SNS_STD_SENSOR_MSGID_SNS_STD_ON_CHANGE_CONFIG is used to enable the sensor

// Message IDs for Pedometer Sensor
enum sns_pedometer_msgid {
  option (nanopb_enumopt).long_names = false;

  SNS_PEDOMETER_MSGID_SNS_STEP_EVENT = 1028;

  SNS_PEDOMETER_MSGID_SNS_STEP_EVENT_CONFIG = 775;
}

// Events types from Pedometer Sensor
message sns_step_event
{
  //an incrementing step count
  required uint32 step_count = 1;
}

message sns_step_event_config
{
  //current step count
  required uint32 step_count = 1;
}


// Stream events:
//
// The sns_step_event message is used to publish updated step count
//
// The sns_step_event_config message is used to publish current step count
// to the client