Class TelemetryRecordOutput

java.lang.Object
frc.lib.telemetry.TelemetryRecordOutput
Direct Known Subclasses:
Telemetry

public class TelemetryRecordOutput extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    log(String key, boolean value)
    Records a single output field for easy access when viewing the log.
    static void
    log(String key, boolean[] value)
    Records a single output field for easy access when viewing the log.
    static void
    log(String key, boolean[][] value)
    Records a single output field for easy access when viewing the log.
    static void
    log(String key, byte[] value)
    Records a single output field for easy access when viewing the log.
    static void
    log(String key, byte[][] value)
    Records a single output field for easy access when viewing the log.
    static void
    log(String key, double value)
    Records a single output field for easy access when viewing the log.
    static void
    log(String key, double[] value)
    Records a single output field for easy access when viewing the log.
    static void
    log(String key, double[][] value)
    Records a single output field for easy access when viewing the log.
    static void
    log(String key, float value)
    Records a single output field for easy access when viewing the log.
    static void
    log(String key, float[] value)
    Records a single output field for easy access when viewing the log.
    static void
    log(String key, float[][] value)
    Records a single output field for easy access when viewing the log.
    static void
    log(String key, int value)
    Records a single output field for easy access when viewing the log.
    static void
    log(String key, int[] value)
    Records a single output field for easy access when viewing the log.
    static void
    log(String key, int[][] value)
    Records a single output field for easy access when viewing the log.
    static void
    log(String key, long value)
    Records a single output field for easy access when viewing the log.
    static void
    log(String key, long[] value)
    Records a single output field for easy access when viewing the log.
    static void
    log(String key, long[][] value)
    Records a single output field for easy access when viewing the log.
    static <E extends Enum<E>>
    void
    log(String key, E value)
    Records a single output field for easy access when viewing the log.
    static <E extends Enum<E>>
    void
    log(String key, E[] value)
    Records a single output field for easy access when viewing the log.
    static <E extends Enum<E>>
    void
    log(String key, E[][] value)
    Records a single output field for easy access when viewing the log.
    static <U extends edu.wpi.first.units.Unit>
    void
    log(String key, edu.wpi.first.units.Measure<U> value)
    Records a single output field for easy access when viewing the log.
    static <T, MessageType extends us.hebi.quickbuf.ProtoMessage<?>>
    void
    log(String key, edu.wpi.first.util.protobuf.Protobuf<T,MessageType> proto, T value)
    Records a single output field for easy access when viewing the log.
    static <T> void
    log(String key, edu.wpi.first.util.struct.Struct<T> struct, T value)
    Records a single output field for easy access when viewing the log.
    static <T> void
    log(String key, edu.wpi.first.util.struct.Struct<T> struct, T... value)
    Records a single output field for easy access when viewing the log.
    static <T> void
    log(String key, edu.wpi.first.util.struct.Struct<T> struct, T[][] value)
    Records a single output field for easy access when viewing the log.
    static void
    log(String key, String value)
    Records a single output field for easy access when viewing the log.
    static void
    log(String key, String[] value)
    Records a single output field for easy access when viewing the log.
    static void
    log(String key, String[][] value)
    Records a single output field for easy access when viewing the log.
    static void
    log(String key, BooleanSupplier value)
    Records a single output field for easy access when viewing the log.
    static void
    log(String key, DoubleSupplier value)
    Records a single output field for easy access when viewing the log.
    static void
    log(String key, IntSupplier value)
    Records a single output field for easy access when viewing the log.
    static void
    log(String key, LongSupplier value)
    Records a single output field for easy access when viewing the log.
    static void
    log(String key, org.littletonrobotics.junction.mechanism.LoggedMechanism2d value)
    Records a single output field for easy access when viewing the log.
    static <R extends Record>
    void
    log(String key, R value)
    Records a single output field for easy access when viewing the log.
    static <R extends Record>
    void
    log(String key, R... value)
    Records a single output field for easy access when viewing the log.
    static <R extends Record>
    void
    log(String key, R[][] value)
    Records a single output field for easy access when viewing the log.
    static <T extends edu.wpi.first.util.WPISerializable>
    void
    log(String key, T value)
    Records a single output field for easy access when viewing the log.
    static <T extends edu.wpi.first.util.struct.StructSerializable>
    void
    log(String key, T... value)
    Records a single output field for easy access when viewing the log.
    static <T extends edu.wpi.first.util.struct.StructSerializable>
    void
    log(String key, T[][] value)
    Records a single output field for easy access when viewing the log.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TelemetryRecordOutput

      public TelemetryRecordOutput()
  • Method Details

    • log

      public static void log(String key, byte[] value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static void log(String key, byte[][] value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static void log(String key, boolean value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static void log(String key, BooleanSupplier value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static void log(String key, boolean[] value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static void log(String key, boolean[][] value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static void log(String key, int value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static void log(String key, IntSupplier value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static void log(String key, int[] value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static void log(String key, int[][] value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static void log(String key, long value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static void log(String key, LongSupplier value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static void log(String key, long[] value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static void log(String key, long[][] value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static void log(String key, float value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static void log(String key, float[] value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static void log(String key, float[][] value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static void log(String key, double value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static void log(String key, DoubleSupplier value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static void log(String key, double[] value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static void log(String key, double[][] value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static void log(String key, String value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static void log(String key, String[] value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static void log(String key, String[][] value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static <E extends Enum<E>> void log(String key, E value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static <E extends Enum<E>> void log(String key, E[] value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static <E extends Enum<E>> void log(String key, E[][] value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static <U extends edu.wpi.first.units.Unit> void log(String key, edu.wpi.first.units.Measure<U> value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static <T> void log(String key, edu.wpi.first.util.struct.Struct<T> struct, T value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      This method serializes a single object as a struct. Example usage: recordOutput("MyPose", Pose2d.struct, new Pose2d())

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static <T> void log(String key, edu.wpi.first.util.struct.Struct<T> struct, T... value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method serializes an array of objects as a struct. Example usage: recordOutput("MyPoses", Pose2d.struct, new Pose2d(), new Pose2d()); recordOutput("MyPoses", Pose2d.struct, new Pose2d[] {new Pose2d(), new Pose2d()});

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static <T> void log(String key, edu.wpi.first.util.struct.Struct<T> struct, T[][] value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static <T, MessageType extends us.hebi.quickbuf.ProtoMessage<?>> void log(String key, edu.wpi.first.util.protobuf.Protobuf<T,MessageType> proto, T value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method serializes a single object as a protobuf. Protobuf should only be used for objects that do not support struct serialization. Example usage: recordOutput("MyPose", Pose2d.proto, new Pose2d())

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static <T extends edu.wpi.first.util.WPISerializable> void log(String key, T value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method serializes a single object as a struct or protobuf automatically. Struct is preferred if both methods are supported.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Type Parameters:
      T - The type
      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static <T extends edu.wpi.first.util.struct.StructSerializable> void log(String key, T... value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method serializes an array of objects as a struct automatically. Top-level protobuf arrays are not supported.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Type Parameters:
      T - The type
      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static <T extends edu.wpi.first.util.struct.StructSerializable> void log(String key, T[][] value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method serializes an array of objects as a struct automatically. Top-level protobuf arrays are not supported.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Type Parameters:
      T - The type
      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static <R extends Record> void log(String key, R value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method serializes a single object as a struct or protobuf automatically. Struct is preferred if both methods are supported.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Type Parameters:
      R - The type
      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static <R extends Record> void log(String key, R... value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method serializes an array of objects as a struct automatically. Top-level protobuf arrays are not supported.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Type Parameters:
      R - The type
      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static <R extends Record> void log(String key, R[][] value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      This method serializes an array of objects as a struct automatically. Top-level protobuf arrays are not supported.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Type Parameters:
      R - The type
      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.
    • log

      public static void log(String key, org.littletonrobotics.junction.mechanism.LoggedMechanism2d value)
      Records a single output field for easy access when viewing the log. On the simulator, use this method to record extra data based on the original inputs.

      The current position of the Mechanism2d is logged once as a set of nested fields. If the position is updated, this method must be called again.

      This method is not thread-safe and should only be called from the main thread. See the "Common Issues" page in the documentation for more details.

      Parameters:
      key - The name of the field to record. It will be stored under "/RealOutputs" or "/ReplayOutputs"
      value - The value of the field.