blob: 66b5efd26786c4b90ac668ef00a3fdbcb0df8fff (
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
|
// @file sns_device_mode.proto
//
// Defines message types for the Device Mode 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";
// DEVICE_MODE determine the current mode of the device
// DEVICE_MODE Sensor Attribute Requirements:
// SNS_STD_SENSOR_ATTRID_TYPE: "device_mode"
// 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
// - Client must remove stream to disable the sensor
// Message IDs for DEVICE_MODE Sensor
enum sns_device_mode_msgid
{
option (nanopb_enumopt).long_names = false;
SNS_DEVICE_MODE_MSGID_SNS_DEVICE_MODE_EVENT = 772;
}
enum sns_device_mode
{
option (nanopb_enumopt).long_names = false;
SNS_DEVICE_MODE_UNKNOWN = 0;
SNS_DEVICE_MODE_FLIP_OPEN = 1;
}
enum sns_device_state
{
option (nanopb_enumopt).long_names = false;
SNS_DEVICE_STATE_INACTIVE = 0;
SNS_DEVICE_STATE_ACTIVE = 1;
}
message sns_device_mode_event
{
message mode_spec {
required sns_device_mode mode = 1;
required sns_device_state state = 2;
}
// Device Mode
repeated mode_spec device_mode = 1;
}
// Stream events:
//
// The sns_device_mode_event message is used to publish updated mode
//
// DEVICE_MODE does not publish configuration events.
|