Class DataLogWriter

java.lang.Object
dev.doglog.internal.log_thread.writers.DataLogWriter
All Implemented Interfaces:
LogWriterBase, LogWriterLowLevel

@NullMarked public class DataLogWriter extends Object implements LogWriterLowLevel
Logs to a WPILib DataLog.
  • Constructor Summary

    Constructors
    Constructor
    Description
    DataLogWriter(String logTable, DogLogOptions initialOptions)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    This could be a static method, but it's not because this class controls initializing DataLogManager, which has to be done before this method can be called.
    void
    log(long timestamp, String key, boolean forceNt, boolean value)
     
    void
    log(long timestamp, String key, boolean forceNt, boolean[] value)
     
    void
    log(long timestamp, String key, boolean forceNt, double value)
     
    void
    log(long timestamp, String key, boolean forceNt, double[] value)
     
    void
    log(long timestamp, String key, boolean forceNt, double[] value, String unit)
     
    void
    log(long timestamp, String key, boolean forceNt, double value, String unit)
     
    void
    log(long timestamp, String key, boolean forceNt, float value)
     
    void
    log(long timestamp, String key, boolean forceNt, float[] value)
     
    void
    log(long timestamp, String key, boolean forceNt, float[] value, String unit)
     
    void
    log(long timestamp, String key, boolean forceNt, float value, String unit)
     
    void
    log(long timestamp, String key, boolean forceNt, long value)
     
    void
    log(long timestamp, String key, boolean forceNt, long[] value)
     
    void
    log(long timestamp, String key, boolean forceNt, long[] value, String unit)
     
    void
    log(long timestamp, String key, boolean forceNt, long value, String unit)
     
    <T> void
    log(long timestamp, String key, boolean forceNt, Struct<T> struct, T value)
     
    <T> void
    log(long timestamp, String key, boolean forceNt, Struct<T> struct, T[] value)
     
    void
    log(long timestamp, String key, boolean forceNt, String value)
     
    void
    log(long timestamp, String key, boolean forceNt, String[] value)
     
    void
    log(long timestamp, String key, boolean forceNt, String value, String customTypeString)
     
    void
     

    Methods inherited from class Object

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

  • Method Details

    • log

      public void log(long timestamp, String key, boolean forceNt, boolean[] value)
      Specified by:
      log in interface LogWriterBase
    • log

      public void log(long timestamp, String key, boolean forceNt, boolean value)
      Specified by:
      log in interface LogWriterBase
    • log

      public void log(long timestamp, String key, boolean forceNt, double[] value)
      Specified by:
      log in interface LogWriterBase
    • log

      public void log(long timestamp, String key, boolean forceNt, double[] value, String unit)
      Specified by:
      log in interface LogWriterBase
    • log

      public void log(long timestamp, String key, boolean forceNt, double value)
      Specified by:
      log in interface LogWriterBase
    • log

      public void log(long timestamp, String key, boolean forceNt, double value, String unit)
      Specified by:
      log in interface LogWriterBase
    • log

      public void log(long timestamp, String key, boolean forceNt, float[] value)
      Specified by:
      log in interface LogWriterBase
    • log

      public void log(long timestamp, String key, boolean forceNt, float[] value, String unit)
      Specified by:
      log in interface LogWriterBase
    • log

      public void log(long timestamp, String key, boolean forceNt, float value)
      Specified by:
      log in interface LogWriterBase
    • log

      public void log(long timestamp, String key, boolean forceNt, float value, String unit)
      Specified by:
      log in interface LogWriterBase
    • log

      public void log(long timestamp, String key, boolean forceNt, long[] value)
      Specified by:
      log in interface LogWriterBase
    • log

      public void log(long timestamp, String key, boolean forceNt, long[] value, String unit)
      Specified by:
      log in interface LogWriterBase
    • log

      public void log(long timestamp, String key, boolean forceNt, long value)
      Specified by:
      log in interface LogWriterBase
    • log

      public void log(long timestamp, String key, boolean forceNt, long value, String unit)
      Specified by:
      log in interface LogWriterBase
    • log

      public void log(long timestamp, String key, boolean forceNt, String[] value)
      Specified by:
      log in interface LogWriterBase
    • log

      public void log(long timestamp, String key, boolean forceNt, String value)
      Specified by:
      log in interface LogWriterBase
    • log

      public void log(long timestamp, String key, boolean forceNt, String value, String customTypeString)
      Specified by:
      log in interface LogWriterBase
    • log

      public <T> void log(long timestamp, String key, boolean forceNt, Struct<T> struct, T[] value)
      Specified by:
      log in interface LogWriterLowLevel
    • log

      public <T> void log(long timestamp, String key, boolean forceNt, Struct<T> struct, T value)
      Specified by:
      log in interface LogWriterLowLevel
    • setOptions

      public void setOptions(DogLogOptions options)
    • isLogDestinationValid

      public boolean isLogDestinationValid()
      This could be a static method, but it's not because this class controls initializing DataLogManager, which has to be done before this method can be called.
      Returns:
      Whether the log destination directory is valid. On a roboRIO 2 this is always true, on a roboRIO 1 this is true when a USB drive is attached.