WPILibC++ 2024.3.2
wpi::log::StringLogEntry Class Reference

Log string values. More...

#include <wpi/DataLog.h>

Inheritance diagram for wpi::log::StringLogEntry:
wpi::log::DataLogEntry

Public Member Functions

 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. More...
 
- Public Member Functions inherited from wpi::log::DataLogEntry
 DataLogEntry (const DataLogEntry &)=delete
 
DataLogEntryoperator= (const DataLogEntry &)=delete
 
 DataLogEntry (DataLogEntry &&rhs)
 
DataLogEntryoperator= (DataLogEntry &&rhs)
 
 operator bool () const
 
void SetMetadata (std::string_view metadata, int64_t timestamp=0)
 Updates the metadata for the entry. More...
 
void Finish (int64_t timestamp=0)
 Finishes the entry. More...
 

Static Public Attributes

static constexpr const char * kDataType = "string"
 

Additional Inherited Members

- Protected Member Functions inherited from wpi::log::DataLogEntry
 DataLogEntry ()=default
 
 DataLogEntry (DataLog &log, std::string_view name, std::string_view type, std::string_view metadata={}, int64_t timestamp=0)
 
- Protected Attributes inherited from wpi::log::DataLogEntry
DataLogm_log = nullptr
 
int m_entry = 0
 

Detailed Description

Log string values.

Constructor & Destructor Documentation

◆ 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

Member Function Documentation

◆ Append()

void wpi::log::StringLogEntry::Append ( std::string_view  value,
int64_t  timestamp = 0 
)
inline

Appends a record to the log.

Parameters
valueValue to record
timestampTime stamp (may be 0 to indicate now)

Member Data Documentation

◆ kDataType

constexpr const char* wpi::log::StringLogEntry::kDataType = "string"
staticconstexpr

The documentation for this class was generated from the following file: