Log array of double values.
More...
#include <wpi/datalog/DataLog.hpp>
|
| | DoubleArrayLogEntry ()=default |
| | DoubleArrayLogEntry (DataLog &log, std::string_view name, int64_t timestamp=0) |
| | DoubleArrayLogEntry (DataLog &log, std::string_view name, std::string_view metadata, int64_t timestamp=0) |
| void | Append (std::span< const double > arr, int64_t timestamp=0) |
| | Appends a record to the log.
|
| void | Append (std::initializer_list< double > arr, int64_t timestamp=0) |
| | Appends a record to the log.
|
| void | Update (std::span< const double > arr, int64_t timestamp=0) |
| | Updates the last value and appends a record to the log if it has changed.
|
| void | Update (std::initializer_list< double > arr, int64_t timestamp=0) |
| | Updates the last value and appends a record to the log if it has changed.
|
| DataLogValueEntryImpl & | operator= (DataLogValueEntryImpl &&rhs) |
| bool | HasLastValue () const |
| | Gets whether there is a last value.
|
| std::optional< std::vector< double > > | 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 = "double[]" |
Log array of double values.
◆ DoubleArrayLogEntry() [1/3]
| wpi::log::DoubleArrayLogEntry::DoubleArrayLogEntry |
( |
| ) |
|
|
default |
◆ DoubleArrayLogEntry() [2/3]
| wpi::log::DoubleArrayLogEntry::DoubleArrayLogEntry |
( |
DataLog & | log, |
|
|
std::string_view | name, |
|
|
int64_t | timestamp = 0 ) |
|
inline |
◆ DoubleArrayLogEntry() [3/3]
| wpi::log::DoubleArrayLogEntry::DoubleArrayLogEntry |
( |
DataLog & | log, |
|
|
std::string_view | name, |
|
|
std::string_view | metadata, |
|
|
int64_t | timestamp = 0 ) |
|
inline |
◆ Append() [1/2]
| void wpi::log::DoubleArrayLogEntry::Append |
( |
std::initializer_list< double > | arr, |
|
|
int64_t | timestamp = 0 ) |
|
inline |
Appends a record to the log.
- Parameters
-
| arr | Values to record |
| timestamp | Time stamp (may be 0 to indicate now) |
◆ Append() [2/2]
| void wpi::log::DoubleArrayLogEntry::Append |
( |
std::span< const double > | arr, |
|
|
int64_t | timestamp = 0 ) |
|
inline |
Appends a record to the log.
- Parameters
-
| arr | Values to record |
| timestamp | Time stamp (may be 0 to indicate now) |
◆ Update() [1/2]
| void wpi::log::DoubleArrayLogEntry::Update |
( |
std::initializer_list< double > | arr, |
|
|
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
-
| arr | Values to record |
| timestamp | Time stamp (may be 0 to indicate now) |
◆ Update() [2/2]
| void wpi::log::DoubleArrayLogEntry::Update |
( |
std::span< const double > | arr, |
|
|
int64_t | timestamp = 0 ) |
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
-
| arr | Values to record |
| timestamp | Time stamp (may be 0 to indicate now) |
◆ kDataType
| const char* wpi::log::DoubleArrayLogEntry::kDataType = "double[]" |
|
staticconstexpr |
The documentation for this class was generated from the following file: