Package edu.wpi.first.util.datalog
Class ProtobufLogEntry<T>
java.lang.Object
edu.wpi.first.util.datalog.DataLogEntry
edu.wpi.first.util.datalog.ProtobufLogEntry<T>
- Type Parameters:
T
- value class
public final class ProtobufLogEntry<T> extends DataLogEntry
Log protobuf-encoded values.
-
Field Summary
-
Method Summary
Modifier and Type Method Description void
append(T value)
Appends a record to the log.void
append(T value, long timestamp)
Appends a record to the log.static <T, MessageType extends us.hebi.quickbuf.ProtoMessage<?>>
ProtobufLogEntry<T>create(DataLog log, String name, Protobuf<T,MessageType> proto)
Creates a protobuf-encoded log entry.static <T, MessageType extends us.hebi.quickbuf.ProtoMessage<?>>
ProtobufLogEntry<T>create(DataLog log, String name, Protobuf<T,MessageType> proto, long timestamp)
Creates a protobuf-encoded log entry.static <T, MessageType extends us.hebi.quickbuf.ProtoMessage<?>>
ProtobufLogEntry<T>create(DataLog log, String name, Protobuf<T,MessageType> proto, String metadata)
Creates a protobuf-encoded log entry.static <T, MessageType extends us.hebi.quickbuf.ProtoMessage<?>>
ProtobufLogEntry<T>create(DataLog log, String name, Protobuf<T,MessageType> proto, String metadata, long timestamp)
Creates a protobuf-encoded log entry.Methods inherited from class edu.wpi.first.util.datalog.DataLogEntry
finish, finish, setMetadata, setMetadata
-
Method Details
-
create
public static <T, MessageType extends us.hebi.quickbuf.ProtoMessage<?>> ProtobufLogEntry<T> create(DataLog log, String name, Protobuf<T,MessageType> proto, String metadata, long timestamp)Creates a protobuf-encoded log entry.- Type Parameters:
T
- value class (inferred from proto)MessageType
- protobuf message type (inferred from proto)- Parameters:
log
- datalogname
- name of the entryproto
- protobuf serialization implementationmetadata
- metadatatimestamp
- entry creation timestamp (0=now)- Returns:
- ProtobufLogEntry
-
create
public static <T, MessageType extends us.hebi.quickbuf.ProtoMessage<?>> ProtobufLogEntry<T> create(DataLog log, String name, Protobuf<T,MessageType> proto, String metadata)Creates a protobuf-encoded log entry.- Type Parameters:
T
- value class (inferred from proto)MessageType
- protobuf message type (inferred from proto)- Parameters:
log
- datalogname
- name of the entryproto
- protobuf serialization implementationmetadata
- metadata- Returns:
- ProtobufLogEntry
-
create
public static <T, MessageType extends us.hebi.quickbuf.ProtoMessage<?>> ProtobufLogEntry<T> create(DataLog log, String name, Protobuf<T,MessageType> proto, long timestamp)Creates a protobuf-encoded log entry.- Type Parameters:
T
- value class (inferred from proto)MessageType
- protobuf message type (inferred from proto)- Parameters:
log
- datalogname
- name of the entryproto
- protobuf serialization implementationtimestamp
- entry creation timestamp (0=now)- Returns:
- ProtobufLogEntry
-
create
public static <T, MessageType extends us.hebi.quickbuf.ProtoMessage<?>> ProtobufLogEntry<T> create(DataLog log, String name, Protobuf<T,MessageType> proto)Creates a protobuf-encoded log entry.- Type Parameters:
T
- value class (inferred from proto)MessageType
- protobuf message type (inferred from proto)- Parameters:
log
- datalogname
- name of the entryproto
- protobuf serialization implementation- Returns:
- ProtobufLogEntry
-
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
-