- Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathsensor_layout.proto
69 lines (57 loc) · 2.76 KB
/
sensor_layout.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*
* Copyright 2019 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
syntax="proto2";
packagegoosci;
optionjava_package="com.google.android.apps.forscience.whistlepunk.data";
optionjava_outer_classname="GoosciSensorLayout";
optionobjc_class_prefix="GSJ";
optionoptimize_for=LITE_RUNTIME;
messageSensorLayout {
// id, to be looked up in either the Experiment.availableSensors or Trial.sensorAppearances
// field depending on the context.
optionalstringsensorId=1;
enumCardView {
METER=1; // For scalar sensors: show an icon and current reading as a large number
// For all cards: show a description of what's going on with this sensor, with
// affordance for "more info"
GRAPH=2; // For scalar sensors: show an evolving line graph of the value
// For all cards: show a "live preview" of what the graph would record, with
// appropriate density for someone who understands the sensor's purpose.
}
optionalCardViewcardView=2 [default = METER];
optionalboolaudioEnabled=3 [default = false];
optionalboolshowStatsOverlay=4 [default = false];
// Color, as a packed int as described in android.graphics.Color
//
// Default is 0 (transparent). We will interpret this as unset in code and replace with a
// more appropriate default.
optionalint32color=5 [default = 0, deprecated=true];
// Extra options for this card, which can be used by individual selected sensors.
// Keys in this map should begin with some fully-qualified package name that the adding code
// belongs to. For example, keys added by code written at google will begin with "com.google."
// This map will be made available as-is to SensorChoice implementations, which will interpret
// them as desired.
map<string, string> extras=6;
// The minimum value shown on the Y axis.
optionaldoubleminimumYAxisValue=7;
// The maximum value shown on the Y axis.
optionaldoublemaximumYAxisValue=8;
// The IDs of active SensorTriggers for this layout.
repeatedstringactiveSensorTriggerIds=9;
// The index into the sensor card color array.
// See values/graph_colors.xml.
optionalint32colorIndex=10 [default = 0];
};