Get desktop application:
View/edit binary Protocol Buffers messages
Analog pin number refers to the numeric value in A0, A1, A2... use this to request values from an analog pin on the Device.
Used in:
AnalogValue contains a stream of single-dimensional integer values collected from an analog pin on the Device.
Used in:
Used in: ,
An experiment may be recorded in one locale and displayed in another locale. We will not attempt to store all possible translations of a sensor’s name just in case it is displayed in a different locale. However, we may wish at some point to have a UI element change if we know we’re showing a foreign language. The format is a BCP 47 language tag, like "en-US"
Display name
Displayed string representing the units of the value
Asset path to the small icon (for tab display)
Short description that is shown on meter-mode card
Allows a sensor to specify that it should be rounded in a particular way
Asset path to the large icon (for display in snapshots)
Must be a string representation of a number. Valid values can be found at SensorTypeProvider#SensorKind.
_If_ the sensor is of type SensorTypeProvider.TYPE_CUSTOM, what pin does it read from?
_If_ the sensor is of type SensorTypeProvider.TYPE_CUSTOM, does it use a frequency filter?
_If_ the sensor is of type SensorTypeProvider.TYPE_CUSTOM, how is it scaled? A missing value means no scaling. If customFrequency is true, then this scaling is applied _after_ the frequency filter.
Defines a linear transform that maps the range [sourceBottom, sourceTop] in the incoming data to [destBottom, destTop] in the outgoing, filtered data.
Used in:
A user-added caption. This can be applied to trials and labels.
Used in: ,
A single change to the experiment. Adding, editing, or deleting labels, titles, or trials will all result in a new change being added here. Used for resoving conflicts between client and server.
Used in:
A UUID to identify the change.
A reference to the label or trial that was changed.
The type of change.
Used in:
Default. Do not use.
Used to signify a change that results in a new UUID being generated. Generally adding a trial or label.
Used to signify a change that removes an item with a UUID from the Experiment proto.
Used to signify a change that alters the content of an item with an existing UUID.
Used to signify changes that take place during a mergeFrom, such as Editing the title of an experiment to contain two titles. May be unused.
An indication of what element was changed by this change.
Used in:
The type of element changed.
The ExperimentID, LabelID or TrialID UUID of the edited element, or in the case of caption, the ID of the parent.
Used in:
Default. Do not use.
A note or label.
A trial. Not a note or label within a trial, just the trial itself.
The whole experiment. Used to indicate the Title.
A caption. Id should refer to the parent element.
Used in:
virtual type
virtual type
virtual type
Data type of a scalar
Proto containing information about a device that hosts sensors. This may be (a) the host device itself (phone or tablet) with internal sensors (b) an Arduino running the Science Journal firmware (c) an external piece of hardware (like Vernier sensor) discovered by a third-party app implementing the scalar API. Devices that host sensors that have been connected to are remembered as "My Devices", which puts them in a special section of the Manage Sensors page to be easily found again later. Added in V2.
Used in:
Provider, address, hostid, etc.
Display name
Digital pin number refers to the numeric value in D2, D3... use this to request values from a digital pin on the Device.
Used in:
DigitalValue contains a stream of single-dimensional boolean values collected from an digital pin on the Device. We use bool to represent DigitalValues, although packed bytes would be a more efficient encoding.
Used in:
(message has no fields)
Used in:
Text description of error.
Experiment protobuf definition. Added in V2.
The timestamp that this experiment was created.
The user-entered title of this experiment.
The user-entered description of this experiment. This is deprecated in version 1.1, when old descriptions were turned into text notes.
SensorLayouts associated with this experiment. (That is, the sensors that are currently shown in cards)
Trials in this experiment.
Labels in this experiment.
Sensors included in or excluded from this experiment. (should use availableSensors instead; this field was never populated.)
Sensor triggers associated with sensors in this experiment.
Deprecated, use fileVersion below
Deprecated, use fileVersion below
Which sensors are currently shown as available in the sensor cards to be observed. If a host device is not able to observe sensors in availableSensors, perhaps because it loaded an experiment created from a different device, those sensors will be disabled in sensor cards.
Identifies the intended format version of this file, and the app that wrote it. See version.proto for details.
The total number of trials ever made in this experiment. This is used to create unique names for untitled trials, i.e. "Recording 1", "Recording 2", etc, so that no two recordings in one experiment ever use the same name. This differs from GoosciUserMetadata.ExperimentOverview.trialCount because it is monotonically increasing, whereas trialCount will decrease when trials are deleted.
The path to an image to be used as the Experiment image in the experiment list. Should be relative to the experiment directory.
The list of changes that have been made to the experiment over time.
Version 1.1: Added
Used in:
The sensor ID associated with this within this experiment. This has no global uniqueness or parseable meaning outside this experiment
The spec of the sensor with this id.
The overall collection of Experiments known to the user. Next Tag: 3 LINT: LEGACY_NAMES
The folder ID of the "Science Journal" folder.
Data about an experiment that is specific to a device. Some data, like title and imagePath, is duplicated here in order to make the Experiment List load faster: this way we don't need to parse every available experiment.
Used in:
Our local lookup Id for this experiment.
The user-entered title of this experiment.
The path to an image used for this experiment, if applicable.
The time when this experiment was last used.
The number of trials in this experiment.
Whether this experiment is archived.
Index into the Experiment Colors array. This allows the experiment to have a consistent color overlay if its imagePath is not yet set. See values/experiment_colors.xml.
Sensors included or excluded in an experiment. TODO: Work with saff to figure out if other information needs to be included, such as a name the user gives their device that represents the type of sensors.
Used in:
The sensor ID
Whether this sensor is included.
The sync status of a single experiment.
Used in:
The Experiment ID.
Whether or not the experiment has any local changes.
The last synced version from Drive/
The status we last saw on drive for whether or not the experiment is archived.
Whether or not the experiment is locally downloaded.
Represents the version of a file that is written and may someday be shared with another version of the app. Added in V2.
Used in: ,
The version code of this proto. Devices may use this to understand what version of data they are working with, and to perform upgrades. A combination of the major and minor versions is used to understand what is available in this proto. Major version numbers represent large, non-backwards-compatable changes. See ExperimentCache#upgradeExperimentVersionIfNeeded for more on versions. Version 1.1: Initial version
The minor verion code for this proto. Devices may use this to understand what version of data they are working with, and to perform upgrades. A combination of the major and minor versions is used to understand what is available in this proto. Minor version numbers represent small, non-breaking changes. A device running an older version of Science Journal should be able to parse a proto with a newer minorVersion so long as the version is the same. However, that device should only *read* and not *write* older version protos because data would be lost in the write. This value should be odd in pre-release builds of Science Journal, and even for release versions, for further safety. See ExperimentCache#upgradeExperimentVersionIfNeeded for more on versions. Version 1.1: Initial version
Which platform last wrote this file (Android or iOS)
This is a monotonically-increasing, platform-specific number. Ideally, it should not be needed to understand the semantics of files written by released builds of the app. However, in the event a bug is introduced that effects written files, this may help to identify the affected files.
FloatValue contains a stream of single-dimensional floating point values synthesized by the Firmware from data collected on the Device.
Used in:
Information about a device (which contains sensors) or sensor (which can give a data stream) that has been seen on this platform. Please see usage in context in sensor_spec.proto and device_spec.proto Added in V2
Used in: ,
Platform on which this gadget was instantiated.
Identifies a SensorDiscoverer implementation. The result should be a key in the map returned by WhistlePunkApplication#getExternalSensorDiscoverers.
Opaque to Science Journal, but meaningful to each SensorDiscoverer. It should have a one-to-one relationship with connectable gadgets. That is, if two GadgetInfo have the same address, that means they refer to the same gadget, possibly with two different configurations. We assume that it’s not possible to observe two gadgets with the same address at the same time.
A meaningless GUID that identifies the host device that hosted this gadget last. This allows us to distinguish between gadgets that were seen on the user’s current host devices, and sensors that were seen on some other device.
A human-readable string that can be displayed to explain which host device hosted this gadget.
Used in: ,
the path to an image that is used to represent a sensor
Used in:
The format and interpretation of this string depends on PathType
Used in:
The path string is the sensor id used by the Android implementation for the built-in sensor. Internal code should look up the appropriate icon and display it.
Legacy type from Android. The path string is the string representation of an integer representing SensorTypeProvider#SensorKind TODO: replace with better system
Used to signify sensors whose appearances are loaded from the appearance proto. path_string will be empty for these sensors. TODO: populate path_string and load image from there.
Arduino MkrSci path type. The path string is sensor_id:handler_id.
id of the provider that found this device (see SensorProvider#getProviderId)
provider-specific "address" identifying the device
IntValue contains a stream of single-dimensional integer values synthesized by the Firmware from data collected on the Device.
Used in:
How many times, and how frequently the Device should return values for this request. If count is greater than 1, then the Device should return values every frequency milliseconds until the count is exceeded.
Used in:
Label protobuf definition Added in V2.
Used in: ,
The ID is unique within an experiment, but cannot be assumed to be unique across experiments, as users may "copy" entire experiments from Drive. This ID should probably be a unique GUID.
The time in ms since the epoch which represents this label in time. This may be the time at which the label was created, but some labels have editable timestamps.
The time that the label was created. This is not editable.
An optional user-added caption. Not all labels will make use of this field. Currently text labels will not use this, but picture, trigger, and snapshot will.
The type this label represents. This can be used to reference the type of proto_data.
A proto can be written to this field to represent the label's data. See ValueType above for which proto will be used in protoData for each ValueType.
Used in:
A text label.
This ValueType is associated with protoData field of text_label_value.proto.
A label that has a picture and may also have a text
caption. This ValueType is associated with protoData of picture_label_value.proto.
A label created from a sensor trigger.
This ValueType is associated with protoData field of sensor_trigger_label_value.proto.
A label with value snapshot(s) for one or more sensors.
This ValueType is associated with protoData of snapshot_label_value.proto.
A label with a sketch. This ValueType is associated with
The contents of a label, able to represent many different types of data. This is deprecated in V2.
Data can be used to store a diverse set of label values. Each label type should have its own set of keys into this map to store required information. For example, a text label might have a key for the text field, and the value would be the text itself. A captioned picture label might have a key/value pair for the caption, and another key/value pair for the URI of the picture. This storage flexibility enables future types of labels to store many different formats of information without the programmer knowing ahead of time which label types might exist. Other files, like images, can be referenced using this map and should be named by a unique GUID and placed in the assets directory within the experiment.
The type this LabelValue represents.
TODO: document how data and proto_data are written and read for each type
Used in:
A text label.
A label that has a picture and may also have a text caption.
A label created from a sensor trigger.
A label created automatically by Science Journal.
The sync status of every locally known experiment.
The last version of the ExperimentLibrary that we have synced.
A value that can be stored in the proto_data field of label.proto, to store data about a picture. Added in V2.
The path to the picture file. This is relative to the experiments folder, for example: if the filePath is "assets/picture.jpg", and the experiment is stored in folder "experiment_17", this means the picture can be loaded from "experiment_17/assets/picture.jpg"
Pin of a specific type.
Used in: ,
A time range
Used in:
The start of a range.
The end of a range.
Used in:
Used in:
Phone to Device request to initiate sensor data collection and reporting from multiple pins over an interval. The timestamp is used to synchronize the (inaccurate) clock on the device to the (accurate) clock on the phone.
Used in: ,
id, to be looked up in either the Experiment.availableSensors or Trial.sensorAppearances field depending on the context.
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.
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.
The minimum value shown on the Y axis.
The maximum value shown on the Y axis.
The IDs of active SensorTriggers for this layout.
The index into the sensor card color array. See values/graph_colors.xml.
Used in:
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"
For scalar sensors: show an evolving line graph of the value
Specification of an observable sensor. Added in V2
Used in: , ,
Provider, address, hostid, etc.
Opaque to Science Journal, but meaningful to each SensorDiscoverer. Each SensorDiscoverer can place whatever proto it wants here that contains all the information it needs, beyond the address, to connect to, configure, and relay data from a particular sensor in a particular configuration.
contains all of the data necessary to display a sensor as part of a trial
Represents a single stat, i.e. average = 42 or num_data_points = 17.
Used in:
The stat type
The value of the stat.
Used in:
The minimum value.
The maximum value.
The average value.
The count of data points.
The total duration over which the stats are calculated.
The number of zoom presenter tiers.
The zoom level between tiers.
Trial stats for a single sensor. Each sensor may have multiple individual stats.
Used in:
The sensor ID associated with this stat (to be looked up in sensorAppearances)
Used in:
The stats are updated and valid.
The stats need an update and are not currently valid.
Represents a sensor trigger. Added in V2.
Used in:
The sensor ID associated with this trigger. This is not mutable.
The timestamp of when this trigger was last used. This is updated with any setters to the trigger, but it is the responsibility of the client to update the database.
The Trigger Information describing this trigger.
The unique ID of this trigger.
A value that can be stored in the proto_data field of label.proto, to store a sensor trigger label's data. Added in V2.
The sensor that recorded the trigger.
This represents the sensor trigger which fired to produce this note. This can be used to populate note text or do other work.
A value that can be stored in the proto_data field of label.proto, to store a set of sketched values.
The snapshot of a sketch.
A value that can be stored in the proto_data field of label.proto, to store a set of snapshotted values from one or more sensors. Added in V2.
All of the snapshots
Used in:
The sensor that recorded the value
The time in ms since the epoch at which this datapoint was recorded. This may not match the timestamp at which the snapshot button was pressed, because the data point grabbed may be slightly before or after
The sensor value recorded
StringValue contains a stream of single-dimensional string values synthesized by the Firmware from data collected on the Device.
Used in:
A single experiment to be synced to Drive. Next Tag: 7
Used in:
The Drive fileId.
The experimentId from the experiment.
The timestamp of the last time the experiment was opened.
The timestamp of the last time the experiment was modified.
Whether the experiment has been deleted.
Whether the experiment has been archived.
The Drive folder that is used to store synced data
The folder id.
A value that can be stored in the proto_data field of label.proto, to store a set of snapshotted values from one or more sensors. Added in V2.
The user's text.
Trial protobuf definition Added in V2.
Used in:
The ID is unique within an experiment, but cannot be assumed to be unique across experiments. This is also used to reference the file containing trial data, which is stored separately, as users may "copy" entire experiments from Drive. This ID should probably be a unique GUID.
The timestamp that this trial was created.
The user-entered title of this trial.
Whether the experiment is currently archived.
The range of the original recording.
The range of the cropped recording, if this trial is cropped.
Whether auto-zoom is enabled.
SensorLayouts associated with this trial.
Stats associated with this trial.
Labels that are part of this trial.
An optional user-added caption.
Which sensors are shown, and how to show them.
The order of this trial within the experiment, compared to all the trials ever made in this experiment. This is used to generate a name for the trial if no name is set by the user, i.e. "Recording 1", "Recording 2", etc. No two trials within an experiment should have the same index. Starts at 1 (different from an index, which starts at 0!)
Version 1.2: Added
Used in:
The sensor ID associated with this within this experiment. This has no global uniqueness or parseable meaning outside this experiment
The appearance of the sensor with this id. contains all of the data necessary to display a sensor as part of this trial
TriggerInformation contains metadata users can set and edit on a particular trigger.
Used in: ,
The value at which this trigger fires.
The text for a note, if this is a TRIGGER_ACTION_NOTE.
Whether the trigger should activate only when recording (or all the time)
What type of action should be taken when the trigger fires?
Used in:
The type of alert to use when the trigger fires, if this is an TRIGGER_ACTION_ALERT type.
Used in:
What data pattern causes the trigger to fire?
Used in:
Represents metadata shared across the whole Science Journal app for one user. Added in V2.
Experiment state that is per-user, such as whether the experiment is archived.
Deprecated, use fileVersion below
Deprecated, use fileVersion below
"My Devices" are added to when a user connects to an external sensor, and are shown in a special section of the Manage Sensors screen. See device_spec.proto for details.
Identifies the intended format version of this file, and the app that wrote it. See version.proto for details.
(message has no fields)
See https://docs.google.com/document/d/10SgMM-_myVyfZQZ_afLipPv_x4aq4gQG2FTrY3oktXM/edit# for version policy and implementation details. Encode new versions using https://goosci.googlesource.com/android/+/master/proto/version_codec.py
Virtual pin refers to a non-physical pin capability on the Device, such as a Gooball orientation sensor that returns vectors of floats.
Used in: