summaryrefstree
path: root/vendor/etc/sensors/proto/sns_amd.proto
blob: 8583b82c339f6e6e9a7d28849f973d918f3ebec6 (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

// @file sns_amd.proto
//
// Defines message types for the Absolute Motion Detector (AMD) Sensor.
//
// 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";

// AMD calculates motion and stationary states. AMD will initially start in an
// unknown state, and later transition to motion or stationary.

// AMD Sensor Attribute Requirements:
// SNS_STD_SENSOR_ATTRID_TYPE: "amd"
// 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 AMD Sensor
enum sns_amd_msgid {
  option (nanopb_enumopt).long_names = false;

  SNS_AMD_MSGID_SNS_AMD_EVENT = 772;
}

enum sns_amd_event_type
{
  option (nanopb_enumopt).long_names = false;

  SNS_AMD_EVENT_TYPE_UNKNOWN          = 0;
  SNS_AMD_EVENT_TYPE_STATIONARY       = 1;
  SNS_AMD_EVENT_TYPE_MOTION           = 2;
}

message sns_amd_event
{
  // AMD motion state
  required sns_amd_event_type state = 1 [default = SNS_AMD_EVENT_TYPE_UNKNOWN];
}

// Stream events:
//
// The sns_amd_event message is used to publish updated state
//
// AMD does not publish configuration events.