Log string values.
More...
#include <wpi/DataLog.h>
|
| | StringLogEntry ()=default |
| |
| | StringLogEntry (DataLog &log, std::string_view name, int64_t timestamp=0) |
| |
| | StringLogEntry (DataLog &log, std::string_view name, std::string_view metadata, int64_t timestamp=0) |
| |
| | StringLogEntry (DataLog &log, std::string_view name, std::string_view metadata, std::string_view type, int64_t timestamp=0) |
| |
| void | Append (std::string_view value, int64_t timestamp=0) |
| | Appends a record to the log.
|
| |
| void | Update (std::string_view value, int64_t timestamp=0) |
| | Updates the last value and appends a record to the log if it has changed.
|
| |
| | DataLogValueEntryImpl (DataLogValueEntryImpl &&rhs) |
| |
| DataLogValueEntryImpl & | operator= (DataLogValueEntryImpl &&rhs) |
| |
| bool | HasLastValue () const |
| | Gets whether there is a last value.
|
| |
| std::optional< std::string > | GetLastValue () const |
| | Gets the last value.
|
| |
| | DataLogEntry (const DataLogEntry &)=delete |
| |
| DataLogEntry & | operator= (const DataLogEntry &)=delete |
| |
| | DataLogEntry (DataLogEntry &&rhs) |
| |
| DataLogEntry & | operator= (DataLogEntry &&rhs) |
| |
| | operator bool () const |
| |
| void | SetMetadata (std::string_view metadata, int64_t timestamp=0) |
| | Updates the metadata for the entry.
|
| |
| void | Finish (int64_t timestamp=0) |
| | Finishes the entry.
|
| |
|
| static constexpr const char * | kDataType = "string" |
| |
◆ StringLogEntry() [1/4]
| wpi::log::StringLogEntry::StringLogEntry |
( |
| ) |
|
|
default |
◆ StringLogEntry() [2/4]
| wpi::log::StringLogEntry::StringLogEntry |
( |
DataLog & | log, |
|
|
std::string_view | name, |
|
|
int64_t | timestamp = 0 ) |
|
inline |
◆ StringLogEntry() [3/4]
| wpi::log::StringLogEntry::StringLogEntry |
( |
DataLog & | log, |
|
|
std::string_view | name, |
|
|
std::string_view | metadata, |
|
|
int64_t | timestamp = 0 ) |
|
inline |
◆ StringLogEntry() [4/4]
| wpi::log::StringLogEntry::StringLogEntry |
( |
DataLog & | log, |
|
|
std::string_view | name, |
|
|
std::string_view | metadata, |
|
|
std::string_view | type, |
|
|
int64_t | timestamp = 0 ) |
|
inline |
◆ Append()
| void wpi::log::StringLogEntry::Append |
( |
std::string_view | value, |
|
|
int64_t | timestamp = 0 ) |
|
inline |
Appends a record to the log.
- Parameters
-
| value | Value to record |
| timestamp | Time stamp (may be 0 to indicate now) |
◆ Update()
| void wpi::log::StringLogEntry::Update |
( |
std::string_view | value, |
|
|
int64_t | timestamp = 0 ) |
|
inline |
Updates the last value and appends a record to the log if it has changed.
- Note
- The last value is local to this class instance; using Update() with two instances pointing to the same underlying log entry name will likely result in unexpected results.
- Parameters
-
| value | Value to record |
| timestamp | Time stamp (may be 0 to indicate now) |
◆ kDataType
| const char* wpi::log::StringLogEntry::kDataType = "string" |
|
staticconstexpr |
The documentation for this class was generated from the following file: