Log raw struct serializable array of objects. More...
#include <wpi/DataLog.h>
Public Member Functions | |
StructArrayLogEntry ()=default | |
StructArrayLogEntry (DataLog &log, std::string_view name, I... info, int64_t timestamp=0) | |
StructArrayLogEntry (DataLog &log, std::string_view name, std::string_view metadata, I... info, int64_t timestamp=0) | |
StructArrayLogEntry (StructArrayLogEntry &&rhs) | |
StructArrayLogEntry & | operator= (StructArrayLogEntry &&rhs) |
template<typename U > | |
void | Append (U &&data, int64_t timestamp=0) |
Appends a record to the log. | |
void | Append (std::span< const T > data, int64_t timestamp=0) |
Appends a record to the log. | |
void | Update (std::span< const T > data, int64_t timestamp=0) |
Updates the last value and appends a record to the log if it has changed. | |
bool | HasLastValue () const |
Gets whether there is a last value. | |
std::optional< std::vector< T > > | 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. | |
Additional Inherited Members | |
![]() | |
DataLogEntry ()=default | |
DataLogEntry (DataLog &log, std::string_view name, std::string_view type, std::string_view metadata={}, int64_t timestamp=0) | |
![]() | |
DataLog * | m_log = nullptr |
int | m_entry = 0 |
Log raw struct serializable array of objects.
|
default |
|
inline |
|
inline |
|
inline |
|
inline |
Appends a record to the log.
data | Data to record |
timestamp | Time stamp (may be 0 to indicate now) |
|
inline |
Appends a record to the log.
data | Data to record |
timestamp | Time stamp (may be 0 to indicate now) |
|
inline |
|
inline |
|
inline |
|
inline |
Updates the last value and appends a record to the log if it has changed.
data | Data to record |
timestamp | Time stamp (may be 0 to indicate now) |