Package edu.wpi.first.epilogue.logging
Class LazyBackend
java.lang.Object
edu.wpi.first.epilogue.logging.LazyBackend
- All Implemented Interfaces:
EpilogueBackend
A backend implementation that only logs data when it changes. Useful for keeping bandwidth and
file sizes down. However, because it still needs to check that data has changed, it cannot avoid
expensive sensor reads.
-
Constructor Summary
ConstructorDescriptionLazyBackend
(EpilogueBackend backend) Creates a new lazy backend wrapper around another backend. -
Method Summary
Modifier and TypeMethodDescriptionGets a backend that can be used to log nested data underneath a specific path.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.void
Logs a text data point.void
Logs a string array data point.<S> void
Logs an array of struct-serializable objects.<S> void
Logs a struct-serializable object.
-
Constructor Details
-
LazyBackend
Creates a new lazy backend wrapper around another backend.- Parameters:
backend
- the backend to delegate to
-
-
Method Details
-
lazy
Description copied from interface:EpilogueBackend
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.- Specified by:
lazy
in interfaceEpilogueBackend
- Returns:
- the lazy backend
-
getNested
Description copied from interface:EpilogueBackend
Gets a backend that can be used to log nested data underneath a specific path.- Specified by:
getNested
in interfaceEpilogueBackend
- Parameters:
path
- the path to use for logging nested data under- Returns:
- the nested backend
-
log
Description copied from interface:EpilogueBackend
Logs a 32-bit integer data point.- Specified by:
log
in interfaceEpilogueBackend
- Parameters:
identifier
- the identifier of the data pointvalue
- the value of the data point
-
log
Description copied from interface:EpilogueBackend
Logs a 64-bit integer data point.- Specified by:
log
in interfaceEpilogueBackend
- Parameters:
identifier
- the identifier of the data pointvalue
- the value of the data point
-
log
Description copied from interface:EpilogueBackend
Logs a 32-bit floating point data point.- Specified by:
log
in interfaceEpilogueBackend
- Parameters:
identifier
- the identifier of the data pointvalue
- the value of the data point
-
log
Description copied from interface:EpilogueBackend
Logs a 64-bit floating point data point.- Specified by:
log
in interfaceEpilogueBackend
- Parameters:
identifier
- the identifier of the data pointvalue
- the value of the data point
-
log
Description copied from interface:EpilogueBackend
Logs a boolean data point.- Specified by:
log
in interfaceEpilogueBackend
- Parameters:
identifier
- the identifier of the data pointvalue
- the value of the data point
-
log
Description copied from interface:EpilogueBackend
Logs a raw byte array data point. NOTE: serializable data should be logged usingEpilogueBackend.log(String, Object, Struct)
.- Specified by:
log
in interfaceEpilogueBackend
- Parameters:
identifier
- the identifier of the data pointvalue
- the value of the data point
-
log
Description copied from interface:EpilogueBackend
Logs a 32-bit integer array data point.- Specified by:
log
in interfaceEpilogueBackend
- Parameters:
identifier
- the identifier of the data pointvalue
- the value of the data point
-
log
Description copied from interface:EpilogueBackend
Logs a 64-bit integer array data point.- Specified by:
log
in interfaceEpilogueBackend
- Parameters:
identifier
- the identifier of the data pointvalue
- the value of the data point
-
log
Description copied from interface:EpilogueBackend
Logs a 32-bit floating point array data point.- Specified by:
log
in interfaceEpilogueBackend
- Parameters:
identifier
- the identifier of the data pointvalue
- the value of the data point
-
log
Description copied from interface:EpilogueBackend
Logs a 64-bit floating point array data point.- Specified by:
log
in interfaceEpilogueBackend
- Parameters:
identifier
- the identifier of the data pointvalue
- the value of the data point
-
log
Description copied from interface:EpilogueBackend
Logs a boolean array data point.- Specified by:
log
in interfaceEpilogueBackend
- Parameters:
identifier
- the identifier of the data pointvalue
- the value of the data point
-
log
Description copied from interface:EpilogueBackend
Logs a text data point.- Specified by:
log
in interfaceEpilogueBackend
- Parameters:
identifier
- the identifier of the data pointvalue
- the value of the data point
-
log
Description copied from interface:EpilogueBackend
Logs a string array data point.- Specified by:
log
in interfaceEpilogueBackend
- Parameters:
identifier
- the identifier of the data pointvalue
- the value of the data point
-
log
Description copied from interface:EpilogueBackend
Logs a struct-serializable object.- Specified by:
log
in interfaceEpilogueBackend
- 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
Description copied from interface:EpilogueBackend
Logs an array of struct-serializable objects.- Specified by:
log
in interfaceEpilogueBackend
- 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
-