proprietary_vendor_motorola.../proprietary/vendor/etc/sensors/proto/sns_device_mode.proto
Anand S f31fa38f1d
rhodep: Initial import of device specific blobs
* From rhodep_g-user 13 T1SUS33.1-124-6-14 a15be release-keys.

Change-Id: Ifc556fab4a2d0afba881d7edcfb7137113d62622
2025-04-05 15:30:48 +05:30

61 lines
1.4 KiB
Protocol Buffer

// @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.