|
| DataLogWriter (std::string_view filename, std::error_code &ec, std::string_view extraHeader="") |
| Constructs with a filename.
|
|
| DataLogWriter (wpi::Logger &msglog, std::string_view filename, std::error_code &ec, std::string_view extraHeader="") |
| Construct with a filename.
|
|
| DataLogWriter (std::unique_ptr< wpi::raw_ostream > os, std::string_view extraHeader="") |
| Constructs with an output stream.
|
|
| DataLogWriter (wpi::Logger &msglog, std::unique_ptr< wpi::raw_ostream > os, std::string_view extraHeader="") |
| Constructs with an output stream.
|
|
| ~DataLogWriter () final |
|
| DataLogWriter (const DataLogWriter &)=delete |
|
DataLogWriter & | operator= (const DataLogWriter &)=delete |
|
| DataLogWriter (DataLogWriter &&)=delete |
|
DataLogWriter & | operator= (const DataLogWriter &&)=delete |
|
void | Flush () final |
| Flushes the log data to disk.
|
|
void | Stop () final |
| Stops appending all records to the log, and closes the log file.
|
|
wpi::raw_ostream & | GetStream () |
| Gets the output stream.
|
|
virtual | ~DataLog ()=default |
|
| DataLog (const DataLog &)=delete |
|
DataLog & | operator= (const DataLog &)=delete |
|
| DataLog (DataLog &&)=delete |
|
DataLog & | operator= (const DataLog &&)=delete |
|
virtual void | Pause () |
| Pauses appending of data records to the log.
|
|
virtual void | Resume () |
| Resumes appending of data records to the log.
|
|
bool | HasSchema (std::string_view name) const |
| Returns whether there is a data schema already registered with the given name.
|
|
void | AddSchema (std::string_view name, std::string_view type, std::span< const uint8_t > schema, int64_t timestamp=0) |
| Registers a data schema.
|
|
void | AddSchema (std::string_view name, std::string_view type, std::string_view schema, int64_t timestamp=0) |
| Registers a data schema.
|
|
template<ProtobufSerializable T> |
void | AddProtobufSchema (ProtobufMessage< T > &msg, int64_t timestamp=0) |
| Registers a protobuf schema.
|
|
template<typename T , typename... I>
requires StructSerializable<T, I...> |
void | AddStructSchema (const I &... info, int64_t timestamp=0) |
| Registers a struct schema.
|
|
int | Start (std::string_view name, std::string_view type, std::string_view metadata={}, int64_t timestamp=0) |
| Start an entry.
|
|
void | Finish (int entry, int64_t timestamp=0) |
| Finish an entry.
|
|
void | SetMetadata (int entry, std::string_view metadata, int64_t timestamp=0) |
| Updates the metadata for an entry.
|
|
void | AppendRaw (int entry, std::span< const uint8_t > data, int64_t timestamp) |
| Appends a raw record to the log.
|
|
void | AppendRaw2 (int entry, std::span< const std::span< const uint8_t > > data, int64_t timestamp) |
| Appends a raw record to the log.
|
|
void | AppendBoolean (int entry, bool value, int64_t timestamp) |
| Appends a boolean record to the log.
|
|
void | AppendInteger (int entry, int64_t value, int64_t timestamp) |
| Appends an integer record to the log.
|
|
void | AppendFloat (int entry, float value, int64_t timestamp) |
| Appends a float record to the log.
|
|
void | AppendDouble (int entry, double value, int64_t timestamp) |
| Appends a double record to the log.
|
|
void | AppendString (int entry, std::string_view value, int64_t timestamp) |
| Appends a string record to the log.
|
|
void | AppendBooleanArray (int entry, std::span< const bool > arr, int64_t timestamp) |
| Appends a boolean array record to the log.
|
|
void | AppendBooleanArray (int entry, std::span< const int > arr, int64_t timestamp) |
| Appends a boolean array record to the log.
|
|
void | AppendBooleanArray (int entry, std::span< const uint8_t > arr, int64_t timestamp) |
| Appends a boolean array record to the log.
|
|
void | AppendIntegerArray (int entry, std::span< const int64_t > arr, int64_t timestamp) |
| Appends an integer array record to the log.
|
|
void | AppendFloatArray (int entry, std::span< const float > arr, int64_t timestamp) |
| Appends a float array record to the log.
|
|
void | AppendDoubleArray (int entry, std::span< const double > arr, int64_t timestamp) |
| Appends a double array record to the log.
|
|
void | AppendStringArray (int entry, std::span< const std::string > arr, int64_t timestamp) |
| Appends a string array record to the log.
|
|
void | AppendStringArray (int entry, std::span< const std::string_view > arr, int64_t timestamp) |
| Appends a string array record to the log.
|
|
void | AppendStringArray (int entry, std::span< const struct WPI_String > arr, int64_t timestamp) |
| Appends a string array record to the log.
|
|
A data log writer that flushes the data log to a file when Flush() is called.
The lifetime of this object must be longer than any data log entry objects that refer to it.