WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
wpi::log::BooleanArrayLogEntry Class Reference

Log array of boolean values. More...

#include <wpi/datalog/DataLog.hpp>

Inheritance diagram for wpi::log::BooleanArrayLogEntry:
wpi::log::DataLogValueEntryImpl< std::vector< int > > wpi::log::DataLogEntry

Public Member Functions

 BooleanArrayLogEntry ()=default
 BooleanArrayLogEntry (DataLog &log, std::string_view name, int64_t timestamp=0)
 BooleanArrayLogEntry (DataLog &log, std::string_view name, std::string_view metadata, int64_t timestamp=0)
void Append (std::span< const bool > arr, int64_t timestamp=0)
 Appends a record to the log.
void Append (std::initializer_list< bool > arr, int64_t timestamp=0)
 Appends a record to the log.
void Append (std::span< const int > arr, int64_t timestamp=0)
 Appends a record to the log.
void Append (std::initializer_list< int > arr, int64_t timestamp=0)
 Appends a record to the log.
void Append (std::span< const uint8_t > arr, int64_t timestamp=0)
 Appends a record to the log.
void Update (std::span< const bool > 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< bool > arr, int64_t timestamp=0)
 Updates the last value and appends a record to the log if it has changed.
void Update (std::span< const int > 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< int > arr, int64_t timestamp=0)
 Updates the last value and appends a record to the log if it has changed.
void Update (std::span< const uint8_t > arr, int64_t timestamp=0)
 Updates the last value and appends a record to the log if it has changed.
Public Member Functions inherited from wpi::log::DataLogValueEntryImpl< std::vector< int > >
DataLogValueEntryImploperator= (DataLogValueEntryImpl &&rhs)
bool HasLastValue () const
 Gets whether there is a last value.
std::optional< std::vector< int > > 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.

Static Public Attributes

static constexpr const char * kDataType = "boolean[]"

Additional Inherited Members

Protected Member Functions inherited from wpi::log::DataLogValueEntryImpl< std::vector< int > >
 DataLogValueEntryImpl ()=default
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::DataLogValueEntryImpl< std::vector< int > >
wpi::util::mutex m_mutex
std::optional< std::vector< int > > m_lastValue
Protected Attributes inherited from wpi::log::DataLogEntry
DataLogm_log = nullptr
int m_entry = 0

Detailed Description

Log array of boolean values.

Constructor & Destructor Documentation

◆ BooleanArrayLogEntry() [1/3]

wpi::log::BooleanArrayLogEntry::BooleanArrayLogEntry ( )
default

◆ BooleanArrayLogEntry() [2/3]

wpi::log::BooleanArrayLogEntry::BooleanArrayLogEntry ( DataLog & log,
std::string_view name,
int64_t timestamp = 0 )
inline

◆ BooleanArrayLogEntry() [3/3]

wpi::log::BooleanArrayLogEntry::BooleanArrayLogEntry ( DataLog & log,
std::string_view name,
std::string_view metadata,
int64_t timestamp = 0 )
inline

Member Function Documentation

◆ Append() [1/5]

void wpi::log::BooleanArrayLogEntry::Append ( std::initializer_list< bool > arr,
int64_t timestamp = 0 )
inline

Appends a record to the log.

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

◆ Append() [2/5]

void wpi::log::BooleanArrayLogEntry::Append ( std::initializer_list< int > arr,
int64_t timestamp = 0 )
inline

Appends a record to the log.

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

◆ Append() [3/5]

void wpi::log::BooleanArrayLogEntry::Append ( std::span< const bool > arr,
int64_t timestamp = 0 )
inline

Appends a record to the log.

For find functions to work, timestamp must be monotonically increasing.

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

◆ Append() [4/5]

void wpi::log::BooleanArrayLogEntry::Append ( std::span< const int > arr,
int64_t timestamp = 0 )
inline

Appends a record to the log.

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

◆ Append() [5/5]

void wpi::log::BooleanArrayLogEntry::Append ( std::span< const uint8_t > arr,
int64_t timestamp = 0 )
inline

Appends a record to the log.

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

◆ Update() [1/5]

void wpi::log::BooleanArrayLogEntry::Update ( std::initializer_list< bool > 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
arrValues to record
timestampTime stamp (may be 0 to indicate now)

◆ Update() [2/5]

void wpi::log::BooleanArrayLogEntry::Update ( std::initializer_list< int > 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
arrValues to record
timestampTime stamp (may be 0 to indicate now)

◆ Update() [3/5]

void wpi::log::BooleanArrayLogEntry::Update ( std::span< const bool > 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
arrValues to record
timestampTime stamp (may be 0 to indicate now)

◆ Update() [4/5]

void wpi::log::BooleanArrayLogEntry::Update ( std::span< const int > 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
arrValues to record
timestampTime stamp (may be 0 to indicate now)

◆ Update() [5/5]

void wpi::log::BooleanArrayLogEntry::Update ( std::span< const uint8_t > 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
arrValues to record
timestampTime stamp (may be 0 to indicate now)

Member Data Documentation

◆ kDataType

const char* wpi::log::BooleanArrayLogEntry::kDataType = "boolean[]"
staticconstexpr

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