42 std::vector<DataLogReaderRange>
ranges;
48 : m_reader{
std::move(reader)}, m_thread{[this] { ReadMain(); }} {}
51 bool IsDone()
const {
return m_done; }
53 return m_reader.GetBufferIdentifier();
57 std::scoped_lock lock{m_mutex};
58 return m_entriesByName.size();
64 std::scoped_lock lock{m_mutex};
65 for (
auto&& kv : m_entriesByName) {
71 std::scoped_lock lock{m_mutex};
72 auto it = m_entriesByName.find(
name);
73 if (it == m_entriesByName.end()) {
80 std::scoped_lock lock{m_mutex};
81 auto it = m_entriesById.find(entry);
82 if (it == m_entriesById.end()) {
105 std::atomic_bool m_active{
true};
106 std::atomic_bool m_done{
false};
107 std::atomic<unsigned int> m_numRecords{0};
108 std::map<std::string, DataLogReaderEntry, std::less<>> m_entriesByName;
113 std::thread m_thread;
This file defines the DenseMap class.
UPB_API_INLINE upb_Arena * upb_Arena_New(void)
Definition arena.h:80
@ name
Definition base.h:690
Definition DataLogReaderThread.hpp:40
std::vector< DataLogReaderRange > ranges
Definition DataLogReaderThread.hpp:42
Data log reader (reads logs written by the DataLog class).
Definition DataLogReader.hpp:299
DataLogIterator iterator
Definition DataLogReader.hpp:303
wpi::log::DataLogReader::iterator m_end
Definition DataLogReaderThread.hpp:37
DataLogReaderRange(wpi::log::DataLogReader::iterator begin, wpi::log::DataLogReader::iterator end)
Definition DataLogReaderThread.hpp:29
wpi::log::DataLogReader::iterator m_begin
Definition DataLogReaderThread.hpp:36
wpi::log::DataLogReader::iterator end() const
Definition DataLogReaderThread.hpp:34
wpi::log::DataLogReader::iterator begin() const
Definition DataLogReaderThread.hpp:33
wpi::util::sig::Signal_mt sigDone
Definition DataLogReaderThread.hpp:98
unsigned int GetNumRecords() const
Definition DataLogReaderThread.hpp:55
wpi::util::sig::Signal_mt< const DataLogReaderEntry & > sigEntryAdded
Definition DataLogReaderThread.hpp:97
upb_Arena * GetProtobufArena()
Definition DataLogReaderThread.hpp:92
DataLogReaderThread(wpi::log::DataLogReader reader)
Definition DataLogReaderThread.hpp:47
const DataLogReaderEntry * GetEntry(std::string_view name) const
Definition DataLogReaderThread.hpp:70
void ForEachEntryName(T &&func)
Definition DataLogReaderThread.hpp:63
const wpi::log::DataLogReader & GetReader() const
Definition DataLogReaderThread.hpp:94
unsigned int GetNumEntries() const
Definition DataLogReaderThread.hpp:56
const DataLogReaderEntry * GetEntry(int entry) const
Definition DataLogReaderThread.hpp:79
std::string_view GetBufferIdentifier() const
Definition DataLogReaderThread.hpp:52
wpi::util::StructDescriptorDatabase & GetStructDatabase()
Definition DataLogReaderThread.hpp:88
upb_DefPool * GetProtobufDatabase()
Definition DataLogReaderThread.hpp:91
bool IsDone() const
Definition DataLogReaderThread.hpp:51
Definition DenseMap.hpp:728
Database of raw struct dynamic descriptors.
Definition DynamicStruct.hpp:335
UPB_API upb_DefPool * upb_DefPool_New(void)
Definition StringMap.hpp:773
Definition DataLogReader.hpp:17
SignalBase< mutex, T... > Signal_mt
Specialization of SignalBase to be used in multi-threaded contexts.
Definition Signal.h:821
::std::mutex mutex
Definition mutex.hpp:17
struct upb_DefPool upb_DefPool
Definition common.h:24
Data contained in a start control record as created by DataLog::Start() when writing the log.
Definition DataLogReader.hpp:23