blob: cd01f734983c2b33b61c34592c1500c132b42f05 [file] [log] [blame]
syntax = "proto2";
package frc971.analysis;
// Specification fo a Channel to pull from the logfile. The name and type will
// be the full name/type of the channel to pull from the logfile. The alias is a
// shorter, easier to type, name that the rest of the logfile will use to refer
// to the channel.
message Channel {
optional string name = 1;
optional string type = 2;
optional string alias = 3;
}
// A specification for a single signal within a Channel.
message Signal {
// Alias for the channel to pull the signal from--this should match an alias
// specified in one of the Channels.
optional string channel = 1;
// Specification of the field to plot. Currently, this only supports simple
// submessages, using dots. To access, e.g., the "bar" member of the "foo"
// submessage, field would be "foo.bar". This does not currently support
// working with repeated fields.
optional string field = 2;
}
// A single line to plot.
message Line {
// The signal to plot on the y-axis.
optional Signal y_signal = 1;
// If set, we will use this signal for the x-axis of the plot. By default, we
// will use the monotonic sent time of the message. This is helpful for both
// plotting against non-time based signals (e.g., plotting x/y robot position)
// as well as plotting against times other than the message sent time (e.g.,
// for the IMU where the sample capture time is separate from the actual
// sent time.
// Note that the x and y signals should have exactly the same number of
// entries--otherwise, we need to write logic to handle resampling one signal
// to a different rate.
optional Signal x_signal = 2;
}
// Message representing a single pyplot Axes, with specifications for exactly
// which signals to show in the supplied subplot.
message Axes {
repeated Line line = 1;
optional string ylabel = 2;
optional string xlabel = 3 [default = "Monotonic Time (sec)"];
// Whether to share an x-axis with all the other axes.
optional bool share_x_axis = 4 [default = true];
}
// Message representing a single pyplot figure.
message Figure {
repeated Axes axes = 1;
}
// This configuration specifies what to plot when reading from a logfile.
message PlotConfig {
// List of channels and their aliases to use in the plot.
repeated Channel channel = 1;
// Figures to plot.
repeated Figure figure = 2;
}