WPILibC++ 2025.1.1
Loading...
Searching...
No Matches
wpi::log::DataLogValueEntryImpl< T > Class Template Reference

#include <wpi/DataLog.h>

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

Public Member Functions

 DataLogValueEntryImpl (DataLogValueEntryImpl &&rhs)
 
DataLogValueEntryImploperator= (DataLogValueEntryImpl &&rhs)
 
bool HasLastValue () const
 Gets whether there is a last value.
 
std::optional< T > GetLastValue () const
 Gets the last value.
 
- 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.
 
void Finish (int64_t timestamp=0)
 Finishes the entry.
 

Protected Member Functions

 DataLogValueEntryImpl ()=default
 
 DataLogValueEntryImpl (DataLog &log, std::string_view name, std::string_view type, std::string_view metadata={}, int64_t timestamp=0)
 
- 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

wpi::mutex m_mutex
 
std::optional< T > m_lastValue
 
- Protected Attributes inherited from wpi::log::DataLogEntry
DataLogm_log = nullptr
 
int m_entry = 0
 

Constructor & Destructor Documentation

◆ DataLogValueEntryImpl() [1/3]

template<typename T >
wpi::log::DataLogValueEntryImpl< T >::DataLogValueEntryImpl ( )
protecteddefault

◆ DataLogValueEntryImpl() [2/3]

template<typename T >
wpi::log::DataLogValueEntryImpl< T >::DataLogValueEntryImpl ( DataLog & log,
std::string_view name,
std::string_view type,
std::string_view metadata = {},
int64_t timestamp = 0 )
inlineprotected

◆ DataLogValueEntryImpl() [3/3]

template<typename T >
wpi::log::DataLogValueEntryImpl< T >::DataLogValueEntryImpl ( DataLogValueEntryImpl< T > && rhs)
inline

Member Function Documentation

◆ GetLastValue()

template<typename T >
std::optional< T > wpi::log::DataLogValueEntryImpl< T >::GetLastValue ( ) const
inline

Gets the last value.

Note
The last value is local to this class instance and updated only with Update(), not Append().
Returns
Last value (empty if no last value)

◆ HasLastValue()

template<typename T >
bool wpi::log::DataLogValueEntryImpl< T >::HasLastValue ( ) const
inline

Gets whether there is a last value.

Note
The last value is local to this class instance and updated only with Update(), not Append().
Returns
True if last value exists, false otherwise.

◆ operator=()

template<typename T >
DataLogValueEntryImpl & wpi::log::DataLogValueEntryImpl< T >::operator= ( DataLogValueEntryImpl< T > && rhs)
inline

Member Data Documentation

◆ m_lastValue

template<typename T >
std::optional<T> wpi::log::DataLogValueEntryImpl< T >::m_lastValue
protected

◆ m_mutex

template<typename T >
wpi::mutex wpi::log::DataLogValueEntryImpl< T >::m_mutex
mutableprotected

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