Package edu.wpi.first.epilogue.logging
Interface EpilogueBackend
- All Known Implementing Classes:
FileBackend
,LazyBackend
,MultiBackend
,NestedBackend
,NTEpilogueBackend
,NullBackend
public interface EpilogueBackend
A backend is a generic interface for Epilogue to log discrete data points.
-
Method Summary
Modifier and TypeMethodDescriptionGets a backend that can be used to log nested data underneath a specific path.default EpilogueBackend
lazy()
Creates a lazy version of this backend.void
Logs a boolean data point.void
Logs a boolean array data point.void
Logs a raw byte array data point.void
Logs a 64-bit floating point data point.void
Logs a 64-bit floating point array data point.void
Logs a 32-bit floating point data point.void
Logs a 32-bit floating point array data point.void
Logs a 32-bit integer data point.void
Logs a 32-bit integer array data point.void
Logs a 64-bit integer data point.void
Logs a 64-bit integer array data point.default void
Logs a measurement's value in terms of its base unit.default <U extends Unit>
voidLogs a measurement's value in terms of another unit.default void
Logs an enum value.void
Logs a text data point.void
Logs a string array data point.default void
log
(String identifier, Collection<String> value) Logs a collection of strings data point.default <S> void
log
(String identifier, Collection<S> value, Struct<S> struct) Logs a collection of struct-serializable objects.<S> void
Logs an array of struct-serializable objects.<S> void
Logs a struct-serializable object.static EpilogueBackend
multi
(EpilogueBackend... backends) Creates a backend that logs to multiple backends at once.
-
Method Details
-
multi
Creates a backend that logs to multiple backends at once. Data reads will still only occur once; data is passed to all composed backends at once.- Parameters:
backends
- the backends to compose together- Returns:
- the multi backend
-
lazy
Creates a lazy version of this backend. A lazy backend will only log data to a field when its value changes, which can help keep file size and bandwidth usage in check. However, there is an additional CPU and memory overhead associated with tracking the current value of every logged entry. The most surefire way to reduce CPU and memory usage associated with logging is to log fewer things - which can be done by opting out of logging unnecessary data or increasing the minimum logged importance level in the Epilogue configuration.- Returns:
- the lazy backend
-
getNested
Gets a backend that can be used to log nested data underneath a specific path.- Parameters:
path
- the path to use for logging nested data under- Returns:
- the nested backend
-
log
Logs a 32-bit integer data point.- Parameters:
identifier
- the identifier of the data pointvalue
- the value of the data point
-
log
Logs a 64-bit integer data point.- Parameters:
identifier
- the identifier of the data pointvalue
- the value of the data point
-
log
Logs a 32-bit floating point data point.- Parameters:
identifier
- the identifier of the data pointvalue
- the value of the data point
-
log
Logs a 64-bit floating point data point.- Parameters:
identifier
- the identifier of the data pointvalue
- the value of the data point
-
log
Logs a boolean data point.- Parameters:
identifier
- the identifier of the data pointvalue
- the value of the data point
-
log
Logs a raw byte array data point. NOTE: serializable data should be logged usinglog(String, Object, Struct)
.- Parameters:
identifier
- the identifier of the data pointvalue
- the value of the data point
-
log
Logs a 32-bit integer array data point.- Parameters:
identifier
- the identifier of the data pointvalue
- the value of the data point
-
log
Logs a 64-bit integer array data point.- Parameters:
identifier
- the identifier of the data pointvalue
- the value of the data point
-
log
Logs a 32-bit floating point array data point.- Parameters:
identifier
- the identifier of the data pointvalue
- the value of the data point
-
log
Logs a 64-bit floating point array data point.- Parameters:
identifier
- the identifier of the data pointvalue
- the value of the data point
-
log
Logs a boolean array data point.- Parameters:
identifier
- the identifier of the data pointvalue
- the value of the data point
-
log
Logs a text data point.- Parameters:
identifier
- the identifier of the data pointvalue
- the value of the data point
-
log
Logs a string array data point.- Parameters:
identifier
- the identifier of the data pointvalue
- the value of the data point
-
log
Logs a collection of strings data point.- Parameters:
identifier
- the identifier of the data pointvalue
- the value of the data point
-
log
Logs a struct-serializable object.- Type Parameters:
S
- the serializable type- Parameters:
identifier
- the identifier of the data pointvalue
- the value of the data pointstruct
- the struct to use to serialize the data
-
log
Logs an array of struct-serializable objects.- Type Parameters:
S
- the serializable type- Parameters:
identifier
- the identifier of the data pointvalue
- the value of the data pointstruct
- the struct to use to serialize the objects
-
log
Logs a collection of struct-serializable objects.- Type Parameters:
S
- the serializable type- Parameters:
identifier
- the identifier of the datavalue
- the collection of objects to logstruct
- the struct to use to serialize the objects
-
log
Logs a measurement's value in terms of its base unit.- Parameters:
identifier
- the identifier of the data fieldvalue
- the new value of the data field
-
log
Logs a measurement's value in terms of another unit.- Type Parameters:
U
- the dimension of the unit- Parameters:
identifier
- the identifier of the data fieldvalue
- the new value of the data fieldunit
- the unit to log the measurement in
-
log
Logs an enum value. The value will appear as a string entry using the name of the enum.- Parameters:
identifier
- the identifier of the data fieldvalue
- the new value of the data field
-