WPILogWriter
Writes the WPILOG format, version 1.0, to output.
Start an entry with startEntry (or startStructEntry), then append values to the id it returns. Every timestamp is in microseconds since origin, as measured by timeSource. Get one from now or timestampOf, or compute your own on the same basis.
All methods are safe to call from multiple threads. Each call writes one whole record, so records from different threads interleave but never tear. The writer adds a buffer in front of output unless it is already a BufferedOutputStream, so call flush to force pending records out.
Parameters
Where the log goes. close closes it.
A string stored in the file header, conventionally JSON. Readers ignore it.
The clock that timestamps are measured on. A log created on its own can use the default. To line a log up with a dev.nextftc.telemetry.nt.NT4Server or another writer, give them the same source and the same origin.
The moment timestamp zero refers to, a mark from timeSource. The default is the moment the writer is created. Share one origin between sinks that should agree on every timestamp.
Throws
if origin isn't from timeSource, or is in the future
Constructors
Functions
Like appendBoolean, stamped with at. See timestampOf.
Like appendBooleanArray, stamped with at. See timestampOf.
Like appendDouble, stamped with at. See timestampOf.
Like appendDoubleArray, stamped with at. See timestampOf.
Like appendFloat, stamped with at. See timestampOf.
Like appendFloatArray, stamped with at. See timestampOf.
Like appendInteger, stamped with at. See timestampOf.
Like appendIntegerArray, stamped with at. See timestampOf.
Like appendRaw, stamped with at. See timestampOf.
Appends value as UTF-8.
Like appendString, stamped with at. See timestampOf.
Like appendStringArray, stamped with at. See timestampOf.
Appends one packed value to an entry started with startStructEntry.
Like appendStruct, stamped with at. See timestampOf.
Appends values packed back to back to an entry started with startStructArrayEntry.
Like appendStructArray, stamped with at. See timestampOf.
Flushes pending records and closes the underlying stream. Does nothing if already closed.
Marks the entry id as finished. No more values should be appended to it.
Like finishEntry, stamped with at. See timestampOf.
Replaces the metadata of the entry id.
Like setMetadata, stamped with at. See timestampOf.
Starts an entry of type. See the overload that takes a type string.
Like startEntry, for a WPILogType and stamped with at. See timestampOf.
Starts an entry and returns its id.
Like startEntry, stamped with at. See timestampOf.
Starts an entry that holds arrays of schema values, and returns its id. Otherwise the same as startStructEntry.
Like startStructArrayEntry, stamped with at. See timestampOf.
Starts an entry that holds single values of schema, and returns its id.
Like startStructEntry, stamped with at. See timestampOf.