WPILibC++ 2024.3.2
wpi::log::ProtobufLogEntry< T > Class Template Reference

Log protobuf serializable objects. More...

#include <wpi/DataLog.h>

Inheritance diagram for wpi::log::ProtobufLogEntry< T >:
wpi::log::DataLogEntry

Public Member Functions

 ProtobufLogEntry ()=default
 
 ProtobufLogEntry (DataLog &log, std::string_view name, int64_t timestamp=0)
 
 ProtobufLogEntry (DataLog &log, std::string_view name, std::string_view metadata, int64_t timestamp=0)
 
void Append (const T &data, 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...
 

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

template<ProtobufSerializable T>
class wpi::log::ProtobufLogEntry< T >

Log protobuf serializable objects.

Constructor & Destructor Documentation

◆ ProtobufLogEntry() [1/3]

template<ProtobufSerializable T>
wpi::log::ProtobufLogEntry< T >::ProtobufLogEntry ( )
default

◆ ProtobufLogEntry() [2/3]

template<ProtobufSerializable T>
wpi::log::ProtobufLogEntry< T >::ProtobufLogEntry ( DataLog log,
std::string_view  name,
int64_t  timestamp = 0 
)
inline

◆ ProtobufLogEntry() [3/3]

template<ProtobufSerializable T>
wpi::log::ProtobufLogEntry< T >::ProtobufLogEntry ( DataLog log,
std::string_view  name,
std::string_view  metadata,
int64_t  timestamp = 0 
)
inline

Member Function Documentation

◆ Append()

template<ProtobufSerializable T>
void wpi::log::ProtobufLogEntry< T >::Append ( const T &  data,
int64_t  timestamp = 0 
)
inline

Appends a record to the log.

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

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