Class StructLogEntry<T>

java.lang.Object
edu.wpi.first.util.datalog.DataLogEntry
edu.wpi.first.util.datalog.StructLogEntry<T>
Type Parameters:
T - value class

public final class StructLogEntry<T>
extends DataLogEntry
Log struct-encoded values.
  • Method Details

    • create

      public static <T> StructLogEntry<T> create​(DataLog log, String name, Struct<T> struct, String metadata, long timestamp)
      Creates a struct-encoded log entry.
      Type Parameters:
      T - value class (inferred from struct)
      Parameters:
      log - datalog
      name - name of the entry
      struct - struct serialization implementation
      metadata - metadata
      timestamp - entry creation timestamp (0=now)
      Returns:
      StructLogEntry
    • create

      public static <T> StructLogEntry<T> create​(DataLog log, String name, Struct<T> struct, String metadata)
      Creates a struct-encoded log entry.
      Type Parameters:
      T - value class (inferred from struct)
      Parameters:
      log - datalog
      name - name of the entry
      struct - struct serialization implementation
      metadata - metadata
      Returns:
      StructLogEntry
    • create

      public static <T> StructLogEntry<T> create​(DataLog log, String name, Struct<T> struct, long timestamp)
      Creates a struct-encoded log entry.
      Type Parameters:
      T - value class (inferred from struct)
      Parameters:
      log - datalog
      name - name of the entry
      struct - struct serialization implementation
      timestamp - entry creation timestamp (0=now)
      Returns:
      StructLogEntry
    • create

      public static <T> StructLogEntry<T> create​(DataLog log, String name, Struct<T> struct)
      Creates a struct-encoded log entry.
      Type Parameters:
      T - value class (inferred from struct)
      Parameters:
      log - datalog
      name - name of the entry
      struct - struct serialization implementation
      Returns:
      StructLogEntry
    • append

      public void append​(T value, long timestamp)
      Appends a record to the log.
      Parameters:
      value - Value to record
      timestamp - Time stamp (0 to indicate now)
    • append

      public void append​(T value)
      Appends a record to the log.
      Parameters:
      value - Value to record