blob: c4c61c2f2a0b7453cd1148d82ef4531c38de75a6 [file] [log] [blame]
James Kuszmaul61a971f2020-01-01 15:06:18 -08001syntax = "proto2";
2
3package frc971.analysis;
4
5// Specification fo a Channel to pull from the logfile. The name and type will
6// be the full name/type of the channel to pull from the logfile. The alias is a
7// shorter, easier to type, name that the rest of the logfile will use to refer
8// to the channel.
9message Channel {
10 optional string name = 1;
11 optional string type = 2;
12 optional string alias = 3;
13}
14
15// A specification for a single signal within a Channel.
16message Signal {
17 // Alias for the channel to pull the signal from--this should match an alias
18 // specified in one of the Channels.
19 optional string channel = 1;
20 // Specification of the field to plot. Currently, this only supports simple
21 // submessages, using dots. To access, e.g., the "bar" member of the "foo"
22 // submessage, field would be "foo.bar". This does not currently support
23 // working with repeated fields.
24 optional string field = 2;
25}
26
James Kuszmaul14dad032020-01-19 17:56:59 -080027// A single line to plot.
28message Line {
29 // The signal to plot on the y-axis.
30 optional Signal y_signal = 1;
31 // If set, we will use this signal for the x-axis of the plot. By default, we
32 // will use the monotonic sent time of the message. This is helpful for both
33 // plotting against non-time based signals (e.g., plotting x/y robot position)
34 // as well as plotting against times other than the message sent time (e.g.,
35 // for the IMU where the sample capture time is separate from the actual
36 // sent time.
37 // Note that the x and y signals should have exactly the same number of
38 // entries--otherwise, we need to write logic to handle resampling one signal
39 // to a different rate.
40 optional Signal x_signal = 2;
41}
42
James Kuszmaul61a971f2020-01-01 15:06:18 -080043// Message representing a single pyplot Axes, with specifications for exactly
44// which signals to show in the supplied subplot.
45message Axes {
James Kuszmaul14dad032020-01-19 17:56:59 -080046 repeated Line line = 1;
James Kuszmaul61a971f2020-01-01 15:06:18 -080047 optional string ylabel = 2;
48}
49
50// Message representing a single pyplot figure.
51message Figure {
52 repeated Axes axes = 1;
53}
54
55// This configuration specifies what to plot when reading from a logfile.
56message PlotConfig {
57 // List of channels and their aliases to use in the plot.
58 repeated Channel channel = 1;
59 // Figures to plot.
60 repeated Figure figure = 2;
61}