Compare commits
15 Commits
a742b550b5
...
lineage-23
| Author | SHA1 | Date | |
|---|---|---|---|
| a7021790d6 | |||
| 9722be0606 | |||
| b08964e5e0 | |||
| 5c62908f51 | |||
| 7dcfe04dce | |||
|
|
8d0083f8dc | ||
|
|
9a071ca7ed | ||
|
|
98ebf1338e | ||
|
|
079c8ae32a | ||
|
|
28480e18ea | ||
|
|
eaae7fcf60 | ||
|
|
0dc0f4a444 | ||
|
|
b5c27d0ca9 | ||
|
|
f1c7cf9fc3 | ||
|
|
1d1714f303 |
6953
Android.bp
6953
Android.bp
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,5 @@
|
||||
#
|
||||
# Automatically generated file. DO NOT MODIFY
|
||||
#
|
||||
# This file is generated by device/xiaomi/umi/setup-makefiles.sh
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
ifeq ($(TARGET_DEVICE),umi)
|
||||
|
||||
endif
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#
|
||||
# Automatically generated file. DO NOT MODIFY
|
||||
#
|
||||
# This file is generated by device/xiaomi/umi/setup-makefiles.sh
|
||||
|
||||
|
||||
0
proprietary/vendor/bin/batterysecret
vendored
Executable file → Normal file
0
proprietary/vendor/bin/batterysecret
vendored
Executable file → Normal file
0
proprietary/vendor/bin/hvdcp_opti
vendored
Executable file → Normal file
0
proprietary/vendor/bin/hvdcp_opti
vendored
Executable file → Normal file
0
proprietary/vendor/bin/init.qcom.sensors.sh
vendored
Executable file → Normal file
0
proprietary/vendor/bin/init.qcom.sensors.sh
vendored
Executable file → Normal file
0
proprietary/vendor/bin/init.qti.chg_policy.sh
vendored
Executable file → Normal file
0
proprietary/vendor/bin/init.qti.chg_policy.sh
vendored
Executable file → Normal file
0
proprietary/vendor/bin/sensors.qti
vendored
Executable file → Normal file
0
proprietary/vendor/bin/sensors.qti
vendored
Executable file → Normal file
0
proprietary/vendor/bin/sscrpcd
vendored
Executable file → Normal file
0
proprietary/vendor/bin/sscrpcd
vendored
Executable file → Normal file
@@ -12,7 +12,6 @@ service batterysecret /vendor/bin/batterysecret
|
||||
user root
|
||||
group system system wakelock
|
||||
disabled
|
||||
seclabel u:r:batterysecret:s0
|
||||
|
||||
on property:sys.boot_completed=1
|
||||
start batterysecret
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!---
|
||||
Copyright (c) 2017 Qualcomm Technologies, Inc.
|
||||
All Rights Reserved.
|
||||
Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
-->
|
||||
<permissions>
|
||||
<library name="vendor.qti.hardware.sensorscalibrate-V1.0"
|
||||
file="/system/framework/vendor.qti.hardware.sensorscalibrate-V1.0-java.jar"/>
|
||||
</permissions>
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
3
proprietary/vendor/etc/sensors/hals.conf
vendored
3
proprietary/vendor/etc/sensors/hals.conf
vendored
@@ -1,3 +0,0 @@
|
||||
sensors.elliptic.so
|
||||
sensors.ssc.so
|
||||
sensors.touch.so
|
||||
@@ -1,885 +0,0 @@
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
// https://developers.google.com/protocol-buffers/
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Author: kenton@google.com (Kenton Varda)
|
||||
// Based on original Protocol Buffers design by
|
||||
// Sanjay Ghemawat, Jeff Dean, and others.
|
||||
//
|
||||
// The messages in this file describe the definitions found in .proto files.
|
||||
// A valid .proto file can be translated directly to a FileDescriptorProto
|
||||
// without any other information (e.g. without reading its imports).
|
||||
|
||||
|
||||
syntax = "proto2";
|
||||
|
||||
package google.protobuf;
|
||||
|
||||
option go_package = "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor";
|
||||
option java_package = "com.google.protobuf";
|
||||
option java_outer_classname = "DescriptorProtos";
|
||||
option csharp_namespace = "Google.Protobuf.Reflection";
|
||||
option objc_class_prefix = "GPB";
|
||||
option cc_enable_arenas = true;
|
||||
|
||||
// descriptor.proto must be optimized for speed because reflection-based
|
||||
// algorithms don't work during bootstrapping.
|
||||
option optimize_for = SPEED;
|
||||
|
||||
// The protocol compiler can output a FileDescriptorSet containing the .proto
|
||||
// files it parses.
|
||||
message FileDescriptorSet {
|
||||
repeated FileDescriptorProto file = 1;
|
||||
}
|
||||
|
||||
// Describes a complete .proto file.
|
||||
message FileDescriptorProto {
|
||||
optional string name = 1; // file name, relative to root of source tree
|
||||
optional string package = 2; // e.g. "foo", "foo.bar", etc.
|
||||
|
||||
// Names of files imported by this file.
|
||||
repeated string dependency = 3;
|
||||
// Indexes of the public imported files in the dependency list above.
|
||||
repeated int32 public_dependency = 10;
|
||||
// Indexes of the weak imported files in the dependency list.
|
||||
// For Google-internal migration only. Do not use.
|
||||
repeated int32 weak_dependency = 11;
|
||||
|
||||
// All top-level definitions in this file.
|
||||
repeated DescriptorProto message_type = 4;
|
||||
repeated EnumDescriptorProto enum_type = 5;
|
||||
repeated ServiceDescriptorProto service = 6;
|
||||
repeated FieldDescriptorProto extension = 7;
|
||||
|
||||
optional FileOptions options = 8;
|
||||
|
||||
// This field contains optional information about the original source code.
|
||||
// You may safely remove this entire field without harming runtime
|
||||
// functionality of the descriptors -- the information is needed only by
|
||||
// development tools.
|
||||
optional SourceCodeInfo source_code_info = 9;
|
||||
|
||||
// The syntax of the proto file.
|
||||
// The supported values are "proto2" and "proto3".
|
||||
optional string syntax = 12;
|
||||
}
|
||||
|
||||
// Describes a message type.
|
||||
message DescriptorProto {
|
||||
optional string name = 1;
|
||||
|
||||
repeated FieldDescriptorProto field = 2;
|
||||
repeated FieldDescriptorProto extension = 6;
|
||||
|
||||
repeated DescriptorProto nested_type = 3;
|
||||
repeated EnumDescriptorProto enum_type = 4;
|
||||
|
||||
message ExtensionRange {
|
||||
optional int32 start = 1; // Inclusive.
|
||||
optional int32 end = 2; // Exclusive.
|
||||
|
||||
optional ExtensionRangeOptions options = 3;
|
||||
}
|
||||
repeated ExtensionRange extension_range = 5;
|
||||
|
||||
repeated OneofDescriptorProto oneof_decl = 8;
|
||||
|
||||
optional MessageOptions options = 7;
|
||||
|
||||
// Range of reserved tag numbers. Reserved tag numbers may not be used by
|
||||
// fields or extension ranges in the same message. Reserved ranges may
|
||||
// not overlap.
|
||||
message ReservedRange {
|
||||
optional int32 start = 1; // Inclusive.
|
||||
optional int32 end = 2; // Exclusive.
|
||||
}
|
||||
repeated ReservedRange reserved_range = 9;
|
||||
// Reserved field names, which may not be used by fields in the same message.
|
||||
// A given name may only be reserved once.
|
||||
repeated string reserved_name = 10;
|
||||
}
|
||||
|
||||
message ExtensionRangeOptions {
|
||||
// The parser stores options it doesn't recognize here. See above.
|
||||
repeated UninterpretedOption uninterpreted_option = 999;
|
||||
|
||||
// Clients can define custom options in extensions of this message. See above.
|
||||
extensions 1000 to max;
|
||||
}
|
||||
|
||||
// Describes a field within a message.
|
||||
message FieldDescriptorProto {
|
||||
enum Type {
|
||||
// 0 is reserved for errors.
|
||||
// Order is weird for historical reasons.
|
||||
TYPE_DOUBLE = 1;
|
||||
TYPE_FLOAT = 2;
|
||||
// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
|
||||
// negative values are likely.
|
||||
TYPE_INT64 = 3;
|
||||
TYPE_UINT64 = 4;
|
||||
// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
|
||||
// negative values are likely.
|
||||
TYPE_INT32 = 5;
|
||||
TYPE_FIXED64 = 6;
|
||||
TYPE_FIXED32 = 7;
|
||||
TYPE_BOOL = 8;
|
||||
TYPE_STRING = 9;
|
||||
// Tag-delimited aggregate.
|
||||
// Group type is deprecated and not supported in proto3. However, Proto3
|
||||
// implementations should still be able to parse the group wire format and
|
||||
// treat group fields as unknown fields.
|
||||
TYPE_GROUP = 10;
|
||||
TYPE_MESSAGE = 11; // Length-delimited aggregate.
|
||||
|
||||
// New in version 2.
|
||||
TYPE_BYTES = 12;
|
||||
TYPE_UINT32 = 13;
|
||||
TYPE_ENUM = 14;
|
||||
TYPE_SFIXED32 = 15;
|
||||
TYPE_SFIXED64 = 16;
|
||||
TYPE_SINT32 = 17; // Uses ZigZag encoding.
|
||||
TYPE_SINT64 = 18; // Uses ZigZag encoding.
|
||||
}
|
||||
|
||||
enum Label {
|
||||
// 0 is reserved for errors
|
||||
LABEL_OPTIONAL = 1;
|
||||
LABEL_REQUIRED = 2;
|
||||
LABEL_REPEATED = 3;
|
||||
}
|
||||
|
||||
optional string name = 1;
|
||||
optional int32 number = 3;
|
||||
optional Label label = 4;
|
||||
|
||||
// If type_name is set, this need not be set. If both this and type_name
|
||||
// are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
|
||||
optional Type type = 5;
|
||||
|
||||
// For message and enum types, this is the name of the type. If the name
|
||||
// starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
|
||||
// rules are used to find the type (i.e. first the nested types within this
|
||||
// message are searched, then within the parent, on up to the root
|
||||
// namespace).
|
||||
optional string type_name = 6;
|
||||
|
||||
// For extensions, this is the name of the type being extended. It is
|
||||
// resolved in the same manner as type_name.
|
||||
optional string extendee = 2;
|
||||
|
||||
// For numeric types, contains the original text representation of the value.
|
||||
// For booleans, "true" or "false".
|
||||
// For strings, contains the default text contents (not escaped in any way).
|
||||
// For bytes, contains the C escaped value. All bytes >= 128 are escaped.
|
||||
// TODO(kenton): Base-64 encode?
|
||||
optional string default_value = 7;
|
||||
|
||||
// If set, gives the index of a oneof in the containing type's oneof_decl
|
||||
// list. This field is a member of that oneof.
|
||||
optional int32 oneof_index = 9;
|
||||
|
||||
// JSON name of this field. The value is set by protocol compiler. If the
|
||||
// user has set a "json_name" option on this field, that option's value
|
||||
// will be used. Otherwise, it's deduced from the field's name by converting
|
||||
// it to camelCase.
|
||||
optional string json_name = 10;
|
||||
|
||||
optional FieldOptions options = 8;
|
||||
}
|
||||
|
||||
// Describes a oneof.
|
||||
message OneofDescriptorProto {
|
||||
optional string name = 1;
|
||||
optional OneofOptions options = 2;
|
||||
}
|
||||
|
||||
// Describes an enum type.
|
||||
message EnumDescriptorProto {
|
||||
optional string name = 1;
|
||||
|
||||
repeated EnumValueDescriptorProto value = 2;
|
||||
|
||||
optional EnumOptions options = 3;
|
||||
|
||||
// Range of reserved numeric values. Reserved values may not be used by
|
||||
// entries in the same enum. Reserved ranges may not overlap.
|
||||
//
|
||||
// Note that this is distinct from DescriptorProto.ReservedRange in that it
|
||||
// is inclusive such that it can appropriately represent the entire int32
|
||||
// domain.
|
||||
message EnumReservedRange {
|
||||
optional int32 start = 1; // Inclusive.
|
||||
optional int32 end = 2; // Inclusive.
|
||||
}
|
||||
|
||||
// Range of reserved numeric values. Reserved numeric values may not be used
|
||||
// by enum values in the same enum declaration. Reserved ranges may not
|
||||
// overlap.
|
||||
repeated EnumReservedRange reserved_range = 4;
|
||||
|
||||
// Reserved enum value names, which may not be reused. A given name may only
|
||||
// be reserved once.
|
||||
repeated string reserved_name = 5;
|
||||
}
|
||||
|
||||
// Describes a value within an enum.
|
||||
message EnumValueDescriptorProto {
|
||||
optional string name = 1;
|
||||
optional int32 number = 2;
|
||||
|
||||
optional EnumValueOptions options = 3;
|
||||
}
|
||||
|
||||
// Describes a service.
|
||||
message ServiceDescriptorProto {
|
||||
optional string name = 1;
|
||||
repeated MethodDescriptorProto method = 2;
|
||||
|
||||
optional ServiceOptions options = 3;
|
||||
}
|
||||
|
||||
// Describes a method of a service.
|
||||
message MethodDescriptorProto {
|
||||
optional string name = 1;
|
||||
|
||||
// Input and output type names. These are resolved in the same way as
|
||||
// FieldDescriptorProto.type_name, but must refer to a message type.
|
||||
optional string input_type = 2;
|
||||
optional string output_type = 3;
|
||||
|
||||
optional MethodOptions options = 4;
|
||||
|
||||
// Identifies if client streams multiple client messages
|
||||
optional bool client_streaming = 5 [default = false];
|
||||
// Identifies if server streams multiple server messages
|
||||
optional bool server_streaming = 6 [default = false];
|
||||
}
|
||||
|
||||
|
||||
// ===================================================================
|
||||
// Options
|
||||
|
||||
// Each of the definitions above may have "options" attached. These are
|
||||
// just annotations which may cause code to be generated slightly differently
|
||||
// or may contain hints for code that manipulates protocol messages.
|
||||
//
|
||||
// Clients may define custom options as extensions of the *Options messages.
|
||||
// These extensions may not yet be known at parsing time, so the parser cannot
|
||||
// store the values in them. Instead it stores them in a field in the *Options
|
||||
// message called uninterpreted_option. This field must have the same name
|
||||
// across all *Options messages. We then use this field to populate the
|
||||
// extensions when we build a descriptor, at which point all protos have been
|
||||
// parsed and so all extensions are known.
|
||||
//
|
||||
// Extension numbers for custom options may be chosen as follows:
|
||||
// * For options which will only be used within a single application or
|
||||
// organization, or for experimental options, use field numbers 50000
|
||||
// through 99999. It is up to you to ensure that you do not use the
|
||||
// same number for multiple options.
|
||||
// * For options which will be published and used publicly by multiple
|
||||
// independent entities, e-mail protobuf-global-extension-registry@google.com
|
||||
// to reserve extension numbers. Simply provide your project name (e.g.
|
||||
// Objective-C plugin) and your project website (if available) -- there's no
|
||||
// need to explain how you intend to use them. Usually you only need one
|
||||
// extension number. You can declare multiple options with only one extension
|
||||
// number by putting them in a sub-message. See the Custom Options section of
|
||||
// the docs for examples:
|
||||
// https://developers.google.com/protocol-buffers/docs/proto#options
|
||||
// If this turns out to be popular, a web service will be set up
|
||||
// to automatically assign option numbers.
|
||||
|
||||
message FileOptions {
|
||||
|
||||
// Sets the Java package where classes generated from this .proto will be
|
||||
// placed. By default, the proto package is used, but this is often
|
||||
// inappropriate because proto packages do not normally start with backwards
|
||||
// domain names.
|
||||
optional string java_package = 1;
|
||||
|
||||
|
||||
// If set, all the classes from the .proto file are wrapped in a single
|
||||
// outer class with the given name. This applies to both Proto1
|
||||
// (equivalent to the old "--one_java_file" option) and Proto2 (where
|
||||
// a .proto always translates to a single class, but you may want to
|
||||
// explicitly choose the class name).
|
||||
optional string java_outer_classname = 8;
|
||||
|
||||
// If set true, then the Java code generator will generate a separate .java
|
||||
// file for each top-level message, enum, and service defined in the .proto
|
||||
// file. Thus, these types will *not* be nested inside the outer class
|
||||
// named by java_outer_classname. However, the outer class will still be
|
||||
// generated to contain the file's getDescriptor() method as well as any
|
||||
// top-level extensions defined in the file.
|
||||
optional bool java_multiple_files = 10 [default = false];
|
||||
|
||||
// This option does nothing.
|
||||
optional bool java_generate_equals_and_hash = 20 [deprecated=true];
|
||||
|
||||
// If set true, then the Java2 code generator will generate code that
|
||||
// throws an exception whenever an attempt is made to assign a non-UTF-8
|
||||
// byte sequence to a string field.
|
||||
// Message reflection will do the same.
|
||||
// However, an extension field still accepts non-UTF-8 byte sequences.
|
||||
// This option has no effect on when used with the lite runtime.
|
||||
optional bool java_string_check_utf8 = 27 [default = false];
|
||||
|
||||
|
||||
// Generated classes can be optimized for speed or code size.
|
||||
enum OptimizeMode {
|
||||
SPEED = 1; // Generate complete code for parsing, serialization,
|
||||
// etc.
|
||||
CODE_SIZE = 2; // Use ReflectionOps to implement these methods.
|
||||
LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime.
|
||||
}
|
||||
optional OptimizeMode optimize_for = 9 [default = SPEED];
|
||||
|
||||
// Sets the Go package where structs generated from this .proto will be
|
||||
// placed. If omitted, the Go package will be derived from the following:
|
||||
// - The basename of the package import path, if provided.
|
||||
// - Otherwise, the package statement in the .proto file, if present.
|
||||
// - Otherwise, the basename of the .proto file, without extension.
|
||||
optional string go_package = 11;
|
||||
|
||||
|
||||
|
||||
|
||||
// Should generic services be generated in each language? "Generic" services
|
||||
// are not specific to any particular RPC system. They are generated by the
|
||||
// main code generators in each language (without additional plugins).
|
||||
// Generic services were the only kind of service generation supported by
|
||||
// early versions of google.protobuf.
|
||||
//
|
||||
// Generic services are now considered deprecated in favor of using plugins
|
||||
// that generate code specific to your particular RPC system. Therefore,
|
||||
// these default to false. Old code which depends on generic services should
|
||||
// explicitly set them to true.
|
||||
optional bool cc_generic_services = 16 [default = false];
|
||||
optional bool java_generic_services = 17 [default = false];
|
||||
optional bool py_generic_services = 18 [default = false];
|
||||
optional bool php_generic_services = 42 [default = false];
|
||||
|
||||
// Is this file deprecated?
|
||||
// Depending on the target platform, this can emit Deprecated annotations
|
||||
// for everything in the file, or it will be completely ignored; in the very
|
||||
// least, this is a formalization for deprecating files.
|
||||
optional bool deprecated = 23 [default = false];
|
||||
|
||||
// Enables the use of arenas for the proto messages in this file. This applies
|
||||
// only to generated classes for C++.
|
||||
optional bool cc_enable_arenas = 31 [default = false];
|
||||
|
||||
|
||||
// Sets the objective c class prefix which is prepended to all objective c
|
||||
// generated classes from this .proto. There is no default.
|
||||
optional string objc_class_prefix = 36;
|
||||
|
||||
// Namespace for generated classes; defaults to the package.
|
||||
optional string csharp_namespace = 37;
|
||||
|
||||
// By default Swift generators will take the proto package and CamelCase it
|
||||
// replacing '.' with underscore and use that to prefix the types/symbols
|
||||
// defined. When this options is provided, they will use this value instead
|
||||
// to prefix the types/symbols defined.
|
||||
optional string swift_prefix = 39;
|
||||
|
||||
// Sets the php class prefix which is prepended to all php generated classes
|
||||
// from this .proto. Default is empty.
|
||||
optional string php_class_prefix = 40;
|
||||
|
||||
// Use this option to change the namespace of php generated classes. Default
|
||||
// is empty. When this option is empty, the package name will be used for
|
||||
// determining the namespace.
|
||||
optional string php_namespace = 41;
|
||||
|
||||
// Use this option to change the namespace of php generated metadata classes.
|
||||
// Default is empty. When this option is empty, the proto file name will be
|
||||
// used for determining the namespace.
|
||||
optional string php_metadata_namespace = 44;
|
||||
|
||||
// Use this option to change the package of ruby generated classes. Default
|
||||
// is empty. When this option is not set, the package name will be used for
|
||||
// determining the ruby package.
|
||||
optional string ruby_package = 45;
|
||||
|
||||
|
||||
// The parser stores options it doesn't recognize here.
|
||||
// See the documentation for the "Options" section above.
|
||||
repeated UninterpretedOption uninterpreted_option = 999;
|
||||
|
||||
// Clients can define custom options in extensions of this message.
|
||||
// See the documentation for the "Options" section above.
|
||||
extensions 1000 to max;
|
||||
|
||||
reserved 38;
|
||||
}
|
||||
|
||||
message MessageOptions {
|
||||
// Set true to use the old proto1 MessageSet wire format for extensions.
|
||||
// This is provided for backwards-compatibility with the MessageSet wire
|
||||
// format. You should not use this for any other reason: It's less
|
||||
// efficient, has fewer features, and is more complicated.
|
||||
//
|
||||
// The message must be defined exactly as follows:
|
||||
// message Foo {
|
||||
// option message_set_wire_format = true;
|
||||
// extensions 4 to max;
|
||||
// }
|
||||
// Note that the message cannot have any defined fields; MessageSets only
|
||||
// have extensions.
|
||||
//
|
||||
// All extensions of your type must be singular messages; e.g. they cannot
|
||||
// be int32s, enums, or repeated messages.
|
||||
//
|
||||
// Because this is an option, the above two restrictions are not enforced by
|
||||
// the protocol compiler.
|
||||
optional bool message_set_wire_format = 1 [default = false];
|
||||
|
||||
// Disables the generation of the standard "descriptor()" accessor, which can
|
||||
// conflict with a field of the same name. This is meant to make migration
|
||||
// from proto1 easier; new code should avoid fields named "descriptor".
|
||||
optional bool no_standard_descriptor_accessor = 2 [default = false];
|
||||
|
||||
// Is this message deprecated?
|
||||
// Depending on the target platform, this can emit Deprecated annotations
|
||||
// for the message, or it will be completely ignored; in the very least,
|
||||
// this is a formalization for deprecating messages.
|
||||
optional bool deprecated = 3 [default = false];
|
||||
|
||||
// Whether the message is an automatically generated map entry type for the
|
||||
// maps field.
|
||||
//
|
||||
// For maps fields:
|
||||
// map<KeyType, ValueType> map_field = 1;
|
||||
// The parsed descriptor looks like:
|
||||
// message MapFieldEntry {
|
||||
// option map_entry = true;
|
||||
// optional KeyType key = 1;
|
||||
// optional ValueType value = 2;
|
||||
// }
|
||||
// repeated MapFieldEntry map_field = 1;
|
||||
//
|
||||
// Implementations may choose not to generate the map_entry=true message, but
|
||||
// use a native map in the target language to hold the keys and values.
|
||||
// The reflection APIs in such implementations still need to work as
|
||||
// if the field is a repeated message field.
|
||||
//
|
||||
// NOTE: Do not set the option in .proto files. Always use the maps syntax
|
||||
// instead. The option should only be implicitly set by the proto compiler
|
||||
// parser.
|
||||
optional bool map_entry = 7;
|
||||
|
||||
reserved 8; // javalite_serializable
|
||||
reserved 9; // javanano_as_lite
|
||||
|
||||
|
||||
// The parser stores options it doesn't recognize here. See above.
|
||||
repeated UninterpretedOption uninterpreted_option = 999;
|
||||
|
||||
// Clients can define custom options in extensions of this message. See above.
|
||||
extensions 1000 to max;
|
||||
}
|
||||
|
||||
message FieldOptions {
|
||||
// The ctype option instructs the C++ code generator to use a different
|
||||
// representation of the field than it normally would. See the specific
|
||||
// options below. This option is not yet implemented in the open source
|
||||
// release -- sorry, we'll try to include it in a future version!
|
||||
optional CType ctype = 1 [default = STRING];
|
||||
enum CType {
|
||||
// Default mode.
|
||||
STRING = 0;
|
||||
|
||||
CORD = 1;
|
||||
|
||||
STRING_PIECE = 2;
|
||||
}
|
||||
// The packed option can be enabled for repeated primitive fields to enable
|
||||
// a more efficient representation on the wire. Rather than repeatedly
|
||||
// writing the tag and type for each element, the entire array is encoded as
|
||||
// a single length-delimited blob. In proto3, only explicit setting it to
|
||||
// false will avoid using packed encoding.
|
||||
optional bool packed = 2;
|
||||
|
||||
// The jstype option determines the JavaScript type used for values of the
|
||||
// field. The option is permitted only for 64 bit integral and fixed types
|
||||
// (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
|
||||
// is represented as JavaScript string, which avoids loss of precision that
|
||||
// can happen when a large value is converted to a floating point JavaScript.
|
||||
// Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
|
||||
// use the JavaScript "number" type. The behavior of the default option
|
||||
// JS_NORMAL is implementation dependent.
|
||||
//
|
||||
// This option is an enum to permit additional types to be added, e.g.
|
||||
// goog.math.Integer.
|
||||
optional JSType jstype = 6 [default = JS_NORMAL];
|
||||
enum JSType {
|
||||
// Use the default type.
|
||||
JS_NORMAL = 0;
|
||||
|
||||
// Use JavaScript strings.
|
||||
JS_STRING = 1;
|
||||
|
||||
// Use JavaScript numbers.
|
||||
JS_NUMBER = 2;
|
||||
}
|
||||
|
||||
// Should this field be parsed lazily? Lazy applies only to message-type
|
||||
// fields. It means that when the outer message is initially parsed, the
|
||||
// inner message's contents will not be parsed but instead stored in encoded
|
||||
// form. The inner message will actually be parsed when it is first accessed.
|
||||
//
|
||||
// This is only a hint. Implementations are free to choose whether to use
|
||||
// eager or lazy parsing regardless of the value of this option. However,
|
||||
// setting this option true suggests that the protocol author believes that
|
||||
// using lazy parsing on this field is worth the additional bookkeeping
|
||||
// overhead typically needed to implement it.
|
||||
//
|
||||
// This option does not affect the public interface of any generated code;
|
||||
// all method signatures remain the same. Furthermore, thread-safety of the
|
||||
// interface is not affected by this option; const methods remain safe to
|
||||
// call from multiple threads concurrently, while non-const methods continue
|
||||
// to require exclusive access.
|
||||
//
|
||||
//
|
||||
// Note that implementations may choose not to check required fields within
|
||||
// a lazy sub-message. That is, calling IsInitialized() on the outer message
|
||||
// may return true even if the inner message has missing required fields.
|
||||
// This is necessary because otherwise the inner message would have to be
|
||||
// parsed in order to perform the check, defeating the purpose of lazy
|
||||
// parsing. An implementation which chooses not to check required fields
|
||||
// must be consistent about it. That is, for any particular sub-message, the
|
||||
// implementation must either *always* check its required fields, or *never*
|
||||
// check its required fields, regardless of whether or not the message has
|
||||
// been parsed.
|
||||
optional bool lazy = 5 [default = false];
|
||||
|
||||
// Is this field deprecated?
|
||||
// Depending on the target platform, this can emit Deprecated annotations
|
||||
// for accessors, or it will be completely ignored; in the very least, this
|
||||
// is a formalization for deprecating fields.
|
||||
optional bool deprecated = 3 [default = false];
|
||||
|
||||
// For Google-internal migration only. Do not use.
|
||||
optional bool weak = 10 [default = false];
|
||||
|
||||
|
||||
// The parser stores options it doesn't recognize here. See above.
|
||||
repeated UninterpretedOption uninterpreted_option = 999;
|
||||
|
||||
// Clients can define custom options in extensions of this message. See above.
|
||||
extensions 1000 to max;
|
||||
|
||||
reserved 4; // removed jtype
|
||||
}
|
||||
|
||||
message OneofOptions {
|
||||
// The parser stores options it doesn't recognize here. See above.
|
||||
repeated UninterpretedOption uninterpreted_option = 999;
|
||||
|
||||
// Clients can define custom options in extensions of this message. See above.
|
||||
extensions 1000 to max;
|
||||
}
|
||||
|
||||
message EnumOptions {
|
||||
|
||||
// Set this option to true to allow mapping different tag names to the same
|
||||
// value.
|
||||
optional bool allow_alias = 2;
|
||||
|
||||
// Is this enum deprecated?
|
||||
// Depending on the target platform, this can emit Deprecated annotations
|
||||
// for the enum, or it will be completely ignored; in the very least, this
|
||||
// is a formalization for deprecating enums.
|
||||
optional bool deprecated = 3 [default = false];
|
||||
|
||||
reserved 5; // javanano_as_lite
|
||||
|
||||
// The parser stores options it doesn't recognize here. See above.
|
||||
repeated UninterpretedOption uninterpreted_option = 999;
|
||||
|
||||
// Clients can define custom options in extensions of this message. See above.
|
||||
extensions 1000 to max;
|
||||
}
|
||||
|
||||
message EnumValueOptions {
|
||||
// Is this enum value deprecated?
|
||||
// Depending on the target platform, this can emit Deprecated annotations
|
||||
// for the enum value, or it will be completely ignored; in the very least,
|
||||
// this is a formalization for deprecating enum values.
|
||||
optional bool deprecated = 1 [default = false];
|
||||
|
||||
// The parser stores options it doesn't recognize here. See above.
|
||||
repeated UninterpretedOption uninterpreted_option = 999;
|
||||
|
||||
// Clients can define custom options in extensions of this message. See above.
|
||||
extensions 1000 to max;
|
||||
}
|
||||
|
||||
message ServiceOptions {
|
||||
|
||||
// Note: Field numbers 1 through 32 are reserved for Google's internal RPC
|
||||
// framework. We apologize for hoarding these numbers to ourselves, but
|
||||
// we were already using them long before we decided to release Protocol
|
||||
// Buffers.
|
||||
|
||||
// Is this service deprecated?
|
||||
// Depending on the target platform, this can emit Deprecated annotations
|
||||
// for the service, or it will be completely ignored; in the very least,
|
||||
// this is a formalization for deprecating services.
|
||||
optional bool deprecated = 33 [default = false];
|
||||
|
||||
// The parser stores options it doesn't recognize here. See above.
|
||||
repeated UninterpretedOption uninterpreted_option = 999;
|
||||
|
||||
// Clients can define custom options in extensions of this message. See above.
|
||||
extensions 1000 to max;
|
||||
}
|
||||
|
||||
message MethodOptions {
|
||||
|
||||
// Note: Field numbers 1 through 32 are reserved for Google's internal RPC
|
||||
// framework. We apologize for hoarding these numbers to ourselves, but
|
||||
// we were already using them long before we decided to release Protocol
|
||||
// Buffers.
|
||||
|
||||
// Is this method deprecated?
|
||||
// Depending on the target platform, this can emit Deprecated annotations
|
||||
// for the method, or it will be completely ignored; in the very least,
|
||||
// this is a formalization for deprecating methods.
|
||||
optional bool deprecated = 33 [default = false];
|
||||
|
||||
// Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
|
||||
// or neither? HTTP based RPC implementation may choose GET verb for safe
|
||||
// methods, and PUT verb for idempotent methods instead of the default POST.
|
||||
enum IdempotencyLevel {
|
||||
IDEMPOTENCY_UNKNOWN = 0;
|
||||
NO_SIDE_EFFECTS = 1; // implies idempotent
|
||||
IDEMPOTENT = 2; // idempotent, but may have side effects
|
||||
}
|
||||
optional IdempotencyLevel idempotency_level = 34
|
||||
[default = IDEMPOTENCY_UNKNOWN];
|
||||
|
||||
// The parser stores options it doesn't recognize here. See above.
|
||||
repeated UninterpretedOption uninterpreted_option = 999;
|
||||
|
||||
// Clients can define custom options in extensions of this message. See above.
|
||||
extensions 1000 to max;
|
||||
}
|
||||
|
||||
|
||||
// A message representing a option the parser does not recognize. This only
|
||||
// appears in options protos created by the compiler::Parser class.
|
||||
// DescriptorPool resolves these when building Descriptor objects. Therefore,
|
||||
// options protos in descriptor objects (e.g. returned by Descriptor::options(),
|
||||
// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
|
||||
// in them.
|
||||
message UninterpretedOption {
|
||||
// The name of the uninterpreted option. Each string represents a segment in
|
||||
// a dot-separated name. is_extension is true iff a segment represents an
|
||||
// extension (denoted with parentheses in options specs in .proto files).
|
||||
// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
|
||||
// "foo.(bar.baz).qux".
|
||||
message NamePart {
|
||||
required string name_part = 1;
|
||||
required bool is_extension = 2;
|
||||
}
|
||||
repeated NamePart name = 2;
|
||||
|
||||
// The value of the uninterpreted option, in whatever type the tokenizer
|
||||
// identified it as during parsing. Exactly one of these should be set.
|
||||
optional string identifier_value = 3;
|
||||
optional uint64 positive_int_value = 4;
|
||||
optional int64 negative_int_value = 5;
|
||||
optional double double_value = 6;
|
||||
optional bytes string_value = 7;
|
||||
optional string aggregate_value = 8;
|
||||
}
|
||||
|
||||
// ===================================================================
|
||||
// Optional source code info
|
||||
|
||||
// Encapsulates information about the original source file from which a
|
||||
// FileDescriptorProto was generated.
|
||||
message SourceCodeInfo {
|
||||
// A Location identifies a piece of source code in a .proto file which
|
||||
// corresponds to a particular definition. This information is intended
|
||||
// to be useful to IDEs, code indexers, documentation generators, and similar
|
||||
// tools.
|
||||
//
|
||||
// For example, say we have a file like:
|
||||
// message Foo {
|
||||
// optional string foo = 1;
|
||||
// }
|
||||
// Let's look at just the field definition:
|
||||
// optional string foo = 1;
|
||||
// ^ ^^ ^^ ^ ^^^
|
||||
// a bc de f ghi
|
||||
// We have the following locations:
|
||||
// span path represents
|
||||
// [a,i) [ 4, 0, 2, 0 ] The whole field definition.
|
||||
// [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
|
||||
// [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
|
||||
// [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
|
||||
// [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
|
||||
//
|
||||
// Notes:
|
||||
// - A location may refer to a repeated field itself (i.e. not to any
|
||||
// particular index within it). This is used whenever a set of elements are
|
||||
// logically enclosed in a single code segment. For example, an entire
|
||||
// extend block (possibly containing multiple extension definitions) will
|
||||
// have an outer location whose path refers to the "extensions" repeated
|
||||
// field without an index.
|
||||
// - Multiple locations may have the same path. This happens when a single
|
||||
// logical declaration is spread out across multiple places. The most
|
||||
// obvious example is the "extend" block again -- there may be multiple
|
||||
// extend blocks in the same scope, each of which will have the same path.
|
||||
// - A location's span is not always a subset of its parent's span. For
|
||||
// example, the "extendee" of an extension declaration appears at the
|
||||
// beginning of the "extend" block and is shared by all extensions within
|
||||
// the block.
|
||||
// - Just because a location's span is a subset of some other location's span
|
||||
// does not mean that it is a descendant. For example, a "group" defines
|
||||
// both a type and a field in a single declaration. Thus, the locations
|
||||
// corresponding to the type and field and their components will overlap.
|
||||
// - Code which tries to interpret locations should probably be designed to
|
||||
// ignore those that it doesn't understand, as more types of locations could
|
||||
// be recorded in the future.
|
||||
repeated Location location = 1;
|
||||
message Location {
|
||||
// Identifies which part of the FileDescriptorProto was defined at this
|
||||
// location.
|
||||
//
|
||||
// Each element is a field number or an index. They form a path from
|
||||
// the root FileDescriptorProto to the place where the definition. For
|
||||
// example, this path:
|
||||
// [ 4, 3, 2, 7, 1 ]
|
||||
// refers to:
|
||||
// file.message_type(3) // 4, 3
|
||||
// .field(7) // 2, 7
|
||||
// .name() // 1
|
||||
// This is because FileDescriptorProto.message_type has field number 4:
|
||||
// repeated DescriptorProto message_type = 4;
|
||||
// and DescriptorProto.field has field number 2:
|
||||
// repeated FieldDescriptorProto field = 2;
|
||||
// and FieldDescriptorProto.name has field number 1:
|
||||
// optional string name = 1;
|
||||
//
|
||||
// Thus, the above path gives the location of a field name. If we removed
|
||||
// the last element:
|
||||
// [ 4, 3, 2, 7 ]
|
||||
// this path refers to the whole field declaration (from the beginning
|
||||
// of the label to the terminating semicolon).
|
||||
repeated int32 path = 1 [packed = true];
|
||||
|
||||
// Always has exactly three or four elements: start line, start column,
|
||||
// end line (optional, otherwise assumed same as start line), end column.
|
||||
// These are packed into a single field for efficiency. Note that line
|
||||
// and column numbers are zero-based -- typically you will want to add
|
||||
// 1 to each before displaying to a user.
|
||||
repeated int32 span = 2 [packed = true];
|
||||
|
||||
// If this SourceCodeInfo represents a complete declaration, these are any
|
||||
// comments appearing before and after the declaration which appear to be
|
||||
// attached to the declaration.
|
||||
//
|
||||
// A series of line comments appearing on consecutive lines, with no other
|
||||
// tokens appearing on those lines, will be treated as a single comment.
|
||||
//
|
||||
// leading_detached_comments will keep paragraphs of comments that appear
|
||||
// before (but not connected to) the current element. Each paragraph,
|
||||
// separated by empty lines, will be one comment element in the repeated
|
||||
// field.
|
||||
//
|
||||
// Only the comment content is provided; comment markers (e.g. //) are
|
||||
// stripped out. For block comments, leading whitespace and an asterisk
|
||||
// will be stripped from the beginning of each line other than the first.
|
||||
// Newlines are included in the output.
|
||||
//
|
||||
// Examples:
|
||||
//
|
||||
// optional int32 foo = 1; // Comment attached to foo.
|
||||
// // Comment attached to bar.
|
||||
// optional int32 bar = 2;
|
||||
//
|
||||
// optional string baz = 3;
|
||||
// // Comment attached to baz.
|
||||
// // Another line attached to baz.
|
||||
//
|
||||
// // Comment attached to qux.
|
||||
// //
|
||||
// // Another line attached to qux.
|
||||
// optional double qux = 4;
|
||||
//
|
||||
// // Detached comment for corge. This is not leading or trailing comments
|
||||
// // to qux or corge because there are blank lines separating it from
|
||||
// // both.
|
||||
//
|
||||
// // Detached comment for corge paragraph 2.
|
||||
//
|
||||
// optional string corge = 5;
|
||||
// /* Block comment attached
|
||||
// * to corge. Leading asterisks
|
||||
// * will be removed. */
|
||||
// /* Block comment attached to
|
||||
// * grault. */
|
||||
// optional int32 grault = 6;
|
||||
//
|
||||
// // ignored detached comments.
|
||||
optional string leading_comments = 3;
|
||||
optional string trailing_comments = 4;
|
||||
repeated string leading_detached_comments = 6;
|
||||
}
|
||||
}
|
||||
|
||||
// Describes the relationship between generated code and its original source
|
||||
// file. A GeneratedCodeInfo message is associated with only one generated
|
||||
// source file, but may contain references to different source .proto files.
|
||||
message GeneratedCodeInfo {
|
||||
// An Annotation connects some span of text in generated code to an element
|
||||
// of its generating .proto file.
|
||||
repeated Annotation annotation = 1;
|
||||
message Annotation {
|
||||
// Identifies the element in the original source .proto file. This field
|
||||
// is formatted the same as SourceCodeInfo.Location.path.
|
||||
repeated int32 path = 1 [packed = true];
|
||||
|
||||
// Identifies the filesystem path to the original source .proto.
|
||||
optional string source_file = 2;
|
||||
|
||||
// Identifies the starting offset in bytes in the generated code
|
||||
// that relates to the identified object.
|
||||
optional int32 begin = 3;
|
||||
|
||||
// Identifies the ending offset in bytes in the generated code that
|
||||
// relates to the identified offset. The end offset should be one past
|
||||
// the last relevant byte (so the length of the text = end - begin).
|
||||
optional int32 end = 4;
|
||||
}
|
||||
}
|
||||
@@ -1,97 +0,0 @@
|
||||
// Custom options for defining:
|
||||
// - Maximum size of string/bytes
|
||||
// - Maximum number of elements in array
|
||||
//
|
||||
// These are used by nanopb to generate statically allocable structures
|
||||
// for memory-limited environments.
|
||||
|
||||
syntax = "proto2";
|
||||
import "google/protobuf/descriptor.proto";
|
||||
|
||||
option java_package = "fi.kapsi.koti.jpa.nanopb";
|
||||
|
||||
enum FieldType {
|
||||
FT_DEFAULT = 0; // Automatically decide field type, generate static field if possible.
|
||||
FT_CALLBACK = 1; // Always generate a callback field.
|
||||
FT_POINTER = 4; // Always generate a dynamically allocated field.
|
||||
FT_STATIC = 2; // Generate a static field or raise an exception if not possible.
|
||||
FT_IGNORE = 3; // Ignore the field completely.
|
||||
}
|
||||
|
||||
enum IntSize {
|
||||
IS_DEFAULT = 0; // Default, 32/64bit based on type in .proto
|
||||
IS_8 = 8;
|
||||
IS_16 = 16;
|
||||
IS_32 = 32;
|
||||
IS_64 = 64;
|
||||
}
|
||||
|
||||
// This is the inner options message, which basically defines options for
|
||||
// a field. When it is used in message or file scope, it applies to all
|
||||
// fields.
|
||||
message NanoPBOptions {
|
||||
// Allocated size for 'bytes' and 'string' fields.
|
||||
optional int32 max_size = 1;
|
||||
|
||||
// Allocated number of entries in arrays ('repeated' fields)
|
||||
optional int32 max_count = 2;
|
||||
|
||||
// Size of integer fields. Can save some memory if you don't need
|
||||
// full 32 bits for the value.
|
||||
optional IntSize int_size = 7 [default = IS_DEFAULT];
|
||||
|
||||
// Force type of field (callback or static allocation)
|
||||
optional FieldType type = 3 [default = FT_DEFAULT];
|
||||
|
||||
// Use long names for enums, i.e. EnumName_EnumValue.
|
||||
optional bool long_names = 4 [default = true];
|
||||
|
||||
// Add 'packed' attribute to generated structs.
|
||||
// Note: this cannot be used on CPUs that break on unaligned
|
||||
// accesses to variables.
|
||||
optional bool packed_struct = 5 [default = false];
|
||||
|
||||
// Add 'packed' attribute to generated enums.
|
||||
optional bool packed_enum = 10 [default = false];
|
||||
|
||||
// Skip this message
|
||||
optional bool skip_message = 6 [default = false];
|
||||
|
||||
// Generate oneof fields as normal optional fields instead of union.
|
||||
optional bool no_unions = 8 [default = false];
|
||||
|
||||
// integer type tag for a message
|
||||
optional uint32 msgid = 9;
|
||||
|
||||
// decode oneof as anonymous union
|
||||
optional bool anonymous_oneof = 11 [default = false];
|
||||
}
|
||||
|
||||
// Extensions to protoc 'Descriptor' type in order to define options
|
||||
// inside a .proto file.
|
||||
//
|
||||
// Protocol Buffers extension number registry
|
||||
// --------------------------------
|
||||
// Project: Nanopb
|
||||
// Contact: Petteri Aimonen <jpa@kapsi.fi>
|
||||
// Web site: http://kapsi.fi/~jpa/nanopb
|
||||
// Extensions: 1010 (all types)
|
||||
// --------------------------------
|
||||
|
||||
extend google.protobuf.FileOptions {
|
||||
optional NanoPBOptions nanopb_fileopt = 1010;
|
||||
}
|
||||
|
||||
extend google.protobuf.MessageOptions {
|
||||
optional NanoPBOptions nanopb_msgopt = 1010;
|
||||
}
|
||||
|
||||
extend google.protobuf.EnumOptions {
|
||||
optional NanoPBOptions nanopb_enumopt = 1010;
|
||||
}
|
||||
|
||||
extend google.protobuf.FieldOptions {
|
||||
optional NanoPBOptions nanopb = 1010;
|
||||
}
|
||||
|
||||
|
||||
103
proprietary/vendor/etc/sensors/proto/sns_accel.proto
vendored
103
proprietary/vendor/etc/sensors/proto/sns_accel.proto
vendored
@@ -1,103 +0,0 @@
|
||||
// @file sns_accel.proto
|
||||
//
|
||||
// Defines the API for Accelerometer Sensors.
|
||||
// All Accelerometer Sensor drivers are required to comply with this API.
|
||||
// Any new functionality for Accelerometer Sensor can be defined in a
|
||||
// device specific API file.
|
||||
//
|
||||
// Copyright (c) 2016-2018, 2020 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std_sensor.proto";
|
||||
import "sns_physical_sensor_test.proto";
|
||||
import "sns_std_event_gated_sensor.proto";
|
||||
import "sns_cal.proto";
|
||||
|
||||
// Attribute requirements:
|
||||
// The Accelerometer Sensor publishes:
|
||||
// 1. SNS_STD_SENSOR_ATTRID_TYPE attribute value as "accel".
|
||||
// 2. SNS_STD_SENSOR_ATTRID_RESOLUTIONS attribute values in (m/s2)/LSB unit.
|
||||
// 3. SNS_STD_SENSOR_ATTRID_RANGES attribute values in +/-m/s2 unit.
|
||||
// 4. See sns_std_sensor.proto for other attributes.
|
||||
|
||||
// Handling stream requests:
|
||||
// 1. The Accelerometer Sensor handles the sns_std_sensor_config
|
||||
// message request with msgid SNS_STD_SENSOR_MSGID_SNS_STD_SENSOR_CONFIG
|
||||
// for all non-gated stream enable/update requests.
|
||||
// 2. The Accelerometer Sensor handles the sns_std_sensor_config
|
||||
// message request with msgid SNS_STD_EVENT_GATED_SENSOR_MSGID_SNS_STD_SENSOR_CONFIG
|
||||
// for all gated stream enable/update requests.
|
||||
// a. Accelerometer stream is gated on the motion detection feature
|
||||
// available on most accel hardware. This feature is published via the
|
||||
// "motion_detect" Sensor by the same driver library as "accel" Sensor.
|
||||
// b. If "motion_detect" is not supported then the Sensor does not support
|
||||
// stream gating. Any gated client request is rejected in this case.
|
||||
// 3. The Accelerometer Sensor uses batching_period item in
|
||||
// sns_std_request as the requested batching rate to determine
|
||||
// hardware FIFO watermark.
|
||||
|
||||
// Handling stream events:
|
||||
// 1. The Accelerometer Sensor publishes acceleration data stream events
|
||||
// using the sns_std_sensor_event message.
|
||||
// 2. Each stream event contains three output data fields where data is
|
||||
// in m/s2 units and is factory calibrated.
|
||||
// 3. Data in the stream is adjusted to Android coordinate system relative to a
|
||||
// mobile device held with screen facing the user in it's natural orientation:
|
||||
// X-axis: parallel to the screen pointing to the right
|
||||
// Y-axis: parallel to the screen pointing to the top
|
||||
// Z-axis: perpendicular to the screen pointing towards the user
|
||||
// This conforms to the mobile device axes orientation as specified by the
|
||||
// Android Sensor API.
|
||||
// 4. Data in the stream event is ordered as:
|
||||
// data[0] = X-axis
|
||||
// data[1] = Y-axis
|
||||
// data[2] = Z-axis
|
||||
// 5. Each stream event publishes an accuracy field:
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_UNRELIABLE to mark invalid samples when hardware is
|
||||
// yet to stabilize after the sensor is configured.
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_ACCURACY_HIGH to mark samples when they are valid.
|
||||
// 6. The Accelerometer Sensor publishes a configuration event using the
|
||||
// sns_std_sensor_physical_config_event message.
|
||||
// It publishes this event each time there is change in hardware config of the sensor
|
||||
// and contains current physical sensor config of the sensor.
|
||||
// 7. The Accelerometer Sensor publishes a factory calibration event using the
|
||||
// sns_cal_event message. It uses bias and comp_matrix fields in this event.
|
||||
// It publishes this event each time there is change in it's factory calibration
|
||||
// data or when a client sends a new streaming request.
|
||||
// 8. When all outstanding requests to the Sensor are gated requests and if the
|
||||
// "motion_detect" Sensor is enabled then the accel Sensor stops generating
|
||||
// output events.
|
||||
// a. When motion detect interrupt fires:
|
||||
// - All existing accel gated stream requests are converted to non-gated
|
||||
// stream requests.
|
||||
// The accel Sensor publishes an event with message ID
|
||||
// SNS_STD_EVENT_GATED_SENSOR_MSGID_GATED_REQ_CONVERTED_TO_NON_GATED to
|
||||
// to indicate this change to it's gated clients.
|
||||
// - The accel Sensor resumes generating output to all clients.
|
||||
// So in effect motion_detect Sensor and accel gated Sensor stream have
|
||||
// a one shot behavior.
|
||||
// b. The Sensor resumes generating output events if motion detect interrupt
|
||||
// is disabled potentially due to a new non-gated accel stream request or
|
||||
// the request to motion_detect Sensor is disabled.
|
||||
// 9. When all outstanding requests to the Sensor are gated requests but if
|
||||
// "motion_detect" Sensor is not enabled then the Sensor continues to generate
|
||||
// output events.
|
||||
|
||||
// Handling self-test requests:
|
||||
// 1. The Accelerometer Sensor implements SNS_PHYSICAL_SENSOR_TEST_TYPE_COM test
|
||||
// type using the physical sensor test API.
|
||||
// 2. The Accelerometer Sensor implements SNS_PHYSICAL_SENSOR_TEST_TYPE_FACTORY test
|
||||
// type to determine factory calibration parameters using the physical
|
||||
// sensor test API.
|
||||
// 3. The Accelerometer Sensor could implement other test types.
|
||||
|
||||
// Handling test events:
|
||||
// 1. The Accelerometer Sensor uses sns_physical_sensor_test_event message to publish
|
||||
// a test completion event.
|
||||
// 2. The test_passed field in sns_physical_sensor_test_event is used to output the
|
||||
// pass/fail result of self-test execution.
|
||||
// 3. The test_data field in sns_physical_sensor_test_event could be used to output any
|
||||
// driver-specific error data.
|
||||
@@ -1,32 +0,0 @@
|
||||
// @file sns_accel_cal.proto
|
||||
//
|
||||
// Defines message types for the Accel Calibration Sensor.
|
||||
//
|
||||
// Copyright (c) 2017, 2020 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_cal.proto";
|
||||
|
||||
// The Accel Calibration Sensor determines the calibration parameters
|
||||
// for accel sensor
|
||||
|
||||
// Accel Calibration Sensor Attributes:
|
||||
// - SNS_STD_SENSOR_ATTRID_TYPE: "accel_cal"
|
||||
// - SNS_STD_SENSOR_ATTRID_STREAM_TYPE: SNS_STD_SENSOR_STREAM_TYPE_ON_CHANGE
|
||||
|
||||
// Stream Requests:
|
||||
// - SNS_STD_SENSOR_MSGID_SNS_STD_ON_CHANGE_CONFIG message ID is used to
|
||||
// enable the sensor
|
||||
// - SNS_CAL_MSGID_SNS_CAL_RESET message ID is used to reset the algorithm
|
||||
// and any previously determined calibration parameters.
|
||||
|
||||
// Stream Events:
|
||||
// - SNS_CAL_MSGID_SNS_CAL_EVENT message ID is used to report calibration
|
||||
// parameters to the client of the sensor. The sns_cal_event message as
|
||||
// defined in sns_cal.proto is used to report this data event where the
|
||||
// units for the bias field in the message are in m / s ^2
|
||||
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
// @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];
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
// @file sns_ambient_light.proto
|
||||
//
|
||||
// Defines the API for Ambient Light Sensors.
|
||||
// All Ambient Light Sensor drivers are required to comply with this API.
|
||||
// Any new functionality for Ambient Light Sensor can be defined in a
|
||||
// device specific API file.
|
||||
//
|
||||
// Copyright (c) 2016-2018 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std_sensor.proto";
|
||||
import "sns_physical_sensor_test.proto";
|
||||
import "sns_cal.proto";
|
||||
|
||||
// Attribute requirements:
|
||||
// The Ambient Light Sensor publishes:
|
||||
// 1. SNS_STD_SENSOR_ATTRID_TYPE attribute value as "ambient_light".
|
||||
// 2. SNS_STD_SENSOR_ATTRID_RESOLUTIONS attribute value in Lux/LSB.
|
||||
// 3. SNS_STD_SENSOR_ATTRID_RANGES attribute values in Lux unit.
|
||||
// 4. See sns_std_sensor.proto for other attributes.
|
||||
|
||||
// Handling stream requests:
|
||||
// 1. The Ambient Light Sensor supports both streaming and on-change
|
||||
// modes and the operating mode is configured in the Registry.
|
||||
// 2. The streaming Ambient Light Sensor handles the sns_std_sensor_config
|
||||
// request for all stream enable/update requests.
|
||||
// 3. The on-change Ambient Light Sensor handles the
|
||||
// SNS_STD_SENSOR_MSGID_SNS_STD_ON_CHANGE_CONFIG request for
|
||||
// all stream enable/update requests.
|
||||
// 4. In on-change mode the Sensor uses interrupt operation and reports
|
||||
// samples for only significant change in ambient light.
|
||||
// Example: +/- 10% change.
|
||||
|
||||
// Handling stream events:
|
||||
// 1. The Ambient Light Sensor publishes current illumination data stream
|
||||
// events using the sns_std_sensor_event message.
|
||||
// 2. Each stream event contains two output data fields where data is
|
||||
// factory calibrated and ordered as:
|
||||
// data[0] = ambient light in Lux
|
||||
// data[1] = raw ADC value associated with data[0]
|
||||
// 3. Each stream event publishes an accuracy field:
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_UNRELIABLE to mark invalid samples when hardware is
|
||||
// yet to stabilize after the sensor is configured.
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_ACCURACY_HIGH to mark samples when they are valid.
|
||||
// 4. The Ambient Light Sensor publishes a configuration event using the
|
||||
// sns_std_sensor_physical_config_event message.
|
||||
// It publishes this event each time there is change in hardware config of the sensor
|
||||
// and contains current physical sensor config of the sensor.
|
||||
// 5. The Ambient Light Sensor publishes a factory calibration event using the
|
||||
// sns_cal_event message. It uses bias and scale_factor fields in this event.
|
||||
// It publishes this event each time there is change in it's factory calibration
|
||||
// data or when a client sends a new request.
|
||||
|
||||
// Handling self-test requests:
|
||||
// 1. The Ambient Light Sensor implements SNS_PHYSICAL_SENSOR_TEST_TYPE_COM test
|
||||
// type using the physical sensor test API.
|
||||
// 2. The Ambient Light Sensor implements SNS_PHYSICAL_SENSOR_TEST_TYPE_FACTORY test
|
||||
// type to determine factory calibration parameters using the physical
|
||||
// sensor test API. The factory test for Ambient Light Sensor calibrates
|
||||
// the sensor such that it's output Lux value is comparable to a standard
|
||||
// Luxmeter output in any lighting condition.
|
||||
// 3. The Ambient Light Sensor could implement other test types.
|
||||
|
||||
// Handling test events:
|
||||
// 1. The Ambient Light Sensor uses sns_physical_sensor_test_event message to publish
|
||||
// a test completion event.
|
||||
// 2. The test_passed field in sns_physical_sensor_test_event is used to output the
|
||||
// pass/fail result of self-test execution.
|
||||
// 3. The test_data field in sns_physical_sensor_test_event could be used to output any
|
||||
// driver-specific error data.
|
||||
@@ -1,68 +0,0 @@
|
||||
// @file sns_ambient_temperature.proto
|
||||
//
|
||||
// Defines the API for Ambient Temperature Sensors.
|
||||
// All Ambient Temperature Sensor drivers are required to comply with this API.
|
||||
// Any new functionality for Ambient Temperature Sensor can be defined in a
|
||||
// device specific API file.
|
||||
//
|
||||
// Copyright (c) 2016-2018 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std_sensor.proto";
|
||||
import "sns_physical_sensor_test.proto";
|
||||
import "sns_cal.proto";
|
||||
|
||||
// Attribute requirements:
|
||||
// The Ambient Temperature Sensor publishes:
|
||||
// 1. SNS_STD_SENSOR_ATTRID_TYPE attribute value as "ambient_temperature".
|
||||
// 2. SNS_STD_SENSOR_ATTRID_RESOLUTIONS attribute value in degrees Celsius/LSB.
|
||||
// 3. SNS_STD_SENSOR_ATTRID_RANGES attribute values in degrees Celsius unit.
|
||||
// 4. The ambient_temperature sensor is an on-change sensor.
|
||||
// 5. The SNS_STD_SENSOR_ATTRID_RATES attribute is not applicable
|
||||
// since this is an on-change sensor.
|
||||
// 6. See sns_std_sensor.proto for other attributes.
|
||||
|
||||
// Handling stream requests:
|
||||
// 1. The Ambient Temperature Sensor handles the SNS_STD_SENSOR_MSGID_SNS_STD_ON_CHANGE_CONFIG
|
||||
// message ID for all stream enable/update requests.
|
||||
// 2. If the physical sensor supports hardware FIFO then the Ambient Temperature
|
||||
// Sensor uses batching_period item in sns_std_request as the requested
|
||||
// batching rate to determine hardware FIFO watermark.
|
||||
|
||||
// Handling stream events:
|
||||
// 1. The Ambient Temperature Sensor publishes data stream events using the
|
||||
// sns_std_sensor_event message.
|
||||
// 2. Each stream event contains one output data field where data is
|
||||
// factory calibrated and ordered as:
|
||||
// data[0] = Ambient Temperature data in degrees Celsius
|
||||
// 3. Each stream event publishs an accuracy field:
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_UNRELIABLE to mark invalid samples when hardware is
|
||||
// yet to stabilize after the sensor is configured.
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_ACCURACY_HIGH to mark samples when they are valid.
|
||||
// 4. The Ambient Temperature Sensor publishes a configuration event using the
|
||||
// sns_std_sensor_physical_config_event message.
|
||||
// It publishes this event each time there is change in hardware config of the sensor
|
||||
// and contains current physical sensor config of the sensor.
|
||||
// 5. The Ambient Temperature Sensor publishes a factory calibration event using the
|
||||
// sns_cal_event message. It uses bias and scale_factor fields in this event.
|
||||
// It publishes this event each time there is change in it's factory calibration
|
||||
// data or when a client sends a new streaming request.
|
||||
|
||||
// Handling self-test requests:
|
||||
// 1. The Ambient Temperature Sensor implements SNS_PHYSICAL_SENSOR_TEST_TYPE_COM test
|
||||
// type using the physical sensor test API.
|
||||
// 2. The Ambient Temperature Sensor implements SNS_PHYSICAL_SENSOR_TEST_TYPE_FACTORY test
|
||||
// type to determine factory calibration parameters using the physical
|
||||
// sensor test API.
|
||||
// 3. The Ambient Temperature Sensor could implement other test types.
|
||||
|
||||
// Handling test events:
|
||||
// 1. The Ambient Temperature Sensor uses sns_physical_sensor_test_event message to publish
|
||||
// a test completion event.
|
||||
// 2. The test_passed field in sns_physical_sensor_test_event is used to output the
|
||||
// pass/fail result of self-test execution.
|
||||
// 3. The test_data field in sns_physical_sensor_test_event could be used to output any
|
||||
// driver-specific error data.
|
||||
@@ -1,51 +0,0 @@
|
||||
|
||||
// @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.
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
// @file sns_aont.proto
|
||||
//
|
||||
// Defines message types for the AONT(Always On Test) Sensor.
|
||||
//
|
||||
// Copyright (c) 2018 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std_sensor.proto";
|
||||
|
||||
// The Always On Test Sensor runs an Always On sensors usecase for stability test coverage
|
||||
|
||||
// Always On Test Sensor Attribute Requirements:
|
||||
// SNS_STD_SENSOR_ATTRID_TYPE: "always_on_test"
|
||||
// SNS_STD_SENSOR_ATTRID_STREAM_TYPE: SNS_STD_SENSOR_STREAM_ON_CHANGE
|
||||
|
||||
// Stream Requests:
|
||||
// - SNS_STD_SENSOR_MSGID_SNS_STD_ON_CHANGE_CONFIG is used to enable the sensor
|
||||
|
||||
// Stream Events:
|
||||
enum sns_aont_msgid
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_AONT_MSGID_SNS_AONT_DATA = 1024;
|
||||
}
|
||||
|
||||
// Data Message
|
||||
// Output data event generated by the aont sensor.
|
||||
message sns_aont_data
|
||||
{
|
||||
// AONT output - Accel data along axis x,y,z in m/s2
|
||||
repeated float aont = 1 [(nanopb).max_count = 3];
|
||||
}
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
// @file sns_basic_gestures.proto
|
||||
//
|
||||
// Defines message types for the the basic_gestures sensor
|
||||
//
|
||||
// Copyright (c) 2017 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
|
||||
// Basic Gestures algorithm provides the ability to detect a Push, Pull,
|
||||
// or Shake gesture.
|
||||
// Basic Gestures reports "Axis Unknown", when the direction of a shake cannot
|
||||
// be reliably determined.
|
||||
|
||||
// Basic gestures Sensor Attribute Requirements:
|
||||
// SNS_STD_SENSOR_ATTRID_TYPE: "basic_gestures"
|
||||
// SNS_STD_SENSOR_ATTRID_STREAM_TYPE: SNS_STD_SENSOR_STREAM_TYPE_ON_CHANGE
|
||||
|
||||
// Stream Requests:
|
||||
// - SNS_BASIC_GESTURES_MSGID_SNS_BASIC_GESTURES_CONFIG is used to enable the sensor
|
||||
|
||||
// Message IDs for Basic gestures Sensor
|
||||
enum sns_basic_gestures_msgid
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
SNS_BASIC_GESTURES_MSGID_SNS_BASIC_GESTURES_CONFIG = 512;
|
||||
SNS_BASIC_GESTURES_MSGID_SNS_BASIC_GESTURES_EVENT = 1024;
|
||||
}
|
||||
//To mask Basic gesture algorithm output states
|
||||
enum sns_basic_gestures_event_mask
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
// For masking push and pull states
|
||||
SNS_BASIC_GESTURES_EVENT_MASK_PUSH_AND_PULL = 1;
|
||||
// For masking shake left and right states
|
||||
SNS_BASIC_GESTURES_EVENT_MASK_SHAKE_LEFT_AND_RIGHT = 2;
|
||||
// For masking shake top and bottom states
|
||||
SNS_BASIC_GESTURES_EVENT_MASK_SHAKE_TOP_AND_BOTTOM = 4;
|
||||
//For masking shake other state
|
||||
SNS_BASIC_GESTURES_EVENT_MASK_SHAKE_OTHER = 8;
|
||||
}
|
||||
// Device Basic gesture detected by Basic gestures sensor
|
||||
enum sns_basic_gestures_event_type
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
//Phone is pulled away from the user in a direction perpendicular to the screen
|
||||
SNS_BASIC_GESTURES_EVENT_TYPE_PUSH = 1;
|
||||
//Phone is pulled toward the user in a direction perpendicular to the screen
|
||||
SNS_BASIC_GESTURES_EVENT_TYPE_PULL = 2;
|
||||
//Phone is shaken toward the left
|
||||
SNS_BASIC_GESTURES_EVENT_TYPE_SHAKE_LEFT = 3;
|
||||
//Phone is shaken toward the right
|
||||
SNS_BASIC_GESTURES_EVENT_TYPE_SHAKE_RIGHT = 4;
|
||||
//Phone is shaken toward the top
|
||||
SNS_BASIC_GESTURES_EVENT_TYPE_SHAKE_TOP = 5;
|
||||
//Phone is shaken toward the bottom
|
||||
SNS_BASIC_GESTURES_EVENT_TYPE_SHAKE_BOTTOM = 6;
|
||||
//Phone is shaken, but phone shake direction cannot be clearly determined
|
||||
SNS_BASIC_GESTURES_EVENT_TYPE_SHAKE_OTHER = 7;
|
||||
}
|
||||
// Event Message
|
||||
// Output data event generated by the basic_gestures sensor.
|
||||
// Default values of optional fields added in registry
|
||||
message sns_basic_gestures_config
|
||||
{
|
||||
//Sleep time in seconds
|
||||
optional float sleep = 1;
|
||||
//Push threshold m/s/s(default = 1.5G),where G=9.81188
|
||||
//min_push_threshold:1G, max_push_threshold:5G
|
||||
optional float push_threshold = 2;
|
||||
//Pull threshold m/s/s (default = 1.5G)
|
||||
//min_pull_threshold:1G, max_pull_threshold:5G
|
||||
optional float pull_threshold = 3;
|
||||
//Shake threshold m/s/s(default = 1.5G)
|
||||
//min_shake_threshold:1G, max_shake_threshold:5G
|
||||
optional float shake_threshold = 4;
|
||||
//For masking output events.
|
||||
//By default, All states reported.
|
||||
//Client should use sns_basic_gestures_event_mask fields for masking,
|
||||
//specific events
|
||||
//Example: If client doesn't want push and pull events,then,
|
||||
//client updates event_mask with SNS_BASIC_GESTURES_EVENT_MASK_PUSH_AND_PULL
|
||||
//event_mask |= SNS_BASIC_GESTURES_EVENT_MASK_PUSH_AND_PULL;
|
||||
optional bytes event_mask = 5;
|
||||
}
|
||||
|
||||
// Event Message
|
||||
// Output data event generated by the basic_gestures sensor.
|
||||
message sns_basic_gestures_event
|
||||
{
|
||||
// basic_gestures sensor state info
|
||||
required sns_basic_gestures_event_type state=1;
|
||||
}
|
||||
|
||||
// Stream events:
|
||||
//
|
||||
// The sns_basic_gestures_event message is used to publish updated state
|
||||
//
|
||||
// Basic_gestures sensor does not publish configuration events.
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
// @file sns_bring_to_ear.proto
|
||||
//
|
||||
// Defines message types for the the Bring_To_Ear 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";
|
||||
|
||||
// Bring_to_ear sensor detects bring to ear event,
|
||||
// When a device has been held in a face-up position,
|
||||
// afterwhich the device is brought to the user's ear, with the top of the device facing upwards.
|
||||
|
||||
// Bring to ear Sensor Attribute Requirements:
|
||||
// SNS_STD_SENSOR_ATTRID_TYPE: "bring_to_ear"
|
||||
// SNS_STD_SENSOR_ATTRID_STREAM_TYPE: SNS_STD_SENSOR_STREAM_TYPE_ON_CHANGE
|
||||
//
|
||||
// ## Request Message: SNS_STD_SENSOR_MSGID_SNS_STD_ON_CHANGE_CONFIG
|
||||
// No configuration is available for this sensor.
|
||||
|
||||
// ## Event Message: SNS_BRING_TO_EAR_MSGID_SNS_BRING_TO_EAR_EVENT
|
||||
// Reported upon new detection of bring_to_ear event
|
||||
|
||||
|
||||
// Message IDs for Bring to ear Sensor
|
||||
enum sns_bring_to_ear_msgid
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
// Empty Message
|
||||
SNS_BRING_TO_EAR_MSGID_SNS_BRING_TO_EAR_EVENT = 1024;
|
||||
}
|
||||
|
||||
// Stream events:
|
||||
//
|
||||
// The sns_bring_to_ear_event message is used to publish updated state
|
||||
//
|
||||
// Bring_to_ear sensor does not publish configuration events.
|
||||
|
||||
118
proprietary/vendor/etc/sensors/proto/sns_cal.proto
vendored
118
proprietary/vendor/etc/sensors/proto/sns_cal.proto
vendored
@@ -1,118 +0,0 @@
|
||||
// @file sns_cal.proto
|
||||
//
|
||||
// Defines standard message types pertaining to calibration
|
||||
//
|
||||
// Copyright (c) 2016-2018 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std_sensor.proto";
|
||||
|
||||
// For dynamic calibration supported by Calibration Sensors:
|
||||
// Client will use the standard on change config message id to enable
|
||||
// Calibration Sensor. Calibration algorithms are inherently on change in
|
||||
// behavior.
|
||||
|
||||
// For both dynamic calibration supported by Calibration Sensors &
|
||||
// factory calibration supported by Physical Sensors:
|
||||
// Client can send an empty request with the msg id for reset
|
||||
// to reset the calibration parameters.
|
||||
enum sns_cal_msgid
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
SNS_CAL_MSGID_SNS_CAL_RESET = 512;
|
||||
SNS_CAL_MSGID_SNS_CAL_EVENT = 1022;
|
||||
}
|
||||
|
||||
// Calibration Event
|
||||
// Used as an output data event by Calibration Sensors to convey
|
||||
// dynamic calibration estimates and
|
||||
// as a config event by Physical Sensors to convey factory calibration
|
||||
// being applied
|
||||
//
|
||||
// A) The data field of the sns_cal_event message
|
||||
//
|
||||
// 1) float bias[] (Nx1 vector)
|
||||
// The zero bias (B) correction subtracted to get calibrated sample.(Nx1 vector)
|
||||
//
|
||||
// 2) float scale_factor (Nx1 vector)
|
||||
// The scaling (SF) to be done before doing any bias correction.
|
||||
//
|
||||
// 3) float comp_matrix (NxN matrix)
|
||||
// The compensation matrix (CM). The matrix elements are in row major order ie:
|
||||
// CM = CM0 CM1 CM2
|
||||
// CM3 CM4 CM5
|
||||
// CM6 CM7 CM8
|
||||
//
|
||||
// The calibrated sample (Sc) is computed as following.
|
||||
//
|
||||
// if SF, B and CM are available,
|
||||
//
|
||||
// Sc = CM * ((S .* SF) - B)
|
||||
//
|
||||
// if only B and CM are available,
|
||||
//
|
||||
// Sc = CM * (S - B)
|
||||
//
|
||||
// if only SF and B are available,
|
||||
//
|
||||
// Sc = ((S .* SF) - B)
|
||||
//
|
||||
// if only SF is available,
|
||||
//
|
||||
// Sc = S .* SF
|
||||
//
|
||||
// if only B is available,
|
||||
//
|
||||
// Sc = (S - B)
|
||||
//
|
||||
// if only CM is available
|
||||
//
|
||||
// Sc = CM * S
|
||||
//
|
||||
// where:
|
||||
// Sc = Calibrated sensor sample
|
||||
// S = Sensor sample (Nx1 vector)
|
||||
// SF = Scaling factor to be applied to S
|
||||
// CM = compensation_matrix
|
||||
// B = bias
|
||||
// "*" represents matrix multiplication
|
||||
// ".*" represents element-by-element multiplication
|
||||
//
|
||||
//
|
||||
// B) The status field of the sns_std_sensor_event message contains
|
||||
// the quality of calibration defined by sns_std_sensor_sample_status as
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_UNRELIABLE = 0; // Sample is unreliable.
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_ACCURACY_LOW = 1; // Sample is low accuracy.
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_ACCURACY_MEDIUM = 2;// Sample is medium accuracy.
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_ACCURACY_HIGH = 3; // Sample is high accuracy.
|
||||
|
||||
message sns_cal_event
|
||||
{
|
||||
//Optional bias value
|
||||
//If no bias is being published this will be of size 0.
|
||||
//Generic for different axes biases.
|
||||
//Size is defined by axes value inherently.
|
||||
repeated float bias = 1;
|
||||
|
||||
//Optional scaling factor
|
||||
//If no scaling factor is published this will be of size 0.
|
||||
//Size if published is has to be equal to the axes of the data
|
||||
repeated float scale_factor = 2;
|
||||
|
||||
//If no CM is being published this will be of size 0.
|
||||
//Optional CM values .
|
||||
//Size if published should be equal to matrix of size [axes*axes]
|
||||
repeated float comp_matrix = 3;
|
||||
|
||||
// Event sample status.
|
||||
required sns_std_sensor_sample_status status = 4 [default = SNS_STD_SENSOR_SAMPLE_STATUS_UNRELIABLE];
|
||||
|
||||
// Calibration ID, a unique identifier for the calibration set being used
|
||||
// As an example, could be set when there are distinct calibration sets for different
|
||||
// device modes being maintained
|
||||
optional fixed32 cal_id = 5;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
// @file sns_flicker.proto
|
||||
//
|
||||
// Defines the API for Proximity Sensors.
|
||||
// All Proximity Sensor drivers are required to comply with this API.
|
||||
// Any new functionality for Proximity Sensor can be defined in a
|
||||
// device specific API file.
|
||||
//
|
||||
// Copyright (c) 2016-2018 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
//import "sns_std_sensor.proto";
|
||||
//import "sns_physical_sensor_test.proto";
|
||||
//import "sns_cal.proto";
|
||||
|
||||
// Attribute requirements:
|
||||
// The Proximity Sensor publishes:
|
||||
// 1. SNS_STD_SENSOR_ATTRID_TYPE attribute value as "cct".
|
||||
// 2. SNS_STD_SENSOR_ATTRID_RESOLUTIONS attribute is not applicable since this
|
||||
// is an event sensor.
|
||||
// 3. SNS_STD_SENSOR_ATTRID_RANGES attribute values in k unit.
|
||||
// 4. See sns_std_sensor.proto for other attributes.
|
||||
|
||||
// Handling stream requests:
|
||||
// 1. The Proximity Sensor supports both streaming and on-change
|
||||
// modes and the operating mode is configured in the Registry.
|
||||
// 2. The streaming Proximity Sensor handles the sns_std_sensor_config request
|
||||
// for all stream enable/update requests.
|
||||
// 3. The on-change Proximity Sensor handles the
|
||||
// SNS_STD_SENSOR_MSGID_SNS_STD_ON_CHANGE_CONFIG request for
|
||||
// all stream enable/update requests.
|
||||
// 4. In on-change mode the Sensor uses interrupt operation and reports
|
||||
// samples only for NEAR/FAR transitions.
|
||||
|
||||
|
||||
// Message IDs for cct Sensor
|
||||
enum sns_cct_msgid {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
// Uses message: sns_cct_event
|
||||
// Purpose: An output data event from the cct sensor to it's client.
|
||||
SNS_CCT_MSGID_SNS_CCT_EVENT = 882;
|
||||
}
|
||||
|
||||
|
||||
// Events types from cct Sensor
|
||||
message sns_cct_event
|
||||
{
|
||||
required float cct = 1;
|
||||
required int32 red_raw = 2;
|
||||
required int32 green_raw = 3;
|
||||
required int32 blue_raw = 4;
|
||||
required int32 clear_raw = 5;
|
||||
required int32 wband_raw = 6;
|
||||
required float ir_ratio = 7;
|
||||
required float x = 8;
|
||||
required float y = 9;
|
||||
required float lux = 10;
|
||||
required float als_gain = 11;
|
||||
required float a_time = 12;
|
||||
}
|
||||
|
||||
// Handling stream events:
|
||||
// 1. The Proximity Sensor publishes object flicker data stream events
|
||||
// using sns_flicker_event message.
|
||||
// 2. Each stream event publishes an accuracy field:
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_UNRELIABLE to mark invalid samples when hardware is
|
||||
// yet to stabilize after the sensor is configured.
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_ACCURACY_HIGH to mark samples when they are valid.
|
||||
// 3. The Proximity Sensor publishes a configuration event using the
|
||||
// sns_std_sensor_physical_config_event message.
|
||||
// It publishes this event each time there is change in hardware config of the sensor
|
||||
// and contains current physical sensor config of the sensor.
|
||||
|
||||
// Handling self-test requests:
|
||||
// 1. The Proximity Sensor implements SNS_PHYSICAL_SENSOR_TEST_TYPE_COM test
|
||||
// type using the physical sensor test API.
|
||||
// 2. The Proximity Sensor implements SNS_PHYSICAL_SENSOR_TEST_TYPE_FACTORY test
|
||||
// type to determine factory calibration parameters using the physical
|
||||
// sensor test API. The factory test for Proximity Sensor calibrates
|
||||
// the sensor to detect an object (including light and dark colored)
|
||||
// at 5cm distance from the physical sensor.
|
||||
// 3. The Proximity Sensor could implement other test types.
|
||||
|
||||
// Handling test events:
|
||||
// 1. The Proximity Sensor uses sns_physical_sensor_test_event message to publish
|
||||
// a test completion event.
|
||||
// 2. The test_passed field in sns_physical_sensor_test_event is used to output the
|
||||
// pass/fail result of self-test execution.
|
||||
// 3. The test_data field in sns_physical_sensor_test_event could be used to output any
|
||||
// driver-specific error data.
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
// @file sns_client.proto
|
||||
//
|
||||
// Defines the interface between external clients and the Sensors QMI Client
|
||||
// Manager. The Client Manager is the primary path for external clients
|
||||
// to communicate with the SSC.
|
||||
//
|
||||
// Copyright (c) 2016-2018 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std.proto";
|
||||
import "sns_std_type.proto";
|
||||
|
||||
// Message IDs
|
||||
//
|
||||
// Message IDs uniquely identify a particular message amongst all message
|
||||
// supported by a Sensor, both requests and events; they need not be unique
|
||||
// between different Sensors. IDs are subdivided into several reserved pools.
|
||||
// These reservations are made so that Framework components can appropriately
|
||||
// optimize their processing.
|
||||
//
|
||||
// Reserved for Framework use only:
|
||||
// 0-127 - Request Messages
|
||||
// 128-255 - Non-recurrent events (configuration updates, one-time events, etc)
|
||||
// 256-511 - Recurrent and/or periodic events (e.g. sensor samples)
|
||||
//
|
||||
// Sensor use:
|
||||
// 512-767 - Request messages
|
||||
// 768-1023 - Non-recurrent events
|
||||
// 1024-1536 - Recurrent events
|
||||
//
|
||||
// Note that messages serving as request messages can also be sent as
|
||||
// configuration events back to the client (with the same ID). While batching
|
||||
// data for a non-wakeup client, if the AP is in suspend and all batching space
|
||||
// exhausted, the oldest recurrent events may be dropped.
|
||||
|
||||
// Framework-defined message IDs:
|
||||
enum sns_client_msgid {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
// Disable request explicitly handled only on the client interface.
|
||||
SNS_CLIENT_MSGID_SNS_CLIENT_DISABLE_REQ = 10;
|
||||
|
||||
// NOTE: 120-127 Are reserved
|
||||
}
|
||||
|
||||
enum sns_client_delivery {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
// Send events whenever available (at sample rate or batch period)
|
||||
// - If a batch_period larger than system capacity is requested, all data
|
||||
// will be sent upon capacity exhaustion.
|
||||
// - The flush_period will be effectively ignored, as unsent batched
|
||||
// data will not accrue in the buffer.
|
||||
SNS_CLIENT_DELIVERY_WAKEUP = 0;
|
||||
// Send events only when client processor is awake; batch otherwise. Once
|
||||
// the target processor exits suspend, any/all pending events will be sent.
|
||||
SNS_CLIENT_DELIVERY_NO_WAKEUP = 1;
|
||||
}
|
||||
|
||||
|
||||
// Request Message
|
||||
message sns_client_request_msg {
|
||||
// SUID associated with this request; intended destination
|
||||
required sns_std_suid suid = 1;
|
||||
|
||||
// See comment above
|
||||
required fixed32 msg_id = 2;
|
||||
|
||||
// Whether to wakeup the client processor (if it is in suspend), when an
|
||||
// event is generated and ready to send. The Qualcomm Client Manager will
|
||||
// enforce these criteria for all clients; this information is made available
|
||||
// to sensors for optimization purposes only.
|
||||
message suspend_config {
|
||||
// Processor on which the client resides; If a flush occurs for one client
|
||||
// on an external processor, all clients will receive a flush of data.
|
||||
required sns_std_client_processor client_proc_type = 1 [default = SNS_STD_CLIENT_PROCESSOR_APSS];
|
||||
|
||||
// Whether to send events while the specified processor is in suspend.
|
||||
required sns_client_delivery delivery_type = 2 [default = SNS_CLIENT_DELIVERY_WAKEUP];
|
||||
|
||||
//The client expects that, when the message with an id specified in this list
|
||||
//is generated, the message should only be delivered to the client if data is already being delivered
|
||||
//to the processor mentioned above.
|
||||
repeated fixed32 nowakeup_msg_ids = 3;
|
||||
}
|
||||
required suspend_config susp_config = 3;
|
||||
|
||||
// Base message payload; contents will be partially specified by Sensor developer
|
||||
required sns_std_request request = 4;
|
||||
}
|
||||
|
||||
message sns_client_event_msg {
|
||||
// SUID associated with this Event; source of data
|
||||
required sns_std_suid suid = 1;
|
||||
|
||||
// An event generated by a Sensor; used within sns_client_event_msg and SensorBatchMessage
|
||||
message sns_client_event {
|
||||
// See comment above
|
||||
required fixed32 msg_id = 1;
|
||||
|
||||
// Timestamp associated with this event
|
||||
// For most events, this timestamp is specified by the Sensor.
|
||||
// For events generated by the Framework (such as configuration updates or
|
||||
// error events), this timestamp refers to the time at which the event was
|
||||
// created.
|
||||
required fixed64 timestamp = 2;
|
||||
|
||||
// Dynamic length payload, containing the actual data/event
|
||||
// This payload will need to be decoded separately, using the Sensor-specific
|
||||
// header file
|
||||
required bytes payload = 3;
|
||||
}
|
||||
repeated sns_client_event events = 2;
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
|
||||
// @file sns_cmc.proto
|
||||
//
|
||||
// Defines message types for the Coarse Motion Classifier (CMC) 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";
|
||||
|
||||
|
||||
// CMC Sensor Attribute Requirements:
|
||||
// SNS_STD_SENSOR_ATTRID_TYPE: "coarse_motion_classifier"
|
||||
// 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 CMC Sensor
|
||||
enum sns_cmc_msgid {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_CMC_MSGID_SNS_CMC_EVENT = 772;
|
||||
}
|
||||
|
||||
// Gives the state which the algorithm is capable
|
||||
// of detecting
|
||||
enum sns_cmc_motion_state
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
// stated with 1 to match with algo where 0
|
||||
// is for UNKNOWN
|
||||
SNS_CMC_STATIONARY = 1;
|
||||
SNS_CMC_MOVE = 2;
|
||||
SNS_CMC_FIDDLE = 3;
|
||||
SNS_CMC_PEDESTRIAN = 4;
|
||||
SNS_CMC_VEHICLE = 5;
|
||||
SNS_CMC_WALK = 6;
|
||||
SNS_CMC_RUN = 7;
|
||||
SNS_CMC_BIKE = 8;
|
||||
}
|
||||
|
||||
// Gives the information about the states represented
|
||||
// by sns_cmc_motion_state
|
||||
enum sns_cmc_motion_state_event
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
// when any state of any of the motion state cannot
|
||||
// be determined. The first event of first client will
|
||||
// typically have all states as SNS_MS_UNKNOWN
|
||||
SNS_MS_UNKNOWN = 0;
|
||||
// A given motion state is ACTIVE
|
||||
SNS_MS_ACTIVE = 1;
|
||||
// A given motion state is INACTIVE
|
||||
SNS_MS_INACTIVE = 2;
|
||||
}
|
||||
|
||||
message sns_cmc_event
|
||||
{
|
||||
message data
|
||||
{
|
||||
// motion state by CMC
|
||||
required sns_cmc_motion_state ms_state = 1;
|
||||
|
||||
// gives UNKNOWN/ACTIVE/INACTIVE information for the motion state
|
||||
required sns_cmc_motion_state_event ms_state_event = 2 [default = SNS_MS_UNKNOWN];
|
||||
}
|
||||
|
||||
repeated data events = 1;
|
||||
}
|
||||
|
||||
// Stream events:
|
||||
//
|
||||
// The sns_cmc_event message is used to publish updated state
|
||||
//
|
||||
// CMC does not publish configuration events.
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
// @file sns_da_test.proto
|
||||
//
|
||||
// Defines the API for communicating with the Driver acceptance
|
||||
// test sensor.
|
||||
// This is to used by the linux command line partner application
|
||||
// to send string messages to the sns_da_test_sensor
|
||||
//
|
||||
// Copyright (c) 2017, 2020 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
|
||||
enum sns_da_test_msgid {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
SNS_DA_TEST_MSGID_SNS_DA_TEST_REQ = 512;
|
||||
SNS_DA_TEST_MSGID_SNS_DA_TEST_LOG = 768;
|
||||
SNS_DA_TEST_MSGID_SNS_DA_TEST_EVENT = 1024;
|
||||
}
|
||||
|
||||
//This message contains the test parameters as a single string in the format below
|
||||
//-testcase=<not_mandatory> -sample_rate=< any +tive value > -sensor=<data_type>
|
||||
//-duration=< any +tive value in seconds> -batch_period=<+tive value in seconds>
|
||||
message sns_da_test_req {
|
||||
optional string test_args = 1;
|
||||
}
|
||||
|
||||
//This message contains any return data from the test driver including PASS/FAIL
|
||||
//msg. and explainations if applicable
|
||||
message sns_da_test_event {
|
||||
optional string test_event = 1;
|
||||
}
|
||||
|
||||
// Sensor State log message
|
||||
// This definition is used by da_test sensor to log test
|
||||
// information when publishing sensor api event
|
||||
message sns_da_test_log {
|
||||
//Time elapsed between streaming start request time and first sample received
|
||||
required uint64 time_to_first_event = 1;
|
||||
|
||||
//Time elapsed between streaming stop request time and last sample received
|
||||
required sfixed32 time_to_last_event = 2;
|
||||
|
||||
//Time when last sample was received
|
||||
required uint64 sample_ts = 3;
|
||||
|
||||
//Total number of samples received
|
||||
required uint32 total_samples = 4;
|
||||
|
||||
//time delta between samples avegraged over number of samples
|
||||
required uint32 avg_delta = 5;
|
||||
|
||||
//configures sample rate received in the SNS_STD_SENSOR_PHYSICAL_CONFIG_EVENT
|
||||
required sfixed32 recvd_phy_config_sample_rate = 6;
|
||||
|
||||
//random seed used by the da_test instance
|
||||
optional uint64 random_seed_used = 7;
|
||||
|
||||
//The number of std_req sent out by this instance of da_test
|
||||
optional uint32 num_request_sent = 8;
|
||||
|
||||
//timestamp of first sample received on da_test
|
||||
optional uint64 first_sample_timestamp = 9;
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
// @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.
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
// @file sns_device_orient.proto
|
||||
//
|
||||
// Defines the API for the Device Orientation sensors
|
||||
//
|
||||
// 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";
|
||||
|
||||
// A device orientation sensor reports the current orientation of the device.
|
||||
//
|
||||
// Minor or transient rotations should not cause a new event to be reported,
|
||||
// and this sensor should only be implemented with the help of an accelerometer.
|
||||
// Moving the device to an orientation where the Z axis is vertical (either up
|
||||
// or down) should not cause a new event to be reported.
|
||||
|
||||
// ## Device Orientation sensor attributes:
|
||||
// SNS_STD_SENSOR_ATTRID_TYPE is "device_orient"
|
||||
//
|
||||
// ## Request Message: SNS_STD_SENSOR_MSGID_SNS_STD_ON_CHANGE_CONFIG
|
||||
// No configuration is available for this sensor.
|
||||
//
|
||||
// ## Event Message: SNS_DEVICE_ORIENT_MSGID_SNS_DEVICE_ORIENT_EVENT
|
||||
|
||||
// Message IDs for Device Orientation Sensor
|
||||
enum sns_device_orient_msgid {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_DEVICE_ORIENT_MSGID_SNS_DEVICE_ORIENT_EVENT = 776;
|
||||
}
|
||||
|
||||
enum sns_device_orient_event_type
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_DEVICE_ORIENT_EVENT_TYPE_UNKNOWN = -1;
|
||||
// Device is in default orientation (Y axis is vertical and points up)
|
||||
SNS_DEVICE_ORIENT_EVENT_TYPE_DEFAULT = 0;
|
||||
// Device is rotated 90 degrees counter-clockwise from default orientation
|
||||
// (X axis is vertical and points up)
|
||||
SNS_DEVICE_ORIENT_EVENT_TYPE_POS_1 = 1;
|
||||
// Device is rotated 180 degrees from default orientation (Y axis is
|
||||
// vertical and points down)
|
||||
SNS_DEVICE_ORIENT_EVENT_TYPE_POS_2 = 2;
|
||||
// Device is rotated 90 degrees clockwise from default orientation (X axis
|
||||
// is vertical and points down)
|
||||
SNS_DEVICE_ORIENT_EVENT_TYPE_POS_3 = 3;
|
||||
}
|
||||
|
||||
message sns_device_orient_event
|
||||
{
|
||||
// Detected state
|
||||
required sns_device_orient_event_type state = 1;
|
||||
}
|
||||
433
proprietary/vendor/etc/sensors/proto/sns_diag.proto
vendored
433
proprietary/vendor/etc/sensors/proto/sns_diag.proto
vendored
@@ -1,433 +0,0 @@
|
||||
// @file sns_diag.proto
|
||||
//
|
||||
// Defines log messages used by the sensors diag service
|
||||
//
|
||||
// Copyright (c) 2016-2020 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std.proto";
|
||||
import "sns_std_sensor.proto";
|
||||
import "sns_client.proto";
|
||||
|
||||
// Batch Sample Type
|
||||
enum sns_diag_batch_sample_type
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
// This is the only sample in the batch
|
||||
SNS_DIAG_BATCH_SAMPLE_TYPE_ONLY = 0;
|
||||
|
||||
// This is the first sample of the batch
|
||||
SNS_DIAG_BATCH_SAMPLE_TYPE_FIRST = 1;
|
||||
|
||||
// This is an intermediate sample of the batch
|
||||
SNS_DIAG_BATCH_SAMPLE_TYPE_INTERMEDIATE = 2;
|
||||
|
||||
// This is the last sample of the batch
|
||||
SNS_DIAG_BATCH_SAMPLE_TYPE_LAST = 3;
|
||||
}
|
||||
|
||||
// Sensor Interrupts
|
||||
enum sns_diag_interrupt
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
// Interrupt caused by detection of a threshold being
|
||||
// exceeded
|
||||
SNS_DIAG_INTERRUPT_THRESHOLD = 0;
|
||||
|
||||
// Interrupt caused by detection of movement of the device
|
||||
SNS_DIAG_INTERRUPT_MOTION = 1;
|
||||
|
||||
// Interrupt caused by detection of tilting of the device
|
||||
SNS_DIAG_INTERRUPT_TILT = 2;
|
||||
|
||||
// Interrupt caused by detection of free fall
|
||||
SNS_DIAG_INTERRUPT_FREE_FALL = 3;
|
||||
|
||||
// Interrupt caused by detection of double-tap
|
||||
SNS_DIAG_INTERRUPT_DOUBLE_TAP= 4;
|
||||
|
||||
// Interrupt caused by detection of acceleration shock
|
||||
SNS_DIAG_INTERRUPT_SHOCK = 5;
|
||||
|
||||
// Interrupt caused by CCD AMD
|
||||
SNS_DIAG_INTERRUPT_CCD_AMD = 6;
|
||||
|
||||
// Interrupt caused by CCD WALK
|
||||
SNS_DIAG_INTERRUPT_CCD_WALK = 7;
|
||||
|
||||
// Interrupt caused by CCD TILT
|
||||
SNS_DIAG_INTERRUPT_CCD_TILT = 8;
|
||||
|
||||
// Interrupt caused by CCD TE0
|
||||
SNS_DIAG_INTERRUPT_CCD_TE0 = 9;
|
||||
|
||||
// Interrupt caused by CCD TE1
|
||||
SNS_DIAG_INTERRUPT_CCD_TE1 = 10;
|
||||
|
||||
// Interrupt caused by CCD TE2
|
||||
SNS_DIAG_INTERRUPT_CCD_TE2 = 11;
|
||||
}
|
||||
|
||||
// Opaque Payload
|
||||
// This message defines the fields used to log an undefined payload
|
||||
message sns_diag_opaque_payload
|
||||
{
|
||||
required bytes payload = 1;
|
||||
}
|
||||
|
||||
// Batch Sample
|
||||
// This message defines the fields used to log batched data.
|
||||
message sns_diag_batch_sample
|
||||
{
|
||||
// Indicates if the sample is the first, intermediate, last or only
|
||||
// sample of a batch
|
||||
required sns_diag_batch_sample_type sample_type = 1 [default = SNS_DIAG_BATCH_SAMPLE_TYPE_ONLY];
|
||||
|
||||
// Timestamp of the sensor state data sample
|
||||
required fixed64 timestamp = 2;
|
||||
|
||||
// Sensor state data sample
|
||||
repeated float sample = 3;
|
||||
|
||||
// Data status.
|
||||
required sns_std_sensor_sample_status status = 4 [default = SNS_STD_SENSOR_SAMPLE_STATUS_UNRELIABLE];
|
||||
}
|
||||
|
||||
// Sensor State Hardware Interrupt Log Packet
|
||||
// This message defines the fields used to log sensor state information
|
||||
// pertaining to hardware interrupts
|
||||
// This message is used as the payload field of sns_diag_sensor_log
|
||||
message sns_diag_sensor_state_interrupt
|
||||
{
|
||||
// Type of sensor hardware interrupt
|
||||
required sns_diag_interrupt interrupt = 1;
|
||||
|
||||
// Timestamp when the interrupt occurred
|
||||
required fixed64 timestamp = 2;
|
||||
}
|
||||
|
||||
// Sensor State Raw
|
||||
// This message defines the fields used to log sensor state information
|
||||
// pertaining to raw uncalibrated physical sensor data.
|
||||
// This message is used as the payload field of sns_diag_sensor_log
|
||||
message sns_diag_sensor_state_raw
|
||||
{
|
||||
repeated sns_diag_batch_sample sample = 1;
|
||||
}
|
||||
|
||||
// Client API Response Message
|
||||
message sns_diag_client_resp_msg
|
||||
{
|
||||
// The error response sent to the client
|
||||
required sns_std_error error = 1;
|
||||
}
|
||||
|
||||
// Client API log packet
|
||||
// This message defines the fields to log all
|
||||
// Request, Response and Event messages at the Client API
|
||||
// This message is used as the payload field of sns_diag_sensor_log
|
||||
message sns_diag_client_api_log
|
||||
{
|
||||
// The client id that identifies the client connection
|
||||
required fixed64 client_id = 1;
|
||||
|
||||
// Data type of the source sensor
|
||||
required string src_sensor_type = 2;
|
||||
|
||||
// The Client API log packet payload
|
||||
oneof client_api_log_payload
|
||||
{
|
||||
// Client API Request message as defined in sns_client.proto
|
||||
sns_client_request_msg request_payload = 100;
|
||||
|
||||
// Client API Event message as defined in sns_client.proto
|
||||
sns_client_event_msg event_payload = 101;
|
||||
|
||||
// Client API Response message as defined in sns_diag.proto
|
||||
sns_diag_client_resp_msg resp_payload = 102;
|
||||
}
|
||||
}
|
||||
|
||||
// Sensor API log packet
|
||||
// This message defines the fields to log all Request and
|
||||
// Event messages at the Sensor API
|
||||
// This message is used as the payload field of sns_diag_sensor_log
|
||||
message sns_diag_sensor_api_log
|
||||
{
|
||||
// The message id of the message being logged
|
||||
required fixed32 message_id = 1;
|
||||
|
||||
// Timestamp associated with this message
|
||||
required fixed64 timestamp = 2;
|
||||
|
||||
// Data stream associated with this message
|
||||
optional fixed64 stream_id = 3;
|
||||
|
||||
// The Sensor API log packet payload
|
||||
oneof sensor_api_log_payload
|
||||
{
|
||||
// Sensor API Event message containing sensor specific event message
|
||||
// as defined in the sensor's proto api file
|
||||
sns_diag_opaque_payload opaque_payload = 100;
|
||||
|
||||
// Sensor API Request message as defined in sns_std.proto
|
||||
sns_std_request request_payload = 101;
|
||||
}
|
||||
}
|
||||
|
||||
// Sensor log packet
|
||||
// This message defines the fields to log all sensor specific
|
||||
// messages. This includes Sensor API messages, Client API messages,
|
||||
// HW Interrupt messages, Sensor State messages
|
||||
message sns_diag_sensor_log
|
||||
{
|
||||
// Log ID for the log packet
|
||||
required fixed32 log_id = 1;
|
||||
|
||||
// Timestamp when log packet.was generated
|
||||
required fixed64 timestamp = 2;
|
||||
|
||||
// Sensor UID for the log packet
|
||||
required sns_std_suid suid = 3;
|
||||
|
||||
// Data type provided by the Sensor UID
|
||||
required string sensor_type = 4;
|
||||
|
||||
// The instance id of the sensor to which this
|
||||
// message was passed to or obtained from
|
||||
required fixed64 instance_id = 5;
|
||||
|
||||
// The log packet payload
|
||||
oneof sensor_log_payload
|
||||
{
|
||||
// Sensor specific Sensor State Algo message
|
||||
sns_diag_opaque_payload opaque_payload = 100;
|
||||
|
||||
// Sensor API message
|
||||
sns_diag_sensor_api_log sensor_api_payload = 101;
|
||||
|
||||
// Client API message
|
||||
sns_diag_client_api_log client_api_payload = 102;
|
||||
|
||||
// Sensor State Raw message
|
||||
sns_diag_sensor_state_raw sensor_state_raw_payload = 103;
|
||||
|
||||
// Sensor State Hardware Interrupt message
|
||||
sns_diag_sensor_state_interrupt sensor_state_interrupt_payload = 104;
|
||||
}
|
||||
}
|
||||
|
||||
// Sensor Instance Mapping Log Packet
|
||||
// This message defines the fields used to log sensor instance mapping
|
||||
// information. This message is used as the payload field of sns_diag_fw_log
|
||||
message sns_diag_instance_map_log
|
||||
{
|
||||
// The instance id of the source sensor instance
|
||||
required fixed64 src_instance_id = 1;
|
||||
|
||||
// Array of destination Sensor Instance IDs or Sensor IDs that the
|
||||
// source sensor instance is feeding to.
|
||||
// If no destination instance ids are specified it signifies
|
||||
// deletion of the source instance
|
||||
repeated fixed64 dest_instance_id = 2;
|
||||
|
||||
// Array of data stream ids that the
|
||||
// source sensor instance is feeding to
|
||||
repeated fixed64 stream_id = 3;
|
||||
}
|
||||
|
||||
// Island mode states
|
||||
enum sns_diag_island_state
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
// In Island mode
|
||||
SNS_DIAG_ISLAND_STATE_IN_ISLAND_MODE = 0;
|
||||
|
||||
// Not in Island Mode
|
||||
SNS_DIAG_ISLAND_STATE_NOT_IN_ISLAND_MODE = 1;
|
||||
|
||||
// Island mode disabled
|
||||
SNS_DIAG_ISLAND_STATE_ISLAND_DISABLED = 2;
|
||||
}
|
||||
|
||||
// Island mode transition Log Packet
|
||||
// This message defines the fields used to log
|
||||
// transitions into and out of island mode
|
||||
//
|
||||
// This log packet is generated each time the system transitions into or out
|
||||
// of island mode or when island mode is disabled or when triggered by
|
||||
// a request to the diag sensor
|
||||
//
|
||||
// This message is used as the payload field of sns_diag_fw_log
|
||||
message sns_diag_island_transition_log
|
||||
{
|
||||
// Timestamp of the transition
|
||||
//
|
||||
// When logpacket is triggered, this timestamp will retain
|
||||
// the timestamp when the current state became effective.
|
||||
required fixed64 timestamp = 1;
|
||||
|
||||
// Island state after transition is completed
|
||||
required sns_diag_island_state island_state = 2;
|
||||
|
||||
// User defined cookie
|
||||
// Used by test scripts to identify logs triggered
|
||||
// by messages sent to the SSC
|
||||
optional fixed64 cookie = 3;
|
||||
|
||||
// Total time system spent in island since device boot(micro seconds)
|
||||
optional fixed64 total_island_time = 4;
|
||||
}
|
||||
|
||||
// Island exit vote Log Packet
|
||||
// This message defines the fields used to log vote for island mode exits.
|
||||
//
|
||||
// This log packet is generated at each call to island_exit()
|
||||
message sns_diag_island_exit_vote_log
|
||||
{
|
||||
// Timestamp
|
||||
required fixed64 timestamp = 1;
|
||||
|
||||
// SUID of the Sensor responsible for the vote
|
||||
optional sns_std_suid sensor = 2;
|
||||
}
|
||||
|
||||
// Heap IDs
|
||||
enum sns_diag_heap_id
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
// Primary Heap
|
||||
SNS_DIAG_HEAP_ID_HEAP_MAIN = 0;
|
||||
|
||||
// Island Heap
|
||||
SNS_DIAG_HEAP_ID_HEAP_ISLAND = 1;
|
||||
|
||||
// PRAM Heap
|
||||
SNS_DIAG_HEAP_ID_HEAP_PRAM = 2;
|
||||
|
||||
// EVENT Heap
|
||||
SNS_DIAG_HEAP_ID_HEAP_EVENT = 3;
|
||||
|
||||
// BATCH Heap
|
||||
SNS_DIAG_HEAP_ID_HEAP_BATCH = 4;
|
||||
|
||||
// Event buffer
|
||||
SNS_DIAG_HEAP_ID_EVENT_BUFFER = 100;
|
||||
}
|
||||
|
||||
// Memory status Log Packet
|
||||
// This message defines the fields used to log the memory utilization
|
||||
// This log packet is generated when a request is sent to the diag sensor
|
||||
message sns_diag_mem_utilization_log
|
||||
{
|
||||
// Timestamp
|
||||
required fixed64 timestamp = 1;
|
||||
|
||||
// Heap ID
|
||||
required sns_diag_heap_id heap_id = 2;
|
||||
|
||||
// Total Memory
|
||||
required fixed32 total_memory = 3;
|
||||
|
||||
// Used Memory
|
||||
required fixed32 used_memory = 4;
|
||||
|
||||
// User defined cookie
|
||||
// Used by test scripts to identify logs triggered
|
||||
// by messages sent to the SSC
|
||||
optional fixed64 cookie = 5;
|
||||
}
|
||||
|
||||
// Event Service status Log Packet
|
||||
// This message defines the fields used to log the memory utilization and
|
||||
// other statistics from the Event Service.
|
||||
// Used only for SW debug; *not guaranteed to be backward compatible*
|
||||
// This log packet is generated when a request is sent to the diag sensor
|
||||
message sns_diag_event_service_log
|
||||
{
|
||||
// Timestamp
|
||||
required fixed64 timestamp = 1;
|
||||
|
||||
// User defined cookie
|
||||
// Used by test scripts to identify logs triggered
|
||||
// by messages sent to the SSC
|
||||
optional fixed64 cookie = 2;
|
||||
|
||||
message heap_stats
|
||||
{
|
||||
enum sns_event_service_heap_id
|
||||
{
|
||||
SNS_EVENT_SERVICE_HEAP_ID_ISLAND = 0;
|
||||
SNS_EVENT_SERVICE_HEAP_ID_MAIN = 1;
|
||||
}
|
||||
// Heap ID
|
||||
required sns_event_service_heap_id heap_id = 1;
|
||||
|
||||
// Total memory available in heap (in blocks)
|
||||
required fixed32 total_memory = 2;
|
||||
|
||||
// Current memory consumption (in blocks)
|
||||
required fixed32 used_memory = 3;
|
||||
|
||||
// Maximum memory consumption since last log packet (in blocks)
|
||||
required fixed32 max_memory = 4;
|
||||
|
||||
// Total clusters available
|
||||
required fixed32 total_clusters = 5;
|
||||
|
||||
// Current number of clusters in use
|
||||
required fixed32 used_clusters = 6;
|
||||
|
||||
// Maximum in-use clusters since last log packet
|
||||
required fixed32 max_clusters = 7;
|
||||
|
||||
// Number of allocation failues since the last DIAG log packet
|
||||
// If Island will result in island exit; else causes dropped samples
|
||||
required fixed32 alloc_failures = 8;
|
||||
|
||||
// Largest event allocation since the last DIAG log packet (in bytes)
|
||||
required fixed32 max_size = 9;
|
||||
}
|
||||
repeated heap_stats stats = 3;
|
||||
}
|
||||
|
||||
// Framework log packet
|
||||
// This message defines the fields to log all framework messages. This
|
||||
// includes memory, island, instance mapping messages.
|
||||
message sns_diag_fw_log
|
||||
{
|
||||
// Log ID for the log packet
|
||||
required fixed32 log_id = 1;
|
||||
|
||||
// Timestamp when log packet.was generated
|
||||
required fixed64 timestamp = 2;
|
||||
|
||||
// The log packet payload
|
||||
oneof fw_log_payload
|
||||
{
|
||||
// Sensor Instance Map message
|
||||
sns_diag_instance_map_log instance_map_payload = 100;
|
||||
|
||||
// Sensor Island Mode
|
||||
sns_diag_island_transition_log island_mode_payload = 101;
|
||||
|
||||
// Sensors Island Exit vote
|
||||
// NOT SUPPORTED YET.
|
||||
sns_diag_island_exit_vote_log island_exit_vote_payload = 102;
|
||||
|
||||
// Sensors Memory Utilization
|
||||
sns_diag_mem_utilization_log memory_utilization_payload = 103;
|
||||
|
||||
// Event Service status log
|
||||
sns_diag_event_service_log event_service_payload = 104;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
// @file sns_diag_sensor.proto
|
||||
//
|
||||
// Defines standard message types to communicate with the
|
||||
// diag service
|
||||
//
|
||||
// Copyright (c) 2017-2018 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std_type.proto";
|
||||
|
||||
enum sns_diag_sensor_msgid {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_DIAG_SENSOR_MSGID_SNS_DIAG_LOG_TRIGGER_REQ = 520;
|
||||
}
|
||||
|
||||
// Log packets that can be triggered by the diag sensor
|
||||
enum sns_diag_triggered_log_type {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
// Triggers generation of sns_diag_island_transition_log
|
||||
// Only one log is generated per request
|
||||
SNS_DIAG_TRIGGERED_LOG_TYPE_ISLAND_LOG = 1;
|
||||
|
||||
// Triggers generation of sns_diag_mem_utilization_log
|
||||
// A single request will generate a log for each separate memory
|
||||
// pool in the system
|
||||
SNS_DIAG_TRIGGERED_LOG_TYPE_MEMORY_USAGE_LOG = 2;
|
||||
}
|
||||
|
||||
// Trigger generation of log packets. Depending upon
|
||||
// the type of log packet that is being triggered,
|
||||
// multiple log packets can be triggered for each
|
||||
// request.
|
||||
//
|
||||
// If the log packet that is triggered has been disabled
|
||||
// no log will be generated.
|
||||
message sns_diag_log_trigger_req {
|
||||
|
||||
// User defined cookie
|
||||
// Used by test scripts to identify logs triggered
|
||||
// by messages sent to the SSC
|
||||
optional fixed64 cookie = 1;
|
||||
|
||||
// The type of log packets that the diag sensor must
|
||||
// generate.
|
||||
required sns_diag_triggered_log_type log_type = 2;
|
||||
}
|
||||
@@ -1,124 +0,0 @@
|
||||
// @file sns_direct_channel.proto
|
||||
//
|
||||
// Defines the Sensors Direct Channel interface that can be used by clients to get sensor data via direct channel
|
||||
//
|
||||
// Copyright (c) 2020 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std_type.proto";
|
||||
import "sns_std.proto";
|
||||
|
||||
// To activate a stream on a channel
|
||||
// " get Channel first by sending sns_direct_channel_create_msg -> then send sns_direct_channel_set_ts_offset -> send sns_direct_channel_set_client_req for sns_direct_channel_stream_id"
|
||||
|
||||
// To activate another stream on existing channel
|
||||
// "Send sns_direct_channel_set_client_req on existing Channel for new sns_direct_channel_stream_id"
|
||||
|
||||
// To update the existing request on the channel
|
||||
// "Send updated sns_direct_channel_set_client_req on existing Channel with already added sns_direct_channel_stream_id"
|
||||
|
||||
// To remove existing request on the channel
|
||||
// "Send sns_direct_channel_remove_client_req on existing Channel for any added sns_direct_channel_stream_id"
|
||||
|
||||
// To update time stamp offset on channel.
|
||||
// "Send sns_direct_channel_set_ts_offset on existing Channel with ts_offset"
|
||||
|
||||
|
||||
enum direct_channel_type {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
// Sensor data from multiple streams can be multiplexed in one channel
|
||||
// Samples are compatible to sensors_event_t format defined by Android Spec
|
||||
// ref: SensorsEventFormatOffset( a.k.a sensors_event_t) at hardware/interfaces/sensors/1.0/types.hal
|
||||
DIRECT_CHANNEL_TYPE_STRUCTURED_MUX_CHANNEL = 0;
|
||||
|
||||
// Sensors Data format expected in Raw bytes only.
|
||||
// Sensors data format is not mandated in the API.
|
||||
// This channel type can be used by clients who know how to interpret the sensor data from respective sensor source.
|
||||
DIRECT_CHANNEL_TYPE_GENERIC_CHANNEL = 1;
|
||||
}
|
||||
|
||||
// stream id for different direct channel streams
|
||||
message sns_direct_channel_stream_id {
|
||||
// sensor responsible for data
|
||||
required sns_std_suid suid = 1;
|
||||
// if set to true, auto calibrated data is generated
|
||||
// if set to false, factory calibrated data is generated
|
||||
optional bool calibrated = 2 [default = true];
|
||||
// if set to true, resampled data is generated at rate which is at most twice the requested rate
|
||||
// if set to false, data is generated at native rate supported by driver, advertised with attributes - SNS_STD_SENSOR_ATTRID_RATES and SNS_STD_SENSOR_ATTRID_ADDITIONAL_LOW_LATENCY_RATES
|
||||
optional bool resampled = 3 [ default = true];
|
||||
}
|
||||
|
||||
|
||||
// Direct channel Creation Request Message
|
||||
message sns_direct_channel_create_msg {
|
||||
// ION fd, size to get Virtual address that can be used by Q6
|
||||
message shared_buffer_config {
|
||||
required fixed32 fd = 1;
|
||||
required fixed32 size = 2;
|
||||
}
|
||||
|
||||
required shared_buffer_config buffer_config = 1;
|
||||
|
||||
// Each channel can be either DIRECT_CHANNEL_TYPE_STRUCTURED_MUX_CHANNEL or DIRECT_CHANNEL_TYPE_GENERIC_CHANNEL
|
||||
// e.g Android Direct Report Channel for DIRECT_CHANNEL_TYPE_STRUCTURED_MUX_CHANNEL
|
||||
required direct_channel_type channel_type = 2 ;
|
||||
|
||||
// Processor hosting the sensor data client
|
||||
// Default processor is Application Processor
|
||||
optional sns_std_client_processor client_proc = 3 [ default = SNS_STD_CLIENT_PROCESSOR_APSS];
|
||||
}
|
||||
|
||||
|
||||
// Client request on Direct Channel
|
||||
message sns_direct_channel_set_client_req {
|
||||
// msg id for sns_std_request, see sns_std.proto for more information.
|
||||
required fixed32 msg_id = 1;
|
||||
|
||||
// unique id for each stream on the channel
|
||||
required sns_direct_channel_stream_id stream_id = 2;
|
||||
|
||||
// generic sns_std_request
|
||||
required sns_std_request request = 3;
|
||||
|
||||
// required attributes for DIRECT_CHANNEL_TYPE_STRUCTURED_MUX_CHANNEL
|
||||
message structured_mux_channel_stream_attributes {
|
||||
// Unique handle per sensor, client has to supply for mapping in sensor hub to "sensor_event_t::sensor" variable
|
||||
required fixed32 sensor_handle = 1;
|
||||
// Corresponds to android sensor type, client has to supply for mapping in sensor hub to "sensor_event_t::type" variable
|
||||
required fixed32 sensor_type = 2;
|
||||
}
|
||||
|
||||
optional structured_mux_channel_stream_attributes attributes = 4;
|
||||
}
|
||||
|
||||
|
||||
// Direct Channel remove client request message
|
||||
message sns_direct_channel_remove_client_req {
|
||||
required sns_direct_channel_stream_id stream_id = 1;
|
||||
}
|
||||
|
||||
|
||||
// Clients interested in Client Time Domain Time Stamp has to supply offset value
|
||||
// direct channel in sensor hub adds this value to its own time domain time stamp to generate Client Time Domain Time Stamp
|
||||
message sns_direct_channel_set_ts_offset {
|
||||
required fixed64 ts_offset = 1;
|
||||
}
|
||||
|
||||
|
||||
// Direct Channel Configuration Message
|
||||
message sns_direct_channel_config_msg {
|
||||
|
||||
oneof channel_config_msg_payload
|
||||
{
|
||||
sns_direct_channel_set_client_req set_client_req = 100;
|
||||
|
||||
sns_direct_channel_remove_client_req remove_client_req = 101;
|
||||
|
||||
sns_direct_channel_set_ts_offset set_ts_offset = 102;
|
||||
}
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
// @file sns_dpc.proto
|
||||
//
|
||||
// Defines message types for the DPC(Device Position Classifier) Sensor.
|
||||
//
|
||||
// Copyright (c) 2017-2018, 2020 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std_sensor.proto";
|
||||
|
||||
// The DPC Sensor provides device position information
|
||||
|
||||
// DPC Sensor Attribute Requirements:
|
||||
// SNS_STD_SENSOR_ATTRID_TYPE: "device_position_classifier"
|
||||
// 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 DPC Sensor
|
||||
enum sns_dpc_msgid {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
//send to new client immediatly to inform current device position
|
||||
SNS_DPC_MSGID_SNS_DPC_EVENT_CONFIG = 777;
|
||||
|
||||
//send when detect device position change
|
||||
SNS_DPC_MSGID_SNS_DPC_EVENT = 1030;
|
||||
}
|
||||
|
||||
// Stream events:
|
||||
//
|
||||
// The sns_dpc_event message is used to publish updated device position
|
||||
// The sns_dpc_event_config message is sent immediately to new client to inform the current device position
|
||||
|
||||
enum sns_dpc_state
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
// when algo cannot identify other states
|
||||
SNS_DPC_UNKNOWN = 1;
|
||||
// User keeps the device steady with display at an angle within +/-15 deg with respect to the horizontal plane
|
||||
SNS_DPC_FLAT_STATIC = 2;
|
||||
// Device is not in FLAT_STATIC state and proximity sensor detects NEAR
|
||||
SNS_DPC_HIDDEN = 3;
|
||||
// User picks up the device
|
||||
SNS_DPC_IN_HAND = 4;
|
||||
// User keeps the device steady with display at an angle greater than +/-15 deg with respect to the horizontal plane
|
||||
SNS_DPC_FACING = 5;
|
||||
}
|
||||
|
||||
// Events types from DPC Sensor
|
||||
message sns_dpc_event
|
||||
{
|
||||
required sns_dpc_state dpc_state = 1;
|
||||
}
|
||||
|
||||
message sns_dpc_event_config
|
||||
{
|
||||
//current dpc state
|
||||
required sns_dpc_state dpc_state = 1;
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
// @file sns_eqm.proto
|
||||
//
|
||||
// Defines standard message types for the eqm
|
||||
//
|
||||
// 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";
|
||||
|
||||
enum sns_eqm_msgid
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_EQM_MSGID_SNS_DATA = 1058;
|
||||
}
|
||||
|
||||
// Configuration Message
|
||||
// Used to either request for a certain configuration of the Sim Sensor or
|
||||
// alter an already existing configuration of the Simulation Sensor
|
||||
// Uses sns_std_sensor_config defined in sns_std_sensor.proto
|
||||
// The message field definitions are as follows:
|
||||
// 1) float sample_rate
|
||||
// containing the required sample rate of the Sim sensor in hertz
|
||||
|
||||
// Data Message
|
||||
// Output data event generated by the eqm sensor.
|
||||
message sns_eqm_data
|
||||
{
|
||||
// todo now upstream 2 data, here should change?
|
||||
required float eqm_state_1 = 1;
|
||||
required float eqm_state_2 = 2;
|
||||
required float eqm_state_3 = 3;
|
||||
required float eqm_state_4 = 4;
|
||||
required float eqm_state_5 = 5;
|
||||
required float eqm_state_6 = 6;
|
||||
required float eqm_state_7 = 7;
|
||||
required float eqm_state_8 = 8;
|
||||
required float eqm_state_9 = 9;
|
||||
required float eqm_state_10 = 10;
|
||||
required float eqm_state_11 = 11;
|
||||
required float eqm_state_12 = 12;
|
||||
required float eqm_state_13 = 13;
|
||||
required float eqm_state_14 = 14;
|
||||
required float eqm_state_15 = 15;
|
||||
required float eqm_state_16 = 16;
|
||||
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
// @file sns_ext_svc.proto
|
||||
//
|
||||
// Sensor provides access to external QMI services.
|
||||
//
|
||||
// This Sensor will create a connection to the external service upon
|
||||
// receipt of the first request. Subsequent requests will be sent upon the
|
||||
// same connection. The connection will be closed after the client closes
|
||||
// the data stream.
|
||||
//
|
||||
// An error event will be sent upon any received error, including upon
|
||||
// the error callback. It is then the responsibility of the client to close
|
||||
// the data stream, and re-open a new one if desired.
|
||||
//
|
||||
// Copyright (c) 2017, 2020 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
|
||||
enum sns_ext_svc_msgid
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
// Send a request message
|
||||
SNS_EXT_SVC_MSGID_SNS_EXT_SVC_REQ = 512;
|
||||
|
||||
// Asynchronously received response message
|
||||
SNS_EXT_SVC_MSGID_SNS_EXT_SVC_RESP = 768;
|
||||
|
||||
// Asynchronously received indication message
|
||||
SNS_EXT_SVC_MSGID_SNS_EXT_SVC_IND = 1024;
|
||||
}
|
||||
|
||||
message sns_ext_svc_req
|
||||
{
|
||||
required uint32 svc_id = 1;
|
||||
|
||||
// QMI/IDL Message ID
|
||||
required int32 msg_id = 2;
|
||||
|
||||
// Client-specified transaction ID, to be returned in sns_ext_svc_resp
|
||||
optional int32 transaction_id = 3;
|
||||
|
||||
// Contains the QMI-decoded request message.
|
||||
required bytes payload = 4;
|
||||
}
|
||||
|
||||
message sns_ext_svc_resp
|
||||
{
|
||||
// QMI/IDL Message ID
|
||||
required int32 msg_id = 1;
|
||||
|
||||
// Transport error, as defined in qmi_client.h; Defaults to QMI_NO_ERR
|
||||
required int32 transp_err = 2;
|
||||
|
||||
// Client-specified transaction ID, as provided in sns_ext_svc_req
|
||||
optional int32 transaction_id = 3;
|
||||
|
||||
// Contains the QMI-decoded response message
|
||||
// May be empty if transport_err != QMI_NO_ERR
|
||||
required bytes payload = 4;
|
||||
}
|
||||
|
||||
message sns_ext_svc_ind
|
||||
{
|
||||
// QMI/IDL Message ID
|
||||
required int32 msg_id = 1;
|
||||
|
||||
// Contains the QMI-decoded indication message.
|
||||
required bytes payload = 2;
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
// @file sns_facing.proto
|
||||
//
|
||||
// Defines message types for the the facing sensor
|
||||
//
|
||||
// Copyright (c) 2017 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std_sensor.proto";
|
||||
|
||||
// Facing calculates face up, down and neutral states. Facing will initially start in an
|
||||
// unknown state, and later transition to face up, down and neutral.
|
||||
// Neutral state reported to client on demand
|
||||
|
||||
// Facing Sensor Attribute Requirements:
|
||||
// SNS_STD_SENSOR_ATTRID_TYPE: "facing"
|
||||
// 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 Facing Sensor
|
||||
enum sns_facing_msgid
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_FACING_MSGID_SNS_FACING_EVENT = 1024;
|
||||
}
|
||||
|
||||
// Device Facing state detected by Facing sensor
|
||||
enum sns_facing_event_state
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
SNS_FACING_EVENT_STATE_UNKNOWN = 0;
|
||||
//Phone has just moved to a facing-up phone posture
|
||||
//which is defined as screen up.
|
||||
SNS_FACING_EVENT_STATE_UP = 1;
|
||||
//Phone has just moved to a facing-down phone posture,
|
||||
//which is defined as screen down.
|
||||
SNS_FACING_EVENT_STATE_DOWN = 2;
|
||||
//Phone has just left either the facing-up
|
||||
//or the facing-down phone posture
|
||||
SNS_FACING_EVENT_STATE_NEUTRAL = 3;
|
||||
}
|
||||
|
||||
// Event Message
|
||||
// Output data event generated by the facing sensor.
|
||||
message sns_facing_event
|
||||
{
|
||||
// Facing sensor state info
|
||||
required sns_facing_event_state state = 1[default = SNS_FACING_EVENT_STATE_UNKNOWN];
|
||||
}
|
||||
|
||||
// Stream events:
|
||||
//
|
||||
// The sns_facing_event message is used to publish updated state
|
||||
//
|
||||
// Facing sensor does not publish configuration events.
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
// @file sns_flicker.proto
|
||||
//
|
||||
// Defines the API for Proximity Sensors.
|
||||
// All Proximity Sensor drivers are required to comply with this API.
|
||||
// Any new functionality for Proximity Sensor can be defined in a
|
||||
// device specific API file.
|
||||
//
|
||||
// Copyright (c) 2016-2018 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std_sensor.proto";
|
||||
import "sns_physical_sensor_test.proto";
|
||||
import "sns_cal.proto";
|
||||
|
||||
// Attribute requirements:
|
||||
// The Proximity Sensor publishes:
|
||||
// 1. SNS_STD_SENSOR_ATTRID_TYPE attribute value as "flicker".
|
||||
// 2. SNS_STD_SENSOR_ATTRID_RESOLUTIONS attribute is not applicable since this
|
||||
// is an event sensor.
|
||||
// 3. SNS_STD_SENSOR_ATTRID_RANGES attribute values in cm unit (flicker distance).
|
||||
// 4. See sns_std_sensor.proto for other attributes.
|
||||
|
||||
// Handling stream requests:
|
||||
// 1. The Proximity Sensor supports both streaming and on-change
|
||||
// modes and the operating mode is configured in the Registry.
|
||||
// 2. The streaming Proximity Sensor handles the sns_std_sensor_config request
|
||||
// for all stream enable/update requests.
|
||||
// 3. The on-change Proximity Sensor handles the
|
||||
// SNS_STD_SENSOR_MSGID_SNS_STD_ON_CHANGE_CONFIG request for
|
||||
// all stream enable/update requests.
|
||||
// 4. In on-change mode the Sensor uses interrupt operation and reports
|
||||
// samples only for NEAR/FAR transitions.
|
||||
|
||||
// Message IDs for flicker Sensor
|
||||
enum sns_flicker_msgid {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
// Uses message: sns_flicker_event
|
||||
// Purpose: An output data event from the flicker sensor to it's client.
|
||||
SNS_FLICKER_MSGID_SNS_FLICKER_EVENT = 769;
|
||||
}
|
||||
|
||||
|
||||
// Events types from flicker Sensor
|
||||
message sns_flicker_event
|
||||
{
|
||||
required int32 flicker_hw = 1;
|
||||
required int32 clear_buffer = 2;
|
||||
|
||||
// Proximity sensor sample status
|
||||
required sns_std_sensor_sample_status status = 3 [default = SNS_STD_SENSOR_SAMPLE_STATUS_UNRELIABLE];
|
||||
repeated float f =4 [(nanopb).max_count = 120];
|
||||
}
|
||||
|
||||
// Handling stream events:
|
||||
// 1. The Proximity Sensor publishes object flicker data stream events
|
||||
// using sns_flicker_event message.
|
||||
// 2. Each stream event publishes an accuracy field:
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_UNRELIABLE to mark invalid samples when hardware is
|
||||
// yet to stabilize after the sensor is configured.
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_ACCURACY_HIGH to mark samples when they are valid.
|
||||
// 3. The Proximity Sensor publishes a configuration event using the
|
||||
// sns_std_sensor_physical_config_event message.
|
||||
// It publishes this event each time there is change in hardware config of the sensor
|
||||
// and contains current physical sensor config of the sensor.
|
||||
|
||||
// Handling self-test requests:
|
||||
// 1. The Proximity Sensor implements SNS_PHYSICAL_SENSOR_TEST_TYPE_COM test
|
||||
// type using the physical sensor test API.
|
||||
// 2. The Proximity Sensor implements SNS_PHYSICAL_SENSOR_TEST_TYPE_FACTORY test
|
||||
// type to determine factory calibration parameters using the physical
|
||||
// sensor test API. The factory test for Proximity Sensor calibrates
|
||||
// the sensor to detect an object (including light and dark colored)
|
||||
// at 5cm distance from the physical sensor.
|
||||
// 3. The Proximity Sensor could implement other test types.
|
||||
|
||||
// Handling test events:
|
||||
// 1. The Proximity Sensor uses sns_physical_sensor_test_event message to publish
|
||||
// a test completion event.
|
||||
// 2. The test_passed field in sns_physical_sensor_test_event is used to output the
|
||||
// pass/fail result of self-test execution.
|
||||
// 3. The test_data field in sns_physical_sensor_test_event could be used to output any
|
||||
// driver-specific error data.
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
// @file sns_fmv.proto
|
||||
//
|
||||
// Defines the API for Filtered Magnetic Vector.
|
||||
//
|
||||
// Copyright (c) 2017-2018 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "sns_std_sensor.proto";
|
||||
|
||||
// A FMV sensor reports the filtered magnetic vector
|
||||
//
|
||||
// ## FMV sensor attributes:
|
||||
// SNS_STD_SENSOR_ATTRID_TYPE is "fmv"
|
||||
//
|
||||
// ## Request Message: sns_std_sensor_config
|
||||
// sns_std_sensor_config::sample_rate is used to specify the sampling rate (Hz)
|
||||
// of the FMV sensor. Sensor will generate data events at this rate.
|
||||
//
|
||||
// ## Event Message: sns_std_sensor_event
|
||||
// 1. Output of the FMV sensor will be populated in sns_std_sensor_event
|
||||
// 2. Each stream event contains three output data fields in µT (micro Tesla)
|
||||
// 3. Data in the stream is adjusted to Android coordinate system relative to a
|
||||
// mobile device held with screen facing the user in it's natural orientation:
|
||||
// X-axis: parallel to the screen pointing to the right
|
||||
// Y-axis: parallel to the screen pointing to the top
|
||||
// Z-axis: perpendicular to the screen pointing towards the user
|
||||
// 4. Data in the stream event is ordered as:
|
||||
// data[0] = X-axis
|
||||
// data[1] = Y-axis
|
||||
// data[2] = Z-axis
|
||||
// 5. Each stream event publishes an accuracy field:
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_UNRELIABLE to mark invalid samples when hardware is
|
||||
// yet to stabilize after the sensor is configured.
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_ACCURACY_HIGH to mark samples when they are valid.
|
||||
//
|
||||
// sns_std_sensor_event::status specifies the reliability of the sample value
|
||||
// value is of type sns_std_sensor_sample_status. see sns_std_sensor.proto for
|
||||
// details.
|
||||
@@ -1,121 +0,0 @@
|
||||
// @file sns_offset_formatter.proto
|
||||
//
|
||||
// Defines standard message types for the Offset/Formatter sensor
|
||||
//
|
||||
// Copyright (c) 2018 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std_type.proto";
|
||||
import "sns_std_sensor.proto";
|
||||
|
||||
enum sns_formatter_msgid {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_FORMATTER_MSGID_SNS_FORMATTER_REQUEST = 512;
|
||||
SNS_FORMATTER_MSGID_SNS_FORMATTER_METRIC_DATA_REQUEST = 513;
|
||||
|
||||
SNS_FORMATTER_MSGID_SNS_FORMATTER_OUTPUT_EVENT = 1024;
|
||||
SNS_FORMATTER_MSGID_SNS_FORMATTER_ACK_EVENT = 1025;
|
||||
}
|
||||
|
||||
enum sns_formatter_request_values {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_FORMATTER_REQUEST_INVALID = 0;
|
||||
// Creates a new instance of a metric with given id.
|
||||
SNS_FORMATTER_REQUEST_CREATE = 1;
|
||||
// Starts or resumes the update of the metric instances.
|
||||
SNS_FORMATTER_REQUEST_START = 2;
|
||||
// Pauses the update of the metric instances.
|
||||
SNS_FORMATTER_REQUEST_STOP = 3;
|
||||
// Resets metric instance state.
|
||||
SNS_FORMATTER_REQUEST_RESET = 4;
|
||||
// Destroys the metric instance. Release the resources for that instance.
|
||||
SNS_FORMATTER_REQUEST_DESTROY = 5;
|
||||
// Set the config data based on the group name.
|
||||
SNS_FORMATTER_REQUEST_CONFIG_SET = 6;
|
||||
// fetch the config data based on the group name.
|
||||
SNS_FORMATTER_REQUEST_CONFIG_GET = 7;
|
||||
// Updates the batch period at the client manager.
|
||||
SNS_FORMATTER_REQUEST_BATCH = 8;
|
||||
}
|
||||
|
||||
enum sns_formatter_status_values {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_FORMATTER_STATUS_FAILURE = 0;
|
||||
SNS_FORMATTER_STATUS_INVALID_PARAM = 1;
|
||||
SNS_FORMATTER_STATUS_SUCCESS = 2;
|
||||
}
|
||||
|
||||
enum sns_formatter_client_id {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_FORMATTER_CLIENT_BG = 0;
|
||||
SNS_FORMATTER_CLIENT_APPS = 1;
|
||||
}
|
||||
|
||||
enum sns_formatter_event_type {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_FORMATTER_OUTPUT_DATA_EVENT = 0;
|
||||
SNS_FORMATTER_OUTPUT_BUFFER_EVENT = 1;
|
||||
SNS_FORMATTER_CONFIG_DATA_EVENT = 2;
|
||||
}
|
||||
|
||||
// "UNUSED" is filled by clients for strings which are
|
||||
// not applicable for a given sns_formatter-request_values id.
|
||||
message sns_formatter_config_payload {
|
||||
optional sns_std_suid metric_sensor_suid = 1;
|
||||
required sns_std_suid formatter_suid = 2;
|
||||
required float sample_rate = 3;
|
||||
required string format_input_str = 4;
|
||||
required string metric_name = 5;
|
||||
required string group_name = 7;
|
||||
required string sensor_config_data = 8;
|
||||
}
|
||||
|
||||
message sns_formatter_output_event_payload
|
||||
{
|
||||
required bytes data = 1;
|
||||
required sns_std_sensor_sample_status status = 2;
|
||||
required sns_formatter_event_type event_type = 3;
|
||||
}
|
||||
|
||||
// Formatter config message
|
||||
// Used by clients to configure the formatter for various metrics
|
||||
message sns_formatter_request
|
||||
{
|
||||
required sns_formatter_request_values msg_id = 1;
|
||||
required fixed32 metric_id = 2;
|
||||
required sns_formatter_client_id client_id = 3;
|
||||
optional sns_formatter_config_payload payload = 4;
|
||||
optional sns_formatter_output_event_payload event_payload = 5;
|
||||
}
|
||||
|
||||
message sns_formatter_metric_data_request
|
||||
{
|
||||
required fixed32 metric_id = 1;
|
||||
required bytes metric_data = 2;
|
||||
}
|
||||
|
||||
// Formatter output event
|
||||
// This event contains the formatted string output corresponding to the
|
||||
// metric requested by the client.
|
||||
message sns_formatter_output_event
|
||||
{
|
||||
required fixed32 metric_id = 1;
|
||||
required string formatted_output = 2;
|
||||
required sns_formatter_output_event_payload event_payload = 3;
|
||||
}
|
||||
|
||||
// Formatter acknowledge event
|
||||
// This event contains the status for the request sent from the client.
|
||||
// Status indicates if the requested format string was valid or not.
|
||||
message sns_formatter_ack_event
|
||||
{
|
||||
required fixed32 metric_id = 1;
|
||||
required sns_formatter_status_values status = 2;
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
// @file sns_free_fall.proto
|
||||
//
|
||||
// Defines standard message types for Free Fall Sensor. All physical Sensor
|
||||
// drivers that support Free Fall Sensor are required to support the
|
||||
// event messages as defined in this file.
|
||||
//
|
||||
// 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";
|
||||
import "sns_physical_sensor_test.proto";
|
||||
|
||||
// Attribute requirements:
|
||||
// The Free Fall Sensor publishes:
|
||||
// 1. SNS_STD_SENSOR_ATTRID_TYPE attribute value as "free_fall".
|
||||
// 2. SNS_STD_SENSOR_ATTRID_RESOLUTIONS, SNS_STD_SENSOR_ATTRID_RANGES,
|
||||
// SNS_STD_SENSOR_ATTRID_RATES attributes are not applicable since this is
|
||||
// a single output sensor.
|
||||
// 3. See sns_std_sensor.proto for other attributes.
|
||||
|
||||
|
||||
// Handling stream requests:
|
||||
// 1. A message with ID SNS_STD_SENSOR_MSGID_SNS_STD_ON_CHANGE_CONFIG is an
|
||||
// enable request to the free fall sensor.
|
||||
// 2. A client deletes the data stream with free_fall Sensor to disable it's
|
||||
// original enable request.
|
||||
|
||||
// Message IDs for free_fall Sensor
|
||||
enum sns_free_fall_msgid {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
// The free_fall Sensor publishes an event with this message ID
|
||||
SNS_FREE_FALL_MSGID_SNS_FREE_FALL_EVENT = 773;
|
||||
}
|
||||
|
||||
enum sns_free_fall_event_type {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_FREE_FALL_EVENT_TYPE_DISABLED = 0;
|
||||
SNS_FREE_FALL_EVENT_TYPE_ENABLED = 1;
|
||||
SNS_FREE_FALL_EVENT_TYPE_FIRED = 2;
|
||||
}
|
||||
|
||||
// Events types from free fall Sensor
|
||||
message sns_free_fall_event
|
||||
{
|
||||
required sns_free_fall_event_type free_fall_event_type = 1 [default = SNS_FREE_FALL_EVENT_TYPE_DISABLED];
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
// @file sns_fw.proto
|
||||
//
|
||||
// Defines Framework internal values.
|
||||
//
|
||||
// Copyright (c) 2017-2018 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
|
||||
// Internal Framework message IDs
|
||||
// Note: These message IDs must not conflict with those in sns_std_msgid
|
||||
enum sns_fw_msgid {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
// Special message only sent by the Framework; not processed by Sensors
|
||||
// Empty Message
|
||||
SNS_FW_MSGID_SNS_DESTROY_REQ = 120;
|
||||
|
||||
// Special message only sent by the Framework; not processed by Sensors
|
||||
// Empty Message
|
||||
SNS_FW_MSGID_SNS_DESTROY_COMPLETE_EVENT = 250;
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
// @file sns_game_rv.proto
|
||||
//
|
||||
// Defines the API for Game Rotation Vector sensors
|
||||
//
|
||||
// Copyright (c) 2017-2018 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "sns_std_sensor.proto";
|
||||
|
||||
// A GameRV sensor reports the orientation of the device relative to an
|
||||
// unspecified coordinates frame. It is obtained by integration of
|
||||
// accelerometer and gyroscope readings. Therefore the Y axis doesn't point
|
||||
// north but instead to an arbitrary reference.
|
||||
//
|
||||
// ## GameRV sensor attributes:
|
||||
// 1. SNS_STD_SENSOR_ATTRID_TYPE is "game_rv"
|
||||
//
|
||||
// ## Request Message: sns_std_sensor_config
|
||||
// sns_std_sensor_config::sample_rate is used to specify the sampling rate (Hz)
|
||||
// of the GameRV sensor. Sensor will generate data events at this rate.
|
||||
//
|
||||
// ## Event Message: sns_std_sensor_event
|
||||
// Output of the GameRV sensor will be populated in sns_std_sensor_event
|
||||
//
|
||||
// The orientation is represented by the rotation necessary to align
|
||||
// the coordinate frame with the device's coordinates. That is,
|
||||
// applying the rotation to the world frame (X,Y,Z) would align them with
|
||||
// the device coordinates (x,y,z).
|
||||
//
|
||||
// The rotation can be seen as rotating the device by an angle theta around an
|
||||
// axis rot_axis to go from the reference device orientation to the current
|
||||
// device orientation. The rotation is encoded as the four unitless x, y, z, w
|
||||
// components of a unit quaternion:
|
||||
// sns_std_sensor_event::data[0] = rot_axis.x*sin(theta/2)
|
||||
// sns_std_sensor_event::data[1] = rot_axis.y*sin(theta/2)
|
||||
// sns_std_sensor_event::data[2] = rot_axis.z*sin(theta/2)
|
||||
// sns_std_sensor_event::data[3] = cos(theta/2)
|
||||
//
|
||||
// Where:
|
||||
// - the x, y and z fields of rot_axis are the East-North-Up coordinates
|
||||
// of a unit length vector representing the rotation axis
|
||||
// - theta is the rotation angle
|
||||
//
|
||||
// sns_std_sensor_event::status specifies the reliability of the sample value
|
||||
// value is of type sns_std_sensor_sample_status. see sns_std_sensor.proto for
|
||||
// details.
|
||||
@@ -1,50 +0,0 @@
|
||||
// @file sns_geomag_rv.proto
|
||||
//
|
||||
// Defines the API for Geomagnetic Rotation Vector sensors.
|
||||
// This Sensor is similar to Rotation Vector, but uses a magnetometer instead
|
||||
// of a gyroscope.
|
||||
//
|
||||
// Copyright (c) 2017-2018 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "sns_std_sensor.proto";
|
||||
|
||||
// A GeoMagRV sensor reports the orientation of the device relative to the
|
||||
// East-North-Up coordinates frame. It is obtained by integration of
|
||||
// accelerometer and magnetometer readings.
|
||||
//
|
||||
// ## GeoMagRV sensor attributes:
|
||||
// SNS_STD_SENSOR_ATTRID_TYPE is "geomag_rv"
|
||||
//
|
||||
// ## Request Message: sns_std_sensor_config
|
||||
// sns_std_sensor_config::sample_rate is used to specify the sampling rate (Hz)
|
||||
// of the GeoMagRV sensor. Sensor will generate data events at this rate.
|
||||
//
|
||||
// ## Event Message: sns_std_sensor_event
|
||||
// Output of the GeoMagRV sensor will be populated in sns_std_sensor_event
|
||||
//
|
||||
// The East-North-Up coordinate system is defined as a direct orthonormal
|
||||
// basis where:
|
||||
// - X points east and is tangential to the ground.
|
||||
// - Y points north and is tangential to the ground.
|
||||
// - Z points towards the sky and is perpendicular to the ground.
|
||||
//
|
||||
// The rotation can be seen as rotating the device by an angle theta around an
|
||||
// axis rot_axis to go from the reference device orientation to the current
|
||||
// device orientation. The rotation is encoded as the four unitless x, y, z, w
|
||||
// components of a unit quaternion:
|
||||
// sns_std_sensor_event::data[0] = rot_axis.x*sin(theta/2)
|
||||
// sns_std_sensor_event::data[1] = rot_axis.y*sin(theta/2)
|
||||
// sns_std_sensor_event::data[2] = rot_axis.z*sin(theta/2)
|
||||
// sns_std_sensor_event::data[3] = cos(theta/2)
|
||||
//
|
||||
// Where:
|
||||
// - the x, y and z fields of rot_axis are the East-North-Up coordinates
|
||||
// of a unit length vector representing the rotation axis
|
||||
// - theta is the rotation angle
|
||||
//
|
||||
// sns_std_sensor_event::status specifies the reliability of the sample value
|
||||
// value is of type sns_std_sensor_sample_status. see sns_std_sensor.proto for
|
||||
// details.
|
||||
@@ -1,30 +0,0 @@
|
||||
// @file sns_gravity.proto
|
||||
//
|
||||
// Defines standard message types for the Gravity Sensor
|
||||
//
|
||||
// Copyright (c) 2016-2018 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std_sensor.proto";
|
||||
|
||||
// Configuration Message
|
||||
// Used to either request for a certain configuration of the gravity sensor or
|
||||
// alter an already existing configuration of the gravity sensor
|
||||
// Uses sns_std_sensor_config defined in sns_std_sensor.proto
|
||||
// The message field definitions are as follows:
|
||||
// 1) float sample_rate
|
||||
// containing the required sample rate of the gravity sensor in hertz
|
||||
|
||||
// Data Message
|
||||
// Data event generated by the gravity.
|
||||
// Uses sns_std_sensor_event message defined in sns_std_sensor.proto
|
||||
// The data field of the sns_std_sensor_event message
|
||||
// contains a float array of length 6 with the following definition
|
||||
// 1) float data[0] to data[2]
|
||||
// Representing the gravity values along x,y,z axes in m/s2.
|
||||
// 2) float data[3] to data[5]
|
||||
// Representing the linear acceleration values along x,y,z axes in m/s2.
|
||||
// Determined as the delta between the accel and the gravity values
|
||||
// along that axis.
|
||||
@@ -1,74 +0,0 @@
|
||||
// @file sns_gyro.proto
|
||||
//
|
||||
// Defines the API for Gyroscope Sensors.
|
||||
// All Gyroscope Sensor drivers are required to comply with this API.
|
||||
// Any new functionality for Gyroscope Sensor can be defined in a
|
||||
// device specific API file.
|
||||
//
|
||||
// Copyright (c) 2016-2018, 2020 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std_sensor.proto";
|
||||
import "sns_physical_sensor_test.proto";
|
||||
import "sns_cal.proto";
|
||||
|
||||
// Attribute requirements:
|
||||
// The Gyroscope Sensor publishes:
|
||||
// 1. SNS_STD_SENSOR_ATTRID_TYPE attribute value as "gyro".
|
||||
// 2. SNS_STD_SENSOR_ATTRID_RESOLUTIONS attribute value in (radians/sec)/LSB.
|
||||
// 3. SNS_STD_SENSOR_ATTRID_RANGES attribute values in radians/sec unit.
|
||||
// 4. See sns_std_sensor.proto for other attributes.
|
||||
|
||||
// Handling stream requests:
|
||||
// 1. The Gyroscope Sensor handles the sns_std_sensor_config
|
||||
// message request for all stream enable/update requests.
|
||||
// 2. The Gyroscope Sensor uses batching_period item in
|
||||
// sns_std_request as the requested batching rate to determine
|
||||
// hardware FIFO watermark.
|
||||
|
||||
// Handling stream events:
|
||||
// 1. The Gyroscope Sensor publishes device rotation data stream events
|
||||
// using the sns_std_sensor_event message.
|
||||
// 2. Each stream event contains three output data fields where data is
|
||||
// in radians/sec units and is factory calibrated.
|
||||
// 3. Data in the stream is adjusted to Android coordinate system relative to a
|
||||
// mobile device held with screen facing the user in it's natural orientation:
|
||||
// X-axis: parallel to the screen pointing to the right
|
||||
// Y-axis: parallel to the screen pointing to the top
|
||||
// Z-axis: perpendicular to the screen pointing towards the user
|
||||
// This conforms to the mobile device axes orientation as specified by the
|
||||
// Android Sensor API.
|
||||
// 4. Data in the stream event is ordered as:
|
||||
// data[0] = X-axis
|
||||
// data[1] = Y-axis
|
||||
// data[2] = Z-axis
|
||||
// 5. Each stream event publishes an accuracy field:
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_UNRELIABLE to mark invalid samples when hardware is
|
||||
// yet to stabilize after the sensor is configured.
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_ACCURACY_HIGH to mark samples when they are valid.
|
||||
// 6. The Gyroscope Sensor publishes a configuration event using the
|
||||
// sns_std_sensor_physical_config_event message.
|
||||
// It publishes this event each time there is change in hardware config of the sensor
|
||||
// and contains current physical sensor config of the sensor.
|
||||
// 7. The Gyroscope Sensor publishes a factory calibration event using the
|
||||
// sns_cal_event message. It uses bias and comp_matrix fields in this event.
|
||||
// It publishes this event each time there is change in it's factory calibration
|
||||
// data or when a client sends a new streaming request.
|
||||
// Handling self-test requests:
|
||||
// 1. The Gyroscope Sensor implements SNS_PHYSICAL_SENSOR_TEST_TYPE_COM test
|
||||
// type using the physical sensor test API.
|
||||
// 2. The Gyroscope Sensor implements SNS_PHYSICAL_SENSOR_TEST_TYPE_FACTORY test
|
||||
// type to determine factory calibration parameters using the physical
|
||||
// sensor test API.
|
||||
// 3. The Gyroscope Sensor could implement other test types.
|
||||
|
||||
// Handling test events:
|
||||
// 1. The Gyroscope Sensor uses sns_physical_sensor_test_event message to publish
|
||||
// a test completion event.
|
||||
// 2. The test_passed field in sns_physical_sensor_test_event is used to output the
|
||||
// pass/fail result of self-test execution.
|
||||
// 3. The test_data field in sns_physical_sensor_test_event could be used to output any
|
||||
// driver-specific error data.
|
||||
@@ -1,32 +0,0 @@
|
||||
// @file sns_gyro_cal.proto
|
||||
//
|
||||
// Defines message types for the Gyro Calibration Sensor.
|
||||
//
|
||||
// Copyright (c) 2017-2018 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_cal.proto";
|
||||
|
||||
// The Gyro Calibration Sensor determines the calibration parameters
|
||||
// for gyro sensor
|
||||
|
||||
// Gyro Calibration Sensor Attributes:
|
||||
// - SNS_STD_SENSOR_ATTRID_TYPE: "gyro_cal"
|
||||
// - SNS_STD_SENSOR_ATTRID_STREAM_TYPE: SNS_STD_SENSOR_STREAM_TYPE_ON_CHANGE
|
||||
|
||||
// Stream Requests:
|
||||
// - SNS_STD_SENSOR_MSGID_SNS_STD_ON_CHANGE_CONFIG message ID is used to
|
||||
// enable the sensor
|
||||
// - SNS_CAL_MSGID_SNS_CAL_RESET message ID is used to reset the algorithm
|
||||
// and any previously determined calibration parameters.
|
||||
|
||||
// Stream Events:
|
||||
// - SNS_CAL_MSGID_SNS_CAL_EVENT message ID is used to report calibration
|
||||
// parameters to the client of the sensor. The sns_cal_event message as
|
||||
// defined in sns_cal.proto is used to report this data event where the
|
||||
// units for the bias field in the message are in rad / s
|
||||
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
// @file sns_gyro_rot_matrix.proto
|
||||
//
|
||||
// Defines standard message types for the Gyro Rotation Matrix
|
||||
//
|
||||
// Copyright (c) 2016-2018 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std_sensor.proto";
|
||||
|
||||
enum sns_gyro_rot_matrix_msgid
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_GYRO_ROT_MATRIX_MSGID_SNS_STD_SENSOR_EVENT = 1024;
|
||||
}
|
||||
|
||||
// Data Message
|
||||
// Data event generated by the gyro rotation matrix.
|
||||
// Uses sns_std_sensor_event message defined in sns_std_sensor.proto
|
||||
// The data field of the sns_std_sensor_event message
|
||||
// contains a float array of length 10 with the following definition
|
||||
// 1) float data[0] to data[8]
|
||||
// 3 by 3 Gyro Rotation Matrix output
|
||||
// Representing the rotation from previously sampled gyro values
|
||||
// to the current one.
|
||||
// The matrix definition is as follows:
|
||||
// curr_gyro_XYZ[3X1] = gyro_rot_matrix[3X3] * prev_gyro_XYZ[3X1]
|
||||
// data[0] = gyro_rot_matrix[0,0]
|
||||
// data[1] = gyro_rot_matrix[0,1]
|
||||
// data[2] = gyro_rot_matrix[0,2]
|
||||
// data[3] = gyro_rot_matrix[1,0]
|
||||
// data[4] = gyro_rot_matrix[1,1]
|
||||
// data[5] = gyro_rot_matrix[1,2]
|
||||
// data[6] = gyro_rot_matrix[2,0]
|
||||
// data[7] = gyro_rot_matrix[2,1]
|
||||
// data[8] = gyro_rot_matrix[2,2]
|
||||
// 2) float data[9]
|
||||
// Gyro Norm of the currently sampled gyro data
|
||||
// determined as the sum of squares of gyro on each of the axes
|
||||
// i.e. curr_gyro_X^2 + curr_gyro_Y^2 + curr_gyro_Z^2
|
||||
|
||||
// Configuration Message
|
||||
// Used to either request for a certain configuration of the Gyro Rotation Matrix Sensor or
|
||||
// alter an already existing configuration of the Simulation Sensor
|
||||
// Uses sns_std_sensor_config defined in sns_std_sensor.proto
|
||||
// The message field definitions are as follows:
|
||||
// 1) float sample_rate
|
||||
// containing the required sample rate of the Gyro Rotation Matrix sensor in hertz
|
||||
@@ -1,82 +0,0 @@
|
||||
// @file sns_hall.proto
|
||||
//
|
||||
// Defines the API for Hall Sensors.
|
||||
// All Hall Sensor drivers are required to comply with this API.
|
||||
// Any new functionality for Hall Sensor can be defined in a
|
||||
// device specific API file.
|
||||
//
|
||||
// Copyright (c) 2016-2018, 2020 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std_sensor.proto";
|
||||
import "sns_physical_sensor_test.proto";
|
||||
import "sns_cal.proto";
|
||||
|
||||
// Attribute requirements:
|
||||
// The Hall Sensor publishes:
|
||||
// 1. SNS_STD_SENSOR_ATTRID_TYPE attribute value as "hall".
|
||||
// 2. SNS_STD_SENSOR_ATTRID_RESOLUTIONS attribute is not applicable since this is an event
|
||||
// sensor.
|
||||
// 3. SNS_STD_SENSOR_ATTRID_RANGES attribute values as 0 and 1.
|
||||
// 4. See sns_std_sensor.proto for other attributes.
|
||||
|
||||
// Handling stream requests:
|
||||
// 1. The Hall Sensor handles the SNS_STD_SENSOR_MSGID_SNS_STD_ON_CHANGE_CONFIG
|
||||
// message ID for all stream enable/update requests.
|
||||
// 2. The Hall Sensor operates in on-change mode and report
|
||||
// samples only for magnet NEAR/FAR transitions.
|
||||
|
||||
// Message IDs for hall Sensor
|
||||
enum sns_hall_msgid {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
// Uses message: sns_hall_event
|
||||
// Purpose: An output data event from the hall sensor to it's client.
|
||||
SNS_HALL_MSGID_SNS_HALL_EVENT = 770;
|
||||
}
|
||||
|
||||
enum sns_hall_event_type {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_HALL_EVENT_TYPE_FAR = 0;
|
||||
SNS_HALL_EVENT_TYPE_NEAR = 1;
|
||||
}
|
||||
|
||||
// Events types from hall Sensor
|
||||
message sns_hall_event
|
||||
{
|
||||
// Hall NEAR/FAR output event
|
||||
required sns_hall_event_type hall_event_type = 1 [default = SNS_HALL_EVENT_TYPE_FAR];
|
||||
|
||||
// Hall sensor sample status
|
||||
required sns_std_sensor_sample_status status = 2 [default = SNS_STD_SENSOR_SAMPLE_STATUS_UNRELIABLE];
|
||||
}
|
||||
|
||||
// Handling stream events:
|
||||
// 1. The Hall Sensor publishes magnetic field proximity data stream
|
||||
// events using the sns_hall_event message.
|
||||
// 2. Each stream event publishes an accuracy field:
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_UNRELIABLE to mark invalid samples when hardware is
|
||||
// yet to stabilize after the sensor is configured.
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_ACCURACY_HIGH to mark samples when they are valid.
|
||||
// 3. The Hall Sensor publishes a configuration event using the
|
||||
// sns_std_sensor_physical_config_event message.
|
||||
// It publishes this event each time there is change in hardware config of the sensor
|
||||
// and contains current physical sensor config of the sensor.
|
||||
|
||||
// Handling self-test requests:
|
||||
// 1. The Hall Sensor implements SNS_PHYSICAL_SENSOR_TEST_TYPE_COM test
|
||||
// type using the physical sensor test API.
|
||||
// 2. The Hall Sensor could implement other test types.
|
||||
|
||||
// Handling test events:
|
||||
// 1. The Hall Sensor uses sns_physical_sensor_test_event message to publish
|
||||
// a test completion event.
|
||||
// 2. The test_passed field in sns_physical_sensor_test_event is used to output the
|
||||
// pass/fail result of self-test execution.
|
||||
// 3. The test_data field in sns_physical_sensor_test_event could be used to output any
|
||||
// driver-specific error data.
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
// @file sns_har.proto
|
||||
//
|
||||
// Defines standard message types for the har
|
||||
//
|
||||
// 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";
|
||||
|
||||
enum sns_har_msgid
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_HAR_MSGID_SNS_DATA = 1058;
|
||||
}
|
||||
|
||||
// Configuration Message
|
||||
// Used to either request for a certain configuration of the Sim Sensor or
|
||||
// alter an already existing configuration of the Simulation Sensor
|
||||
// Uses sns_std_sensor_config defined in sns_std_sensor.proto
|
||||
// The message field definitions are as follows:
|
||||
// 1) float sample_rate
|
||||
// containing the required sample rate of the Sim sensor in hertz
|
||||
|
||||
// Data Message
|
||||
// Output data event generated by the har sensor.
|
||||
message sns_har_data
|
||||
{
|
||||
// todo now upstream 2 data, here should change?
|
||||
required float har_state = 1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
// @file sns_heart_beat.proto
|
||||
//
|
||||
// Defines the API for Heart Beat sensors
|
||||
//
|
||||
// Copyright (c) 2017-2018 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "sns_std_sensor.proto";
|
||||
|
||||
// A heart beat sensor reports everytime a heart beat peak is detected.
|
||||
//
|
||||
// Peak ideally corresponds to the positive peak in the QRS complex of
|
||||
// an ECG signal, and the event timestamp should correspond to the time this
|
||||
// peak occured.
|
||||
//
|
||||
// The sensor is not expected to be optimized for latency. As a guide, a
|
||||
// receipt latency of up to 10 seconds is acceptable.
|
||||
//
|
||||
// ## Heart Beat sensor attributes:
|
||||
// SNS_STD_SENSOR_ATTRID_TYPE is "heart_beat"
|
||||
//
|
||||
// ## Request Message: SNS_STD_SENSOR_MSGID_SNS_STD_ON_CHANGE_CONFIG
|
||||
// No configuration is available for this sensor.
|
||||
//
|
||||
// ## Event Message: sns_std_sensor_event
|
||||
// Output of the Heart Beat sensor will be populated in sns_std_sensor_event.
|
||||
//
|
||||
// sns_std_sensor_event::data[0] = confidence in the detection of the peak
|
||||
// where 0.0 represent no information at all, and 1.0 represents certainty.
|
||||
@@ -1,55 +0,0 @@
|
||||
// @file sns_heart_rate.proto
|
||||
//
|
||||
// Defines the API for Heart Rate Detection Sensors.
|
||||
//
|
||||
// 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";
|
||||
|
||||
// A sensor of this type returns the current heart rate in beats per minute
|
||||
// (BPM). Because this sensor is on-change, events must be generated when and
|
||||
// only when BPM or status have changed since the last event.
|
||||
//
|
||||
// Upon the first activation, unless the device is known to not be on the
|
||||
// body, the status field of the first event must be set to UNRELIABLE.
|
||||
//
|
||||
// ## Heart Rate sensor attributes:
|
||||
// SNS_STD_SENSOR_ATTRID_TYPE is "heart_rate"
|
||||
//
|
||||
// ## Request Message: SNS_STD_SENSOR_MSGID_SNS_STD_ON_CHANGE_CONFIG
|
||||
// No configuration is available for this sensor.
|
||||
//
|
||||
// ## Event Message: sns_std_sensor_event
|
||||
// Output of the Heart Rate sensor will be populated in sns_std_sensor_event.
|
||||
//
|
||||
// SNS_HEART_RATE_MSGID_SNS_HEART_RATE_EVENT::data[0] = current heart rate in beats per minute (BPM)
|
||||
//
|
||||
// SNS_HEART_RATE_MSGID_SNS_HEART_RATE_EVENT::status specifies the reliability of the sample value
|
||||
// value is of type sns_heart_rate_event_type.
|
||||
|
||||
enum sns_heart_rate_msgid {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_HEART_RATE_MSGID_SNS_HEART_RATE_EVENT = 779;
|
||||
}
|
||||
|
||||
enum sns_heart_rate_event_type {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_HR_STATUS_NO_CONTACT = -1;
|
||||
SNS_HR_STATUS_UNRELIABLE = 0;
|
||||
SNS_HR_STATUS_ACCURACY_LOW = 1;
|
||||
SNS_HR_STATUS_ACCURACY_MEDIUM = 2;
|
||||
SNS_HR_STATUS_ACCURACY_HIGH = 3;
|
||||
}
|
||||
|
||||
// Events types from heart_rate Sensor
|
||||
message sns_heart_rate_event
|
||||
{
|
||||
required float heart_rate = 1;
|
||||
required sns_heart_rate_event_type heart_rate_event_type = 2 [default = SNS_HR_STATUS_NO_CONTACT];
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
|
||||
// @file sns_hinge_angle.proto
|
||||
//
|
||||
// Defines message types for the Hinge Angle Sensor.
|
||||
//
|
||||
// Copyright (c) 2020 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std_sensor.proto";
|
||||
|
||||
// The Hinge Angle Sensor detects the angle between two rigid bodies connected by a hinge
|
||||
// around which rotation can occur.
|
||||
//
|
||||
// The reference position for Hinge Angle measurement constitues the two rigid bodies being
|
||||
// parallel to the ground, with surfaces in contact with each other and hinge connecting
|
||||
// the left edges of the two rigid bodies.
|
||||
// The rigid body that is located below is defined to be the primary rigid body.
|
||||
// The rigid body which is located above is defined to be the secondary rigid body.
|
||||
//
|
||||
// The Hinge Angle Sensor detects the angle going from the primary rigid body to the
|
||||
// secondary rigid body, measured counter clockwise around the hinge. The maximum range of
|
||||
// reported angles will be from 0 degrees to 360 degrees.
|
||||
//
|
||||
// A Hinge Angle of 0 degrees is reported when the two rigid bodies have the same surfaces,
|
||||
// as described in the reference position, in contact with each other.
|
||||
//
|
||||
// A Hinge Angle of 360 degrees is reported when the two rigid bodies have the opposite
|
||||
// surfaces, to those described in the reference position, in contact with each other.
|
||||
//
|
||||
// A Hinge Angle of 180 degrees is reported when the two rigid bodies are coplanar.
|
||||
|
||||
// Attribute Requirements:
|
||||
// Hingle Angle Sensor must support the following attributes
|
||||
// SNS_STD_SENSOR_ATTRID_TYPE: "hinge_angle"
|
||||
// SNS_STD_SENSOR_ATTRID_STREAM_TYPE: SNS_STD_SENSOR_STREAM_TYPE_ON_CHANGE
|
||||
// SNS_STD_SENSOR_ATTRID_RESOLUTIONS: the smallest hinge angle in degrees that
|
||||
// can be detected by the sensor
|
||||
// SNS_STD_SENSOR_ATTRID_RANGES: the range of angles detected by the sensor, for
|
||||
// example [0,360]
|
||||
|
||||
// Request:
|
||||
// A request message with message id SNS_HINGE_ANGLE_MSGID_SNS_HINGE_ANGLE_CONFIG
|
||||
// and payload sns_hinge_angle_config is used to enable the Hinge Angle Sensor
|
||||
|
||||
// Event:
|
||||
// Hinge Angle sensor generates an event with message id
|
||||
// SNS_STD_SENSOR_MSGID_SNS_STD_SENSOR_EVENT and payload sns_std_sensor_event
|
||||
// when hinge angle change is detected
|
||||
|
||||
// Message IDs for HINGE_ANGLE Sensor
|
||||
enum sns_hinge_angle_msgid {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_HINGE_ANGLE_MSGID_SNS_HINGE_ANGLE_CONFIG = 512;
|
||||
}
|
||||
|
||||
|
||||
// Request Message
|
||||
// Used to either request for a new configuration of the Hinge Angle Sensor or
|
||||
// alter an already existing configuration
|
||||
message sns_hinge_angle_config
|
||||
{
|
||||
// Ids of the primary and secondary rigid bodies between which hinge angle
|
||||
// is to be measured. Ids must match the SNS_STD_SENSOR_ATTRID_RIGID_BODY
|
||||
// attributes of the sensors on these rigid bodies that are to be used.
|
||||
repeated int32 rigid_body = 1 [(nanopb).max_count = 2];
|
||||
}
|
||||
|
||||
|
||||
// Event Message
|
||||
// Uses sns_std_sensor_event message defined in sns_std_sensor.proto
|
||||
// The data field of the sns_std_sensor_event message contains a
|
||||
// single floating point value representing the detected hinge angle
|
||||
// in degrees
|
||||
// The status field of the sns_std_sensor_event message contains the
|
||||
// accuracy of the detected hinge angle
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
// @file sns_humidity.proto
|
||||
//
|
||||
// Defines the API for Humidity Sensors.
|
||||
// All Humidity Sensor drivers are required to comply with this API.
|
||||
// Any new functionality for Humidity Sensor can be defined in a
|
||||
// device specific API file.
|
||||
//
|
||||
// Copyright (c) 2016-2018 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std_sensor.proto";
|
||||
import "sns_physical_sensor_test.proto";
|
||||
import "sns_cal.proto";
|
||||
|
||||
// Attribute requirements:
|
||||
// The Humidity Sensor publishes:
|
||||
// 1. SNS_STD_SENSOR_ATTRID_TYPE attribute value as "humidity".
|
||||
// 2. SNS_STD_SENSOR_ATTRID_RESOLUTIONS attribute value in %RH/LSB.
|
||||
// 3. SNS_STD_SENSOR_ATTRID_RANGES attribute values in %RH unit.
|
||||
// 4. The Humidity Sensor is an on-change sensor.
|
||||
// 5. See sns_std_sensor.proto for other attributes.
|
||||
|
||||
|
||||
// Handling stream requests:
|
||||
// 1. The Humidity Sensor handles the SNS_STD_SENSOR_MSGID_SNS_STD_ON_CHANGE_CONFIG
|
||||
// message ID for all stream enable/update requests.
|
||||
// 2. The Humidity Sensor supports on-change mode of operation.
|
||||
// 3. In on-change mode the Sensor could use interrupt operation and
|
||||
// reports samples for only significant change in humidity.
|
||||
// Example: +/- 5% change.
|
||||
|
||||
// Handling stream events:
|
||||
// 1. The Humidity Sensor publishes ambient relative humidity data stream
|
||||
// events using the sns_std_sensor_event message.
|
||||
// 2. Each stream event contains one output data field where data is
|
||||
// factory calibrated and ordered as:
|
||||
// data[0] = Humidity data in %RH (% Relative Humidity)
|
||||
// 3. Each stream event publishes an accuracy field:
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_UNRELIABLE to mark invalid samples when hardware is
|
||||
// yet to stabilize after the sensor is configured.
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_ACCURACY_HIGH to mark samples when they are valid.
|
||||
// 4. The Humidity Sensor publishes a configuration event using the
|
||||
// sns_std_sensor_physical_config_event message.
|
||||
// It publishes this event each time there is change in hardware config of the sensor
|
||||
// and contains current physical sensor config of the sensor.
|
||||
// 5. The Humidity Sensor publishes a factory calibration event using the
|
||||
// sns_cal_event message. It uses bias and scale_factor fields in this event.
|
||||
// It publishes this event each time there is change in it's factory calibration
|
||||
// data or when a client sends a new streaming request.
|
||||
|
||||
// Handling self-test requests:
|
||||
// 1. The Humidity Sensor implements SNS_PHYSICAL_SENSOR_TEST_TYPE_COM test
|
||||
// type using the physical sensor test API.
|
||||
// 2. The Humidity Sensor implements SNS_PHYSICAL_SENSOR_TEST_TYPE_FACTORY test
|
||||
// type to determine factory calibration parameters using the physical
|
||||
// sensor test API.
|
||||
// 3. The Humidity Sensor could implement other test types.
|
||||
|
||||
// Handling test events:
|
||||
// 1. The Humidity Sensor uses sns_physical_sensor_test_event message to publish
|
||||
// a test completion event.
|
||||
// 2. The test_passed field in sns_physical_sensor_test_event is used to output the
|
||||
// pass/fail result of self-test execution.
|
||||
// 3. The test_data field in sns_physical_sensor_test_event could be used to output any
|
||||
// driver-specific error data.
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
// @file sns_mag.proto
|
||||
//
|
||||
// Defines the API for Magnetometer Sensors.
|
||||
// All Magnetometer Sensor drivers are required to comply with this API.
|
||||
// Any new functionality for Magnetometer Sensor can be defined in a
|
||||
// device specific API file.
|
||||
//
|
||||
// Copyright (c) 2016-2018 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std_sensor.proto";
|
||||
import "sns_physical_sensor_test.proto";
|
||||
import "sns_cal.proto";
|
||||
|
||||
// Attribute requirements:
|
||||
// The Magnetometer Sensor publishes:
|
||||
// 1. SNS_STD_SENSOR_ATTRID_TYPE attribute value as "mag".
|
||||
// 2. SNS_STD_SENSOR_ATTRID_RESOLUTIONS attribute value in µT/LSB.
|
||||
// 3. SNS_STD_SENSOR_ATTRID_RANGES attribute values in µT unit.
|
||||
// 4. See sns_std_sensor.proto for other attributes.
|
||||
|
||||
// Handling stream requests:
|
||||
// 1. The Magnetometer Sensor handles the sns_std_sensor_config
|
||||
// message request for all stream enable/update requests.
|
||||
// 2. If the physical sensor supports hardware FIFO then the Magnetometer
|
||||
// Sensor uses batching_period item in sns_std_request as the requested
|
||||
// batching rate to determine hardware FIFO watermark.
|
||||
|
||||
// Handling stream events:
|
||||
// 1. The Magnetometer Sensor publishes ambient magnetic field data events
|
||||
// using the sns_std_sensor_event message.
|
||||
// 2. Each stream event contains three output data fields where data is
|
||||
// in µT (micro Tesla) units and is factory calibrated.
|
||||
// 3. Data in the stream is adjusted to Android coordinate system relative to a
|
||||
// mobile device held with screen facing the user in it's natural orientation:
|
||||
// X-axis: parallel to the screen pointing to the right
|
||||
// Y-axis: parallel to the screen pointing to the top
|
||||
// Z-axis: perpendicular to the screen pointing towards the user
|
||||
// This conforms to the mobile device axes orientation as specified by the
|
||||
// Android Sensor API.
|
||||
// 4. Data in the stream event is ordered as:
|
||||
// data[0] = X-axis
|
||||
// data[1] = Y-axis
|
||||
// data[2] = Z-axis
|
||||
// 5. Each stream event publishes an accuracy field:
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_UNRELIABLE to mark invalid samples when hardware is
|
||||
// yet to stabilize after the sensor is configured.
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_ACCURACY_HIGH to mark samples when they are valid.
|
||||
// 6. The Magnetometer Sensor publishes a configuration event using the
|
||||
// sns_std_sensor_physical_config_event message.
|
||||
// It publishes this event each time there is change in hardware config of the sensor
|
||||
// and contains current physical sensor config of the sensor.
|
||||
// 7. The Magnetometer Sensor publishes a factory calibration event using the
|
||||
// sns_cal_event message. It uses bias and comp_matrix fields in this event.
|
||||
// It publishes this event each time there is change in it's factory calibration
|
||||
// data or when a client sends a new streaming request.
|
||||
|
||||
// Handling self-test requests:
|
||||
// 1. The Magnetometer Sensor implements SNS_PHYSICAL_SENSOR_TEST_TYPE_COM test
|
||||
// type using the physical sensor test API.
|
||||
// 2. The Magnetometer Sensor implements SNS_PHYSICAL_SENSOR_TEST_TYPE_FACTORY test
|
||||
// type to determine factory calibration parameters using the physical
|
||||
// sensor test API.
|
||||
// 3. The Magnetometer Sensor could implement other test types.
|
||||
|
||||
// Handling test events:
|
||||
// 1. The Magnetometer Sensor uses sns_physical_sensor_test_event message to publish
|
||||
// a test completion event.
|
||||
// 2. The test_passed field in sns_physical_sensor_test_event is used to output the
|
||||
// pass/fail result of self-test execution.
|
||||
// 3. The test_data field in sns_physical_sensor_test_event could be used to output any
|
||||
// driver-specific error data.
|
||||
@@ -1,32 +0,0 @@
|
||||
// @file sns_mag_cal.proto
|
||||
//
|
||||
// Defines message types for the Mag Calibration Sensor.
|
||||
//
|
||||
// Copyright (c) 2017-2018 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_cal.proto";
|
||||
|
||||
// The Mag Calibration Sensor determines the calibration parameters
|
||||
// for magnetometer sensor
|
||||
|
||||
// Mag Calibration Sensor Attributes:
|
||||
// - SNS_STD_SENSOR_ATTRID_TYPE: "mag_cal"
|
||||
// - SNS_STD_SENSOR_ATTRID_STREAM_TYPE: SNS_STD_SENSOR_STREAM_TYPE_ON_CHANGE
|
||||
|
||||
// Stream Requests:
|
||||
// - SNS_STD_SENSOR_MSGID_SNS_STD_ON_CHANGE_CONFIG message ID is used to
|
||||
// enable the sensor
|
||||
// - SNS_CAL_MSGID_SNS_CAL_RESET message ID is used to reset the algorithm
|
||||
// and any previously determined calibration parameters.
|
||||
|
||||
// Stream Events:
|
||||
// - SNS_CAL_MSGID_SNS_CAL_EVENT message ID is used to report calibration
|
||||
// parameters to the client of the sensor. The sns_cal_event message as
|
||||
// defined in sns_cal.proto is used to report this data event where the
|
||||
// units for the bias field in the message are in micro Tesla.
|
||||
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
// @file sns_oem1.proto
|
||||
//
|
||||
// Defines standard message types for the OEM1
|
||||
//
|
||||
// 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";
|
||||
|
||||
enum sns_oem1_msgid
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_OEM1_MSGID_SNS_OEM1_DATA = 1024;
|
||||
}
|
||||
|
||||
|
||||
// Configuration Message
|
||||
// Used to either request for a certain configuration of the Sim Sensor or
|
||||
// alter an already existing configuration of the Simulation Sensor
|
||||
// Uses sns_std_sensor_config defined in sns_std_sensor.proto
|
||||
// The message field definitions are as follows:
|
||||
// 1) float sample_rate
|
||||
// containing the required sample rate of the Sim sensor in hertz
|
||||
|
||||
// Data Message
|
||||
// Output data event generated by the oem1 sensor.
|
||||
message sns_oem1_data
|
||||
{
|
||||
// oem1 Vector along axis x,y,z in m/s2
|
||||
repeated float oem1 = 1 [(nanopb).max_count = 3];
|
||||
|
||||
// Accuracy of the data
|
||||
required sns_std_sensor_sample_status accuracy = 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
// @file sns_oem15.proto
|
||||
//
|
||||
// Defines standard message types for the OEM3
|
||||
//
|
||||
// Copyright (c) 2017 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std_sensor.proto";
|
||||
|
||||
enum sns_oem15_msgid
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_OEM15_MSGID_SNS_OEM15_DATA = 1024;
|
||||
}
|
||||
|
||||
|
||||
// Configuration Message
|
||||
// Used to either request for a certain configuration of the Sim Sensor or
|
||||
// alter an already existing configuration of the Simulation Sensor
|
||||
// Uses sns_std_sensor_config defined in sns_std_sensor.proto
|
||||
// The message field definitions are as follows:
|
||||
// 1) float sample_rate
|
||||
// containing the required sample rate of the Sim sensor in hertz
|
||||
|
||||
// Data Message
|
||||
// Output data event generated by the oem3 sensor.
|
||||
message sns_oem15_data
|
||||
{
|
||||
// oem3 Vector along axis x,y,z in m/s2
|
||||
repeated float oem15 = 1 [(nanopb).max_count = 3];
|
||||
|
||||
// Accuracy of the data
|
||||
required sns_std_sensor_sample_status accuracy = 2;
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
// @file sns_oem2.proto
|
||||
//
|
||||
// Defines standard message types for the OEM2
|
||||
//
|
||||
// Copyright (c) 2017 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std_sensor.proto";
|
||||
|
||||
enum sns_oem2_msgid
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_OEM2_MSGID_SNS_OEM2_DATA = 1024;
|
||||
}
|
||||
|
||||
|
||||
// Configuration Message
|
||||
// Used to either request for a certain configuration of the Sim Sensor or
|
||||
// alter an already existing configuration of the Simulation Sensor
|
||||
// Uses sns_std_sensor_config defined in sns_std_sensor.proto
|
||||
// The message field definitions are as follows:
|
||||
// 1) float sample_rate
|
||||
// containing the required sample rate of the Sim sensor in hertz
|
||||
|
||||
// Data Message
|
||||
// Output data event generated by the oem2 sensor.
|
||||
message sns_oem2_data
|
||||
{
|
||||
// oem2 Vector along axis x,y,z in m/s2
|
||||
repeated float oem2 = 1 [(nanopb).max_count = 3];
|
||||
|
||||
// Accuracy of the data
|
||||
required sns_std_sensor_sample_status accuracy = 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
// @file sns_oem3.proto
|
||||
//
|
||||
// Defines standard message types for the OEM3
|
||||
//
|
||||
// Copyright (c) 2017 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std_sensor.proto";
|
||||
|
||||
enum sns_oem3_msgid
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_OEM3_MSGID_SNS_OEM3_DATA = 1024;
|
||||
}
|
||||
|
||||
|
||||
// Configuration Message
|
||||
// Used to either request for a certain configuration of the Sim Sensor or
|
||||
// alter an already existing configuration of the Simulation Sensor
|
||||
// Uses sns_std_sensor_config defined in sns_std_sensor.proto
|
||||
// The message field definitions are as follows:
|
||||
// 1) float sample_rate
|
||||
// containing the required sample rate of the Sim sensor in hertz
|
||||
|
||||
// Data Message
|
||||
// Output data event generated by the oem3 sensor.
|
||||
message sns_oem3_data
|
||||
{
|
||||
// oem3 Vector along axis x,y,z in m/s2
|
||||
repeated float oem3 = 1 [(nanopb).max_count = 3];
|
||||
|
||||
// Accuracy of the data
|
||||
required sns_std_sensor_sample_status accuracy = 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
// @file sns_offbody_detect.proto
|
||||
//
|
||||
// Defines the API for Offbody Detection Sensors.
|
||||
//
|
||||
// Copyright (c) 2017-2018,2020 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std_sensor.proto";
|
||||
import "sns_physical_sensor_test.proto";
|
||||
|
||||
// An offbody detect sensor reports every time the device transitions from
|
||||
// off-body to on-body and from on-body to off-body (e.g. a wearable device
|
||||
// being removed from the wrist would trigger an event indicating an off-body
|
||||
// transition).
|
||||
//
|
||||
// This sensor must be able to detect and report an on-body to off-body
|
||||
// transition within 1 second of the device being removed from the body,
|
||||
// and must be able to detect and report an off-body to on-body transition
|
||||
// within 5 seconds of the device being put back onto the body.
|
||||
//
|
||||
// ## Offbody Detection sensor attributes:
|
||||
// SNS_STD_SENSOR_ATTRID_TYPE is "offbody_detect"
|
||||
// SNS_STD_SENSOR_ATTRID_STREAM_TYPE: SNS_STD_SENSOR_STREAM_TYPE_ON_CHANGE
|
||||
//
|
||||
// ## Request Message: SNS_STD_SENSOR_MSGID_SNS_STD_ON_CHANGE_CONFIG
|
||||
// No configuration is available for this sensor.
|
||||
//
|
||||
// ## Event Message: SNS_OFFBODY_DETECT_MSGID_SNS_OFFBODY_DETECT_EVENT
|
||||
|
||||
// Message IDs for Offbody Detection Sensor
|
||||
enum sns_offbody_detect_msgid {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_OFFBODY_DETECT_MSGID_SNS_OFFBODY_DETECT_EVENT = 772;
|
||||
}
|
||||
|
||||
enum sns_offbody_detect_event_type
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
// Current state is unknown: not yet detected
|
||||
SNS_OFFBODY_DETECT_EVENT_TYPE_UNKNOWN = 0;
|
||||
// Device has been detected to be on-body
|
||||
SNS_OFFBODY_DETECT_EVENT_TYPE_ON = 1;
|
||||
// Device has been detected to be off-body
|
||||
SNS_OFFBODY_DETECT_EVENT_TYPE_OFF = 2;
|
||||
}
|
||||
|
||||
message sns_offbody_detect_event
|
||||
{
|
||||
// Detected state
|
||||
required sns_offbody_detect_event_type state = 1 [default = SNS_OFFBODY_DETECT_EVENT_TYPE_UNKNOWN];
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
// @file sns_ois_cal.proto
|
||||
//
|
||||
// Defines the API for ois manager.
|
||||
//
|
||||
// Copyright (c) 2019 AKM, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - AKM, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std_sensor.proto";
|
||||
|
||||
// Message IDs for ois manager
|
||||
enum sns_ois_manager_msgid {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_OIS_MANAGER_MSGID_SNS_SET_OIS_MODE = 525;
|
||||
|
||||
SNS_OIS_MANAGER_MSGID_SNS_OIS_CONFIG = 526;
|
||||
|
||||
SNS_OIS_MANAGER_MSGID_SNS_OIS_MANAGER_EVENT = 1024;
|
||||
}
|
||||
|
||||
message sns_set_ois_mode
|
||||
{
|
||||
required int32 ois_gain_x = 1;
|
||||
required int32 ois_gain_y = 2;
|
||||
required int32 ois_delay_x = 3;
|
||||
required int32 ois_delay_y = 4;
|
||||
required int32 ois_offset_x = 5;
|
||||
required int32 ois_offset_y = 6;
|
||||
required int32 mode = 7;
|
||||
}
|
||||
|
||||
message sns_ois_config
|
||||
{
|
||||
required int32 mode = 1;
|
||||
required int32 posture = 2;
|
||||
required int32 af_fb = 3;
|
||||
}
|
||||
|
||||
message sns_ois_manager_event
|
||||
{
|
||||
repeated float data = 1;
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
// @file sns_pedometer.proto
|
||||
//
|
||||
// Defines message types for the Pedometer Sensor.
|
||||
//
|
||||
// Copyright (c) 2017-2019 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std_sensor.proto";
|
||||
|
||||
// The Pedometer Sensor detects steps taken by the user
|
||||
//
|
||||
// The Pedometer step event includes the latest step count accumulated since
|
||||
// activation.
|
||||
// All clients to Pedometer get the same step event.
|
||||
// The timestamp of the event indicates the time of the latest detected step.
|
||||
|
||||
// Pedometer Sensor Attribute Requirements:
|
||||
// SNS_STD_SENSOR_ATTRID_TYPE: "pedometer"
|
||||
// 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 Pedometer Sensor
|
||||
enum sns_pedometer_msgid {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_PEDOMETER_MSGID_SNS_STEP_EVENT = 1028;
|
||||
|
||||
SNS_PEDOMETER_MSGID_SNS_STEP_EVENT_CONFIG = 775;
|
||||
}
|
||||
|
||||
// Events types from Pedometer Sensor
|
||||
message sns_step_event
|
||||
{
|
||||
//an incrementing step count
|
||||
required uint32 step_count = 1;
|
||||
}
|
||||
|
||||
message sns_step_event_config
|
||||
{
|
||||
//current step count
|
||||
required uint32 step_count = 1;
|
||||
}
|
||||
|
||||
|
||||
// Stream events:
|
||||
//
|
||||
// The sns_step_event message is used to publish updated step count
|
||||
//
|
||||
// The sns_step_event_config message is used to publish current step count
|
||||
// to the client
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
// @file sns_pedometer_wrist.proto
|
||||
//
|
||||
// Defines message types for the Pedometer_wrist Sensor.
|
||||
//
|
||||
// Copyright (c) 2018 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std_sensor.proto";
|
||||
|
||||
// The Pedometer_wrist Sensor detects steps taken by the user
|
||||
//
|
||||
// The Pedometer_wrist Step event is generated when the user takes a step.
|
||||
// The event includes the latest step count accumulated since activation.
|
||||
// All clients to Pedometer_wrist get the same step event.
|
||||
// The timestamp of the event indicates the time of the latest detected step.
|
||||
|
||||
// Pedometer_wrist Sensor Attribute Requirements:
|
||||
// SNS_STD_SENSOR_ATTRID_TYPE: "pedometer_wrist"
|
||||
// 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 Pedometer_wrist Sensor
|
||||
enum sns_pedometer_wrist_msgid {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_PEDOMETER_WRIST_MSGID_SNS_PEDOMETER_STEP_EVENT = 1028;
|
||||
//send to client immediatly to inform current step count
|
||||
//msg body same as sns_step_event
|
||||
SNS_PEDOMETER_WRIST_MSGID_SNS_PEDOMETER_STEP_EVENT_CONFIG = 775;
|
||||
}
|
||||
|
||||
// Events types from Pedometer_wrist Sensor
|
||||
message sns_pedometer_step_event
|
||||
{
|
||||
//an incrementing step count
|
||||
required uint32 step_count = 1;
|
||||
}
|
||||
|
||||
message sns_pedometer_step_event_config
|
||||
{
|
||||
//current step count
|
||||
required uint32 step_count = 1;
|
||||
}
|
||||
|
||||
|
||||
// Stream events:
|
||||
//
|
||||
// The sns_step_event message is used to publish updated step count
|
||||
//
|
||||
// Pedometer_wrist does not publish configuration events.
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
// @file sns_physical_sensor_oem_config.proto
|
||||
//
|
||||
// Defines config API message types for physical sensors.
|
||||
//
|
||||
// All physical Sensor drivers are required to use this API to support
|
||||
// self-test. SNS_PHYSICAL_SENSOR_TEST_TYPE_COM is a mandatory test type and must be
|
||||
// implemented in all physical Sensor drivers. Any new or device-specific
|
||||
// test type may be defined in the Sensor-specific API.
|
||||
//
|
||||
// Copyright (c) 2016-2017 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
|
||||
enum sns_physical_sensor_oem_config_msgid
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
// Test config request to a physical Sensor
|
||||
SNS_PHYSICAL_SENSOR_OEM_CONFIG_MSGID_SNS_PHYSICAL_SENSOR_OEM_CONFIG = 2048;
|
||||
|
||||
// Test event message from a physical Sensor
|
||||
SNS_PHYSICAL_SENSOR_OEM_CONFIG_MSGID_SNS_PHYSICAL_SENSOR_OEM_CONFIG_EVENT = 2049;
|
||||
}
|
||||
|
||||
// Supported test types for physical sensors
|
||||
enum sns_physical_sensor_oem_config_type
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
// set tp info for als parameter settings.
|
||||
SNS_PHYSICAL_SENSOR_CONFIG_TYPE_COLOR = 0;
|
||||
|
||||
// Sensor Hardware test.
|
||||
SNS_PHYSICAL_SENSOR_CONFIG_LUX_SCALE = 1;
|
||||
|
||||
// Factory test used for Sensor calibration.
|
||||
SNS_PHYSICAL_SENSOR_CONFIG_PS_THRESHOLD = 2;
|
||||
|
||||
// Communication bus test.
|
||||
SNS_PHYSICAL_SENSOR_CONFIG_PS_FORCE_CALI = 3;
|
||||
|
||||
// Communication bus test.
|
||||
SNS_PHYSICAL_SENSOR_CONFIG_BIAS = 4;
|
||||
|
||||
// Communication bus test.
|
||||
SNS_PHYSICAL_SENSOR_CONFIG_BACKLIGHT = 5;
|
||||
|
||||
// Communication dc state notify.
|
||||
SNS_PHYSICAL_SENSOR_CONFIG_DC_STATE = 6;
|
||||
|
||||
// Communication display rgb parse result notify.
|
||||
SNS_PHYSICAL_SENSOR_CONFIG_BRIGHTNESS_PARSE_REULT_RGB = 7;
|
||||
|
||||
// Communication display refresh rate notify.
|
||||
SNS_PHYSICAL_SENSOR_CONFIG_DISPLAY_FREQ = 8;
|
||||
|
||||
// Communication sensor channel calibration.
|
||||
SNS_PHYSICAL_SENSOR_CONFIG_CHANNEL_CALI = 9;
|
||||
}
|
||||
|
||||
// Physical Sensor oem configuration request
|
||||
message sns_physical_sensor_oem_config
|
||||
{
|
||||
// Requested config type.
|
||||
required sns_physical_sensor_oem_config_type config_type = 1;
|
||||
optional uint32 color = 2;
|
||||
optional float lux_scale = 3;
|
||||
optional uint32 threshold_near = 4;
|
||||
optional uint32 threshold_far = 5;
|
||||
optional float offset_x = 6;
|
||||
optional float offset_y = 7;
|
||||
optional float offset_z = 8;
|
||||
optional int32 backlight = 9;
|
||||
optional int32 dc_state = 10;
|
||||
optional float parsed_lux = 11;
|
||||
optional float parsed_r = 12;
|
||||
optional float parsed_g = 13;
|
||||
optional float parsed_b = 14;
|
||||
optional uint32 display_freq = 15;
|
||||
optional float channel = 16;
|
||||
optional float target = 17;
|
||||
repeated float f =18 [(nanopb).max_count = 20];
|
||||
}
|
||||
|
||||
// Physical Sensor test event
|
||||
message sns_physical_sensor_oem_config_event
|
||||
{
|
||||
// Result if the test execution was successful:
|
||||
// true for success
|
||||
// false for failure
|
||||
required bool config_result = 1 [default = true];
|
||||
|
||||
// test_type from sns_physical_sensor_oem_config that
|
||||
// this event corresponds to
|
||||
required sns_physical_sensor_oem_config_type config_type = 2 [default = SNS_PHYSICAL_SENSOR_CONFIG_TYPE_COLOR];
|
||||
|
||||
// Driver specific test data. This field can be used
|
||||
// to pass additional information like failure codes, debug data, etc.
|
||||
optional int32 poffset1 = 3;
|
||||
optional int32 poffset2 = 4;
|
||||
optional int32 color = 5;
|
||||
optional int32 coefficient = 6;
|
||||
}
|
||||
|
||||
// Self-test and streaming concurrency requirements:
|
||||
// 1. If the sensor is streaming and there is a client request to run
|
||||
// self-test (any test type) then the driver:
|
||||
// a. Pauses the stream
|
||||
// b. Executes the self-test request to completion
|
||||
// c. Resumes stream
|
||||
// 2. If the self-test is running and there is a client request to start
|
||||
// a sensor stream then the driver:
|
||||
// a. Rejects the stream request
|
||||
// b. Continues executing the self-test request to completion
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
// @file sns_physical_sensor_test.proto
|
||||
//
|
||||
// Defines test API message types for physical sensors.
|
||||
//
|
||||
// All physical Sensor drivers are required to use this API to support
|
||||
// self-test. SNS_PHYSICAL_SENSOR_TEST_TYPE_COM is a mandatory test type and must be
|
||||
// implemented in all physical Sensor drivers. Any new or device-specific
|
||||
// test type may be defined in the Sensor-specific API.
|
||||
//
|
||||
// Copyright (c) 2016-2018 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
|
||||
enum sns_physical_sensor_test_msgid
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
// Test config request to a physical Sensor
|
||||
SNS_PHYSICAL_SENSOR_TEST_MSGID_SNS_PHYSICAL_SENSOR_TEST_CONFIG = 515;
|
||||
|
||||
// Test event message from a physical Sensor
|
||||
SNS_PHYSICAL_SENSOR_TEST_MSGID_SNS_PHYSICAL_SENSOR_TEST_EVENT = 1026;
|
||||
}
|
||||
|
||||
// Supported test types for physical sensors
|
||||
enum sns_physical_sensor_test_type
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
// Software test.
|
||||
SNS_PHYSICAL_SENSOR_TEST_TYPE_SW = 0;
|
||||
|
||||
// Sensor Hardware test.
|
||||
SNS_PHYSICAL_SENSOR_TEST_TYPE_HW = 1;
|
||||
|
||||
// Factory test used for Sensor calibration.
|
||||
SNS_PHYSICAL_SENSOR_TEST_TYPE_FACTORY = 2;
|
||||
|
||||
// Communication bus test.
|
||||
SNS_PHYSICAL_SENSOR_TEST_TYPE_COM = 3;
|
||||
}
|
||||
|
||||
// Physical Sensor test configuration request
|
||||
message sns_physical_sensor_test_config
|
||||
{
|
||||
// Requested test type.
|
||||
required sns_physical_sensor_test_type test_type = 1;
|
||||
}
|
||||
|
||||
// Physical Sensor test event
|
||||
message sns_physical_sensor_test_event
|
||||
{
|
||||
// Result if the test execution was successful:
|
||||
// true for success
|
||||
// false for failure
|
||||
required bool test_passed = 1 [default = true];
|
||||
|
||||
// test_type from sns_physical_sensor_test_config that
|
||||
// this event corresponds to
|
||||
required sns_physical_sensor_test_type test_type = 2 [default = SNS_PHYSICAL_SENSOR_TEST_TYPE_COM];
|
||||
|
||||
// Driver specific test data. This field can be used
|
||||
// to pass additional information like failure codes, debug data, etc.
|
||||
optional bytes test_data = 3;
|
||||
}
|
||||
|
||||
// Self-test and streaming concurrency requirements:
|
||||
// 1. If the sensor is streaming and there is a client request to run
|
||||
// self-test (any test type) then the driver:
|
||||
// a. Pauses the stream
|
||||
// b. Executes the self-test request to completion
|
||||
// c. Resumes stream
|
||||
// 2. If the self-test is running and there is a client request to start
|
||||
// a sensor stream then the driver:
|
||||
// a. Rejects the stream request
|
||||
// b. Continues executing the self-test request to completion
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
// @file sns_pose_6dof.proto
|
||||
//
|
||||
// Defines the API for Pose Six Degrees of Freedom sensors.
|
||||
//
|
||||
// Copyright (c) 2017-2018 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "sns_std_sensor.proto";
|
||||
|
||||
// A pose 6dof sensor events consists of a rotation expressed as a quaternion
|
||||
// and a translation expressed in SI units. Pose of the device is defined as
|
||||
// the orientation of the device from a Earth Centered Earth Fixed frame and
|
||||
// the translation from an arbitrary point at subscription.
|
||||
//
|
||||
// ## Pose 6DOF sensor attributes:
|
||||
// SNS_STD_SENSOR_ATTRID_TYPE is "pose_6dof"
|
||||
//
|
||||
// ## Request Message: sns_std_sensor_config
|
||||
// sns_std_sensor_config::sample_rate is used to specify the sampling rate (Hz)
|
||||
// of the Pose 6DOF sensor. Sensor will generate data events at this rate.
|
||||
//
|
||||
// ## Event Message: sns_std_sensor_event
|
||||
// Output of the Pose 6DOF sensor will be populated in sns_std_sensor_event
|
||||
//
|
||||
// A Pose 6DOF sensor reports the orientation of the device relative
|
||||
// to the East-North-Up coordinates frame. It is obtained by
|
||||
// integration of accelerometer and gyroscope readings.
|
||||
// The East-North-Up coordinate system is defined as a direct
|
||||
// orthonormal basis where:
|
||||
//
|
||||
// - X points east and is tangential to the ground.
|
||||
// - Y points north and is tangential to the ground.
|
||||
// - Z points towards the sky and is perpendicular to the ground.
|
||||
//
|
||||
// The orientation is represented by the rotation necessary to align
|
||||
// the East-North-Up coordinates with the device's coordinates. That is,
|
||||
// applying the rotation to the world frame (X,Y,Z) would align them with
|
||||
// the device coordinates (x,y,z).
|
||||
//
|
||||
// The rotation can be seen as rotating the device by an angle theta around an
|
||||
// axis rot_axis to go from the reference (East-North-Up aligned) device
|
||||
// orientation to the current device orientation. The rotation is encoded
|
||||
// as the four unitless x, y, z, w components of a unit quaternion:
|
||||
//
|
||||
// sns_std_sensor_event::data[0] = x*sin(theta/2)
|
||||
// sns_std_sensor_event::data[1] = y*sin(theta/2)
|
||||
// sns_std_sensor_event::data[2] = z*sin(theta/2)
|
||||
// sns_std_sensor_event::data[3] = cos(theta/2)
|
||||
// sns_std_sensor_event::data[4] = Translation along x axis from an arbitrary origin.
|
||||
// sns_std_sensor_event::data[5] = Translation along y axis from an arbitrary origin.
|
||||
// sns_std_sensor_event::data[6] = Translation along z axis from an arbitrary origin.
|
||||
// sns_std_sensor_event::data[7] = Delta quaternion rotation x*sin(theta/2)
|
||||
// sns_std_sensor_event::data[8] = Delta quaternion rotation y*sin(theta/2)
|
||||
// sns_std_sensor_event::data[9] = Delta quaternion rotation z*sin(theta/2)
|
||||
// sns_std_sensor_event::data[10] = Delta quaternion rotation cos(theta/2)
|
||||
// sns_std_sensor_event::data[11] = Delta translation along x axis.
|
||||
// sns_std_sensor_event::data[12] = Delta translation along y axis.
|
||||
// sns_std_sensor_event::data[13] = Delta translation along z axis.
|
||||
// sns_std_sensor_event::data[14] = Sequence number; ascending sequentially from 0
|
||||
|
||||
// Where:
|
||||
// - the x, y and z fields of rot_axis are the East-North-Up coordinates
|
||||
// of a unit length vector representing the rotation axis
|
||||
// - theta is the rotation angle
|
||||
//
|
||||
// sns_std_sensor_event::status specifies the reliability of the sample value
|
||||
// value is of type sns_std_sensor_sample_status. see sns_std_sensor.proto for
|
||||
// details.
|
||||
@@ -1,46 +0,0 @@
|
||||
// @file sns_ppg.proto
|
||||
//
|
||||
// Defines the API for PPG Sensors.
|
||||
//
|
||||
// Copyright (c) 2017-2018,2020 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std_sensor.proto";
|
||||
import "sns_physical_sensor_test.proto";
|
||||
|
||||
// Attribute requirements:
|
||||
// The PPG Sensor publishes:
|
||||
// 1. SNS_STD_SENSOR_ATTRID_TYPE attribute value as "ppg".
|
||||
// 2. SNS_STD_SENSOR_ATTRID_RATES attribute values in Hz.
|
||||
|
||||
// Handling stream requests:
|
||||
// 1. The PPG Sensor handles the sns_std_sensor_config
|
||||
// message request with msgid SNS_STD_SENSOR_MSGID_SNS_STD_SENSOR_CONFIG
|
||||
// for all stream enable/update requests.
|
||||
// SNS_STD_SENSOR_ATTRID_STREAM_TYPE: SNS_STD_SENSOR_STREAM_TYPE_STREAMING
|
||||
// 2. The PPG Sensor uses batching_period item in
|
||||
// sns_std_request as the requested batching rate to determine
|
||||
// hardware FIFO watermark.
|
||||
|
||||
// Handling stream events:
|
||||
// 1. The PPG Sensor publishes PPG data stream events
|
||||
// using the sns_std_sensor_event message.
|
||||
// 2. Each stream event contains three output data fields
|
||||
// data[0] => PPG ch1
|
||||
// data[1] => PPG ch2
|
||||
// data[2] => PPG ch3
|
||||
// data[3] => PPG ch4
|
||||
// data[4] => TOUCH_FLAG. 128 if onbody detect, 0 otherwise
|
||||
// data[5] => WEAR_INDEX. 1 if wear loose, 0 otherwise
|
||||
// 3. Each stream event publishes an accuracy field:
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_UNRELIABLE to mark invalid samples when hardware is
|
||||
// yet to stabilize after the sensor is configured.
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_ACCURACY_HIGH to mark samples when they are valid.
|
||||
// 4. The PPG Sensor publishes a configuration event using the
|
||||
// sns_std_sensor_physical_config_event message.
|
||||
// It publishes this event each time there is change in hardware config of the sensor
|
||||
// and contains current physical sensor config of the sensor.
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
// @file sns_pressure.proto
|
||||
//
|
||||
// Defines the API for Pressure Sensors.
|
||||
// All Pressure Sensor drivers are required to comply with this API.
|
||||
// Any new functionality for Pressure Sensor can be defined in a
|
||||
// device specific API file.
|
||||
//
|
||||
// Copyright (c) 2016-2018 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std_sensor.proto";
|
||||
import "sns_physical_sensor_test.proto";
|
||||
import "sns_cal.proto";
|
||||
|
||||
// Attribute requirements:
|
||||
// The Pressure Sensor publishes:
|
||||
// 1. SNS_STD_SENSOR_ATTRID_TYPE attribute value as "pressure".
|
||||
// 2. SNS_STD_SENSOR_ATTRID_RESOLUTIONS attribute values in hectoPascal/LSB unit.
|
||||
// 3. SNS_STD_SENSOR_ATTRID_RANGES attribute values in hectoPascal unit.
|
||||
// 4. See sns_std_sensor.proto for other attributes.
|
||||
|
||||
// Handling stream requests:
|
||||
// 1. The Pressure Sensor handles the sns_std_sensor_config
|
||||
// message request for all stream enable/update requests.
|
||||
// 2. If the physical sensor supports hardware FIFO then the Pressure
|
||||
// Sensor uses batching_period item in sns_std_request as the requested
|
||||
// batching rate to determine hardware FIFO watermark.
|
||||
|
||||
// Handling stream events:
|
||||
// 1. The Pressure Sensor publishes atmospheric pressure data stream events
|
||||
// using the sns_std_sensor_event message.
|
||||
// 2. Each stream event contains one output data field where data is
|
||||
// factory calibrated and ordered as:
|
||||
// data[0] = Pressure data in hPa (hectoPascal)
|
||||
// 3. Each stream event publishes an accuracy field:
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_UNRELIABLE to mark invalid samples when hardware is
|
||||
// yet to stabilize after the sensor is configured.
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_ACCURACY_HIGH to mark samples when they are valid.
|
||||
// 4. The Pressure Sensor publishes a configuration event using the
|
||||
// sns_std_sensor_physical_config_event message.
|
||||
// It publishes this event each time there is change in hardware config of the sensor
|
||||
// and contains current physical sensor config of the sensor.
|
||||
// 5. The Pressure Sensor publishes a factory calibration event using the
|
||||
// sns_cal_event message. It uses bias and scale_factor fields in this event.
|
||||
// It publishes this event each time there is change in it's factory calibration
|
||||
// data or when a client sends a new streaming request.
|
||||
|
||||
// Handling self-test requests:
|
||||
// 1. The Pressure Sensor implements SNS_PHYSICAL_SENSOR_TEST_TYPE_COM test
|
||||
// type using the physical sensor test API.
|
||||
// 2. The Pressure Sensor implements SNS_PHYSICAL_SENSOR_TEST_TYPE_FACTORY test
|
||||
// type to determine factory calibration parameters using the physical
|
||||
// sensor test API.
|
||||
// 3. The Pressure Sensor could implement other test types.
|
||||
|
||||
// Handling test events:
|
||||
// 1. The Pressure Sensor uses sns_physical_sensor_test_event message to publish
|
||||
// a test completion event.
|
||||
// 2. The test_passed field in sns_physical_sensor_test_event is used to output the
|
||||
// pass/fail result of self-test execution.
|
||||
// 3. The test_data field in sns_physical_sensor_test_event could be used to output any
|
||||
// driver-specific error data.
|
||||
@@ -1,111 +0,0 @@
|
||||
// @file sns_proximity.proto
|
||||
//
|
||||
// Defines the API for Proximity Sensors.
|
||||
// All Proximity Sensor drivers are required to comply with this API.
|
||||
// Any new functionality for Proximity Sensor can be defined in a
|
||||
// device specific API file.
|
||||
//
|
||||
// Copyright (c) 2016-2019 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
import "sns_std_sensor.proto";
|
||||
import "sns_physical_sensor_test.proto";
|
||||
import "sns_cal.proto";
|
||||
|
||||
// Attribute requirements:
|
||||
// The Proximity Sensor publishes:
|
||||
// 1. SNS_STD_SENSOR_ATTRID_TYPE attribute value as "proximity".
|
||||
// 2. SNS_STD_SENSOR_ATTRID_RESOLUTIONS attribute is not applicable since this
|
||||
// is an event sensor.
|
||||
// 3. SNS_STD_SENSOR_ATTRID_RANGES attribute values in cm unit (proximity distance).
|
||||
// 4. See sns_std_sensor.proto for other attributes.
|
||||
|
||||
// Handling stream requests:
|
||||
// 1. The Proximity Sensor supports both streaming and on-change
|
||||
// modes and the operating mode is configured in the Registry.
|
||||
// 2. The streaming Proximity Sensor handles the sns_std_sensor_config request
|
||||
// for all stream enable/update requests.
|
||||
// 3. The on-change Proximity Sensor handles the
|
||||
// SNS_STD_SENSOR_MSGID_SNS_STD_ON_CHANGE_CONFIG request for
|
||||
// all on-change enable/update requests.
|
||||
// 4. In on-change mode the Sensor uses interrupt operation and reports
|
||||
// samples only for NEAR/FAR transitions.
|
||||
|
||||
// Message IDs for proximity Sensor
|
||||
enum sns_proximity_msgid {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
// Uses message: sns_proximity_event
|
||||
// Purpose: A non-recurring output data event from the proximity sensor to its client.
|
||||
SNS_PROXIMITY_MSGID_SNS_PROXIMITY_EVENT = 769;
|
||||
|
||||
// Uses message: sns_proximity_event_recurrent
|
||||
// Purpose: A recurring output data event from the proximity sensor to its client.
|
||||
SNS_PROXIMITY_MSGID_SNS_PROXIMITY_EVENT_RECURRENT = 1031;
|
||||
}
|
||||
|
||||
enum sns_proximity_event_type {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_PROXIMITY_EVENT_TYPE_FAR = 0;
|
||||
SNS_PROXIMITY_EVENT_TYPE_NEAR = 1;
|
||||
}
|
||||
|
||||
// Events types from proximity Sensor
|
||||
message sns_proximity_event
|
||||
{
|
||||
// Proximity NEAR/FAR output event
|
||||
required sns_proximity_event_type proximity_event_type = 1 [default = SNS_PROXIMITY_EVENT_TYPE_FAR];
|
||||
|
||||
// Proimity sensor raw data
|
||||
required uint32 raw_adc = 2;
|
||||
|
||||
// Proximity sensor sample status
|
||||
required sns_std_sensor_sample_status status = 3 [default = SNS_STD_SENSOR_SAMPLE_STATUS_UNRELIABLE];
|
||||
}
|
||||
|
||||
message sns_proximity_event_recurrent
|
||||
{
|
||||
// Proximity NEAR/FAR output event
|
||||
required sns_proximity_event_type proximity_event_type = 1 [default = SNS_PROXIMITY_EVENT_TYPE_FAR];
|
||||
|
||||
// Proimity sensor raw data
|
||||
required uint32 raw_adc = 2;
|
||||
|
||||
// Proximity sensor sample status
|
||||
required sns_std_sensor_sample_status status = 3 [default = SNS_STD_SENSOR_SAMPLE_STATUS_UNRELIABLE];
|
||||
}
|
||||
|
||||
// Handling stream events:
|
||||
// 1. The Proximity Sensor publishes object proximity data stream events
|
||||
// using sns_proximity_event message.
|
||||
// 2. Each stream event publishes an accuracy field:
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_UNRELIABLE to mark invalid samples when hardware is
|
||||
// yet to stabilize after the sensor is configured.
|
||||
// SNS_STD_SENSOR_SAMPLE_STATUS_ACCURACY_HIGH to mark samples when they are valid.
|
||||
// 3. The Proximity Sensor publishes a configuration event using the
|
||||
// sns_std_sensor_physical_config_event message.
|
||||
// It publishes this event each time there is a change in hardware config of the sensor
|
||||
// and contains current physical sensor config of the sensor.
|
||||
|
||||
// Handling self-test requests:
|
||||
// 1. The Proximity Sensor implements SNS_PHYSICAL_SENSOR_TEST_TYPE_COM test
|
||||
// type using the physical sensor test API.
|
||||
// 2. The Proximity Sensor implements SNS_PHYSICAL_SENSOR_TEST_TYPE_FACTORY test
|
||||
// type to determine factory calibration parameters using the physical
|
||||
// sensor test API. The factory test for Proximity Sensor calibrates
|
||||
// the sensor to detect an object (including light and dark colored)
|
||||
// at 5cm distance from the physical sensor.
|
||||
// 3. The Proximity Sensor could implement other test types.
|
||||
|
||||
// Handling test events:
|
||||
// 1. The Proximity Sensor uses sns_physical_sensor_test_event message to publish
|
||||
// a test completion event.
|
||||
// 2. The test_passed field in sns_physical_sensor_test_event is used to output the
|
||||
// pass/fail result of self-test execution.
|
||||
// 3. The test_data field in sns_physical_sensor_test_event could be used to output any
|
||||
// driver-specific error data.
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
// @file sns_psmd.proto
|
||||
//
|
||||
// Defines the API for Persistent Stationary/Motion Detection Sensors.
|
||||
//
|
||||
// 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";
|
||||
|
||||
// A persistent stationary/motion sensor reports once
|
||||
// - The device is moving/not still
|
||||
// - The device is detected to be still/stationary
|
||||
// The period of time to monitor for motion and stationarity should be greater
|
||||
// than 5 seconds, and less than 10 seconds. After reporting, conceptually
|
||||
// the algorithm's state is reset, and detection begins again.
|
||||
//
|
||||
// Motion here refers to any mechanism in which the device is causes to be
|
||||
// moved in its inertial frame. eg: Picking up the device and walking with it
|
||||
// to a nearby room may trigger motion whereas keeping the device on a table
|
||||
// on a smooth train moving at constant velocity may not trigger motion.
|
||||
//
|
||||
// Stationarity here refers to absolute stationarity. eg: device on desk.
|
||||
//
|
||||
// ## Persistent Stationary/Motion Detect sensor attributes:
|
||||
// SNS_STD_SENSOR_ATTRID_TYPE is "psmd"
|
||||
// SNS_STD_SENSOR_ATTRID_STREAM_TYPE: SNS_STD_SENSOR_STREAM_TYPE_ON_CHANGE
|
||||
|
||||
// Message IDs for Persistent Stationary/Motion Sensor
|
||||
enum sns_psmd_msgid
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
// Configuration Request
|
||||
SNS_PSMD_MSGID_SNS_PSMD_CONFIG = 512;
|
||||
|
||||
// Empty Event
|
||||
// Indicates that the requested state has been detected
|
||||
SNS_PSMD_MSGID_SNS_PSMD_EVENT = 768;
|
||||
}
|
||||
|
||||
// Detected states supported by the PSM Detector
|
||||
enum sns_psmd_type
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_PSMD_TYPE_STATIONARY = 0;
|
||||
SNS_PSMD_TYPE_MOTION = 1;
|
||||
}
|
||||
|
||||
// Configuration Message
|
||||
// Used to specify the PSMD configuration
|
||||
message sns_psmd_config
|
||||
{
|
||||
// Which detector type to enable
|
||||
required sns_psmd_type type = 1;
|
||||
}
|
||||
@@ -1,86 +0,0 @@
|
||||
// @file sns_registry.proto
|
||||
//
|
||||
// Sensors Registry message definitions for internal and external clients
|
||||
//
|
||||
// Copyright (c) 2017,2020 Qualcomm Technologies, Inc.
|
||||
// All Rights Reserved.
|
||||
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
|
||||
// Registry Sensor Attribute Requirements:
|
||||
// SNS_STD_SENSOR_ATTRID_TYPE: "registry"
|
||||
// SNS_STD_SENSOR_ATTRID_STREAM_TYPE: SNS_STD_SENSOR_STREAM_TYPE_SINGLE_OUTPUT
|
||||
|
||||
// Registry Sensor message IDs:
|
||||
enum sns_registry_msgid {
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
SNS_REGISTRY_MSGID_SNS_REGISTRY_READ_REQ = 512;
|
||||
SNS_REGISTRY_MSGID_SNS_REGISTRY_WRITE_REQ = 513;
|
||||
// The following event was mistakenly given an invalid message ID
|
||||
SNS_REGISTRY_MSGID_SNS_REGISTRY_READ_EVENT = 514;
|
||||
SNS_REGISTRY_MSGID_SNS_REGISTRY_WRITE_EVENT = 768;
|
||||
}
|
||||
|
||||
message sns_registry_data
|
||||
{
|
||||
message item
|
||||
{
|
||||
option (nanopb_msgopt).no_unions = true;
|
||||
|
||||
// Item name (i.e. Only item-specific name, sans group name)
|
||||
required string name = 1;
|
||||
optional fixed32 version = 2;
|
||||
|
||||
oneof data
|
||||
{
|
||||
sns_registry_data subgroup = 10;
|
||||
string str = 11;
|
||||
float flt = 12;
|
||||
sfixed64 sint = 13;
|
||||
}
|
||||
}
|
||||
repeated item items = 3;
|
||||
}
|
||||
|
||||
// All read requests will be replied with a read event
|
||||
message sns_registry_read_req
|
||||
{
|
||||
// Full name of the item or group to be read
|
||||
required string name = 1;
|
||||
}
|
||||
|
||||
message sns_registry_read_event
|
||||
{
|
||||
// Full name of the group which was read
|
||||
required string name = 1;
|
||||
|
||||
// If the requested registry group was not found, data is empty
|
||||
required sns_registry_data data = 2;
|
||||
}
|
||||
|
||||
// All write requests will be replied with a write event
|
||||
message sns_registry_write_req
|
||||
{
|
||||
// Full name of the group to be written
|
||||
required string name = 1;
|
||||
|
||||
required sns_registry_data data = 2;
|
||||
}
|
||||
|
||||
// Registry write status
|
||||
enum sns_registry_write_status
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
|
||||
// The registry write was successful, and the data was stored on the FS
|
||||
SNS_REGISTRY_WRITE_STATUS_SUCCESS = 0;
|
||||
// An unspecified error has occurred; data may be lost
|
||||
SNS_REGISTRY_WRITE_STATUS_ERROR_OTHER = 1;
|
||||
}
|
||||
|
||||
message sns_registry_write_event
|
||||
{
|
||||
required sns_registry_write_status status = 1;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user