Package edu.wpi.first.util.datalog
Class StructArrayLogEntry<T>
java.lang.Object
edu.wpi.first.util.datalog.DataLogEntry
edu.wpi.first.util.datalog.StructArrayLogEntry<T>
- Type Parameters:
T
- value class
public final class StructArrayLogEntry<T> extends DataLogEntry
Log struct-encoded array values.
-
Field Summary
-
Method Summary
Modifier and Type Method Description void
append(Collection<T> value)
Appends a record to the log.void
append(Collection<T> value, long timestamp)
Appends a record to the log.void
append(T[] value)
Appends a record to the log.void
append(T[] value, long timestamp)
Appends a record to the log.static <T> StructArrayLogEntry<T>
create(DataLog log, String name, Struct<T> struct)
Creates a struct-encoded array log entry.static <T> StructArrayLogEntry<T>
create(DataLog log, String name, Struct<T> struct, long timestamp)
Creates a struct-encoded array log entry.static <T> StructArrayLogEntry<T>
create(DataLog log, String name, Struct<T> struct, String metadata)
Creates a struct-encoded array log entry.static <T> StructArrayLogEntry<T>
create(DataLog log, String name, Struct<T> struct, String metadata, long timestamp)
Creates a struct-encoded array log entry.void
reserve(int nelem)
Ensures sufficient buffer space is available for the given number of elements.Methods inherited from class edu.wpi.first.util.datalog.DataLogEntry
finish, finish, setMetadata, setMetadata
-
Method Details
-
create
public static <T> StructArrayLogEntry<T> create(DataLog log, String name, Struct<T> struct, String metadata, long timestamp)Creates a struct-encoded array log entry.- Type Parameters:
T
- value class (inferred from struct)- Parameters:
log
- datalogname
- name of the entrystruct
- struct serialization implementationmetadata
- metadatatimestamp
- entry creation timestamp (0=now)- Returns:
- StructArrayLogEntry
-
create
public static <T> StructArrayLogEntry<T> create(DataLog log, String name, Struct<T> struct, String metadata)Creates a struct-encoded array log entry.- Type Parameters:
T
- value class (inferred from struct)- Parameters:
log
- datalogname
- name of the entrystruct
- struct serialization implementationmetadata
- metadata- Returns:
- StructArrayLogEntry
-
create
public static <T> StructArrayLogEntry<T> create(DataLog log, String name, Struct<T> struct, long timestamp)Creates a struct-encoded array log entry.- Type Parameters:
T
- value class (inferred from struct)- Parameters:
log
- datalogname
- name of the entrystruct
- struct serialization implementationtimestamp
- entry creation timestamp (0=now)- Returns:
- StructArrayLogEntry
-
create
Creates a struct-encoded array log entry.- Type Parameters:
T
- value class (inferred from struct)- Parameters:
log
- datalogname
- name of the entrystruct
- struct serialization implementation- Returns:
- StructArrayLogEntry
-
reserve
Ensures sufficient buffer space is available for the given number of elements.- Parameters:
nelem
- number of elements
-
append
Appends a record to the log.- Parameters:
value
- Value to recordtimestamp
- Time stamp (0 to indicate now)
-
append
Appends a record to the log.- Parameters:
value
- Value to record
-
append
Appends a record to the log.- Parameters:
value
- Value to recordtimestamp
- Time stamp (0 to indicate now)
-
append
Appends a record to the log.- Parameters:
value
- Value to record
-