summaryrefstree
path: root/vendor/etc/sensors/proto/sns_rmd.proto
blob: 052aeee4a21900ae54363a38b6b5923914ee3b27 (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_rmd.proto
//
// Defines message types for the Absolute Motion Detector (RMD) 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";

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

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

  SNS_RMD_MSGID_SNS_RMD_EVENT = 772;
}

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

  SNS_RMD_EVENT_TYPE_UNKNOWN          = 0;
  SNS_RMD_EVENT_TYPE_STATIONARY       = 1;
  SNS_RMD_EVENT_TYPE_MOTION           = 2;
}

message sns_rmd_event
{
  // RMD motion state
  required sns_rmd_event_type state = 1 [default = SNS_RMD_EVENT_TYPE_UNKNOWN];
}

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