Class LogTable.LogValue

java.lang.Object
org.littletonrobotics.junction.LogTable.LogValue
Enclosing class:
LogTable

public static class LogTable.LogValue extends Object
Represents a value stored in a LogTable, including type and value.
  • Field Details

    • type

      public final LogTable.LoggableType type
      The log value type.
    • customTypeStr

      public final String customTypeStr
      The custom type string.
    • unitStr

      public final String unitStr
      The name of the unit.
  • Constructor Details

    • LogValue

      public LogValue(byte[] value, String typeStr)
      Creates a new LogValue.
      Parameters:
      value - The value.
      typeStr - The custom type string, or null for default.
    • LogValue

      public LogValue(boolean value, String typeStr)
      Creates a new LogValue.
      Parameters:
      value - The value.
      typeStr - The custom type string, or null for default.
    • LogValue

      public LogValue(long value, String typeStr)
      Creates a new LogValue.
      Parameters:
      value - The value.
      typeStr - The custom type string, or null for default.
    • LogValue

      public LogValue(float value, String typeStr)
      Creates a new LogValue.
      Parameters:
      value - The value.
      typeStr - The custom type string, or null for default.
    • LogValue

      public LogValue(float value, String typeStr, String unitStr)
      Creates a new LogValue.
      Parameters:
      value - The value.
      typeStr - The custom type string, or null for default.
      unitStr - The unit name, or null if unitless.
    • LogValue

      public LogValue(double value, String typeStr)
      Creates a new LogValue.
      Parameters:
      value - The value.
      typeStr - The custom type string, or null for default.
    • LogValue

      public LogValue(double value, String typeStr, String unitStr)
      Creates a new LogValue.
      Parameters:
      value - The value.
      typeStr - The custom type string, or null for default.
      unitStr - The unit name, or null if unitless.
    • LogValue

      public LogValue(String value, String typeStr)
      Creates a new LogValue.
      Parameters:
      value - The value.
      typeStr - The custom type string, or null for default.
    • LogValue

      public LogValue(boolean[] value, String typeStr)
      Creates a new LogValue.
      Parameters:
      value - The value.
      typeStr - The custom type string, or null for default.
    • LogValue

      public LogValue(long[] value, String typeStr)
      Creates a new LogValue.
      Parameters:
      value - The value.
      typeStr - The custom type string, or null for default.
    • LogValue

      public LogValue(float[] value, String typeStr)
      Creates a new LogValue.
      Parameters:
      value - The value.
      typeStr - The custom type string, or null for default.
    • LogValue

      public LogValue(double[] value, String typeStr)
      Creates a new LogValue.
      Parameters:
      value - The value.
      typeStr - The custom type string, or null for default.
    • LogValue

      public LogValue(String[] value, String typeStr)
      Creates a new LogValue.
      Parameters:
      value - The value.
      typeStr - The custom type string, or null for default.
  • Method Details

    • getRaw

      public byte[] getRaw()
      Returns the value from the object.
      Returns:
      The value.
    • getBoolean

      public boolean getBoolean()
      Returns the value from the object.
      Returns:
      The value.
    • getInteger

      public long getInteger()
      Returns the value from the object.
      Returns:
      The value.
    • getFloat

      public float getFloat()
      Returns the value from the object.
      Returns:
      The value.
    • getDouble

      public double getDouble()
      Returns the value from the object.
      Returns:
      The value.
    • getString

      public String getString()
      Returns the value from the object.
      Returns:
      The value.
    • getBooleanArray

      public boolean[] getBooleanArray()
      Returns the value from the object.
      Returns:
      The value.
    • getIntegerArray

      public long[] getIntegerArray()
      Returns the value from the object.
      Returns:
      The value.
    • getFloatArray

      public float[] getFloatArray()
      Returns the value from the object.
      Returns:
      The value.
    • getDoubleArray

      public double[] getDoubleArray()
      Returns the value from the object.
      Returns:
      The value.
    • getStringArray

      public String[] getStringArray()
      Returns the value from the object.
      Returns:
      The value.
    • getRaw

      public byte[] getRaw(byte[] defaultValue)
      Returns the value from the object.
      Parameters:
      defaultValue - The default value if the type doesn't match.
      Returns:
      The value.
    • getBoolean

      public boolean getBoolean(boolean defaultValue)
      Returns the value from the object.
      Parameters:
      defaultValue - The default value if the type doesn't match.
      Returns:
      The value.
    • getInteger

      public long getInteger(long defaultValue)
      Returns the value from the object.
      Parameters:
      defaultValue - The default value if the type doesn't match.
      Returns:
      The value.
    • getFloat

      public float getFloat(float defaultValue)
      Returns the value from the object.
      Parameters:
      defaultValue - The default value if the type doesn't match.
      Returns:
      The value.
    • getDouble

      public double getDouble(double defaultValue)
      Returns the value from the object.
      Parameters:
      defaultValue - The default value if the type doesn't match.
      Returns:
      The value.
    • getString

      public String getString(String defaultValue)
      Returns the value from the object.
      Parameters:
      defaultValue - The default value if the type doesn't match.
      Returns:
      The value.
    • getBooleanArray

      public boolean[] getBooleanArray(boolean[] defaultValue)
      Returns the value from the object.
      Parameters:
      defaultValue - The default value if the type doesn't match.
      Returns:
      The value.
    • getIntegerArray

      public long[] getIntegerArray(long[] defaultValue)
      Returns the value from the object.
      Parameters:
      defaultValue - The default value if the type doesn't match.
      Returns:
      The value.
    • getFloatArray

      public float[] getFloatArray(float[] defaultValue)
      Returns the value from the object.
      Parameters:
      defaultValue - The default value if the type doesn't match.
      Returns:
      The value.
    • getDoubleArray

      public double[] getDoubleArray(double[] defaultValue)
      Returns the value from the object.
      Parameters:
      defaultValue - The default value if the type doesn't match.
      Returns:
      The value.
    • getStringArray

      public String[] getStringArray(String[] defaultValue)
      Returns the value from the object.
      Parameters:
      defaultValue - The default value if the type doesn't match.
      Returns:
      The value.
    • getWPILOGType

      public String getWPILOGType()
      Returns the standard string type for WPILOGs. Returns the custom type string if not null.
      Returns:
      The type string.
    • getNT4Type

      public String getNT4Type()
      Returns the standard string type for NT4. Returns the custom type string if not null.
      Returns:
      The type string.
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object