summaryrefstree
path: root/vendor/etc/sensors/proto/sns_activity_recognition.proto
blob: 63e1a02ca1a2bc00c9a5729013a34d739f48fb60 (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
57
58
59
60
61
62
63
64
65
66
67
68
69
// @file sns_activity_recognition.proto
//
// Defines message types for the Activity Recognition (AR) Sensor.
//
// Copyright (c) 2019-2020 Qualcomm Technologies, Inc.
// All Rights Reserved.
// Confidential and Proprietary - Qualcomm Technologies, Inc.

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

// Acitivity Recognition Sensor Attribute Requirements:
// SNS_STD_SENSOR_ATTRID_TYPE: "activity_recognition"
// 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 Acitivity Recognition Sensor
enum sns_activity_recognition_msgid {
  option (nanopb_enumopt).long_names = false;

  // The sns_ar_event message is used to publish updated state.  A new event
  // will be generated upon any state change.
  SNS_ACTIVITY_RECOGNITION_MSGID_SNS_AR_EVENT = 800;
  // Configuration event generated at least once in response to enable request
  SNS_ACTIVITY_RECOGNITION_MSGID_SNS_AR_CONFIG_EVENT = 801;
}

// User activity states
enum sns_ar_motion_state
{
  option (nanopb_enumopt).long_names = false;

  // UNKNOWN is reported when the algorithm is unable to detect the current
  // activity state.
  SNS_AR_UNKNOWN = 0;
  // User is relatively stationary.
  SNS_AR_STATIONARY = 1;
  // User is classified as a pedestrian
  SNS_AR_PED = 2;
  // User is in a non-motorized vehicle
  SNS_AR_NMV = 3;
  // User is in a motorized vehicle.
  SNS_AR_MV = 4;
  // User is walking
  SNS_AR_WALK = 5;
  // User is running
  SNS_AR_RUN = 6;
  // User is on a bicycle
  SNS_AR_BICYCLE = 7;
  // User is in a car
  SNS_AR_CAR = 8;
}

message sns_ar_config_event
{
  // List of supported motion states
  repeated sns_ar_motion_state states = 1;
}

message sns_ar_event
{
  // List of active states for this user
  // Multiple states may be reported concurrently
  // Any states not listed here are presumed to be inactive
  repeated sns_ar_motion_state states = 1 [(nanopb).max_count = 4];
}