WPILibC++ 2025.2.1
Loading...
Searching...
No Matches
wpi::log::DataLogEntry Class Reference

Log entry base class. More...

#include <wpi/DataLog.h>

Inheritance diagram for wpi::log::DataLogEntry:
wpi::log::DataLogValueEntryImpl< std::vector< int > > wpi::log::DataLogValueEntryImpl< bool > wpi::log::DataLogValueEntryImpl< std::vector< double > > wpi::log::DataLogValueEntryImpl< double > wpi::log::DataLogValueEntryImpl< std::vector< float > > wpi::log::DataLogValueEntryImpl< float > wpi::log::DataLogValueEntryImpl< std::vector< int64_t > > wpi::log::DataLogValueEntryImpl< int64_t > wpi::log::DataLogValueEntryImpl< std::vector< uint8_t > > wpi::log::DataLogValueEntryImpl< std::vector< std::string > > wpi::log::DataLogValueEntryImpl< std::string > wpi::log::DataLogValueEntryImpl< T > wpi::log::ProtobufLogEntry< T > wpi::log::StructArrayLogEntry< T, I > wpi::log::StructLogEntry< T, I >

Public Member Functions

 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.
 
void Finish (int64_t timestamp=0)
 Finishes the entry.
 

Protected Member Functions

 DataLogEntry ()=default
 
 DataLogEntry (DataLog &log, std::string_view name, std::string_view type, std::string_view metadata={}, int64_t timestamp=0)
 

Protected Attributes

DataLogm_log = nullptr
 
int m_entry = 0
 

Detailed Description

Log entry base class.

Constructor & Destructor Documentation

◆ DataLogEntry() [1/4]

wpi::log::DataLogEntry::DataLogEntry ( )
protecteddefault

◆ DataLogEntry() [2/4]

wpi::log::DataLogEntry::DataLogEntry ( DataLog & log,
std::string_view name,
std::string_view type,
std::string_view metadata = {},
int64_t timestamp = 0 )
inlineprotected

◆ DataLogEntry() [3/4]

wpi::log::DataLogEntry::DataLogEntry ( const DataLogEntry & )
delete

◆ DataLogEntry() [4/4]

wpi::log::DataLogEntry::DataLogEntry ( DataLogEntry && rhs)
inline

Member Function Documentation

◆ Finish()

void wpi::log::DataLogEntry::Finish ( int64_t timestamp = 0)
inline

Finishes the entry.

Parameters
timestampTime stamp (may be 0 to indicate now)

◆ operator bool()

wpi::log::DataLogEntry::operator bool ( ) const
inlineexplicit

◆ operator=() [1/2]

DataLogEntry & wpi::log::DataLogEntry::operator= ( const DataLogEntry & )
delete

◆ operator=() [2/2]

DataLogEntry & wpi::log::DataLogEntry::operator= ( DataLogEntry && rhs)
inline

◆ SetMetadata()

void wpi::log::DataLogEntry::SetMetadata ( std::string_view metadata,
int64_t timestamp = 0 )
inline

Updates the metadata for the entry.

Parameters
metadataNew metadata for the entry
timestampTime stamp (may be 0 to indicate now)

Member Data Documentation

◆ m_entry

int wpi::log::DataLogEntry::m_entry = 0
protected

◆ m_log

DataLog* wpi::log::DataLogEntry::m_log = nullptr
protected

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