![]() |
Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
|
#include <duckdb.hpp>


Public Member Functions | |
| BufferingLogStorage (DatabaseInstance &db_p, idx_t buffer_size, bool normalize) | |
| void | WriteLogEntry (timestamp_t timestamp, LogLevel level, const string &log_type, const string &log_message, const RegisteredLoggingContext &context) final |
| (Partially) Implements LogStorage API | |
| void | WriteLogEntries (DataChunk &chunk, const RegisteredLoggingContext &context) final |
| Write out the chunk to the buffers. | |
| void | FlushAll () final |
| Flushes buffers for all tables. | |
| void | Flush (LoggingTargetTable table) final |
| Flushes buffer for a specific table. | |
| void | Truncate () override |
| Truncates log storage: both buffers and persistent storage (if applicable) | |
| void | UpdateConfig (DatabaseInstance &db, case_insensitive_map_t< Value > &config) override |
| Apply a new log storage configuration. | |
| bool | IsEnabled (LoggingTargetTable table) override |
| Returns whether the table is enabled for this storage. | |
Public Member Functions inherited from duckdb::LogStorage | |
| virtual const string | GetStorageName ()=0 |
| virtual DUCKDB_API bool | CanScan (LoggingTargetTable table) |
| READING (OPTIONAL) | |
| virtual DUCKDB_API unique_ptr< LogStorageScanState > | CreateScanState (LoggingTargetTable table) const |
| virtual DUCKDB_API bool | Scan (LogStorageScanState &state, DataChunk &result) const |
| virtual DUCKDB_API void | InitializeScan (LogStorageScanState &state) const |
| virtual DUCKDB_API unique_ptr< TableRef > | BindReplace (ClientContext &context, TableFunctionBindInput &input, LoggingTargetTable table) |
Protected Member Functions | |
| virtual void | FlushChunk (LoggingTargetTable table, DataChunk &chunk)=0 |
| Interface to child classes. | |
| virtual void | UpdateConfigInternal (DatabaseInstance &db, case_insensitive_map_t< Value > &config) |
| virtual void | ResetAllBuffers () |
| void | FlushAllInternal () |
| Helper methods. | |
| void | FlushInternal (LoggingTargetTable table) |
| Flushes one of the tables. | |
| bool | IsEnabledInternal (LoggingTargetTable table) |
| Whether a specific table is available in the log storage. | |
| idx_t | GetBufferLimit () const |
Protected Attributes | |
| mutex | lock |
| bool | normalize_contexts = true |
Private Member Functions | |
| void | ResetLogBuffers () |
| Resets the log buffers. | |
| void | WriteLoggingContext (const RegisteredLoggingContext &context) |
| Write out a logging context. | |
Private Attributes | |
| unordered_set< idx_t > | registered_contexts |
| The currently registered RegisteredLoggingContext's. | |
| idx_t | buffer_limit = 0 |
| Configuration for buffering. | |
| bool | only_flush_on_full_buffer = false |
| Debug option for testing buffering behaviour. | |
| map< LoggingTargetTable, unique_ptr< DataChunk > > | buffers |
| The buffers used for each table. | |
| bool | flush_contexts_on_next_entry_flush = false |
Additional Inherited Members | |
Static Public Member Functions inherited from duckdb::LogStorage | |
| static vector< LogicalType > | GetSchema (LoggingTargetTable table) |
| static vector< string > | GetColumnNames (LoggingTargetTable table) |
The buffering Log storage implements a buffering mechanism around the Base LogStorage class. It implements some general features that most log storages will need.
|
finalvirtual |
(Partially) Implements LogStorage API
Write out the entry to the buffers
Implements duckdb::LogStorage.
|
finalvirtual |
Write out the chunk to the buffers.
Implements duckdb::LogStorage.
|
finalvirtual |
Flushes buffers for all tables.
Implements duckdb::LogStorage.
|
finalvirtual |
Flushes buffer for a specific table.
Implements duckdb::LogStorage.
|
overridevirtual |
Truncates log storage: both buffers and persistent storage (if applicable)
Reimplemented from duckdb::LogStorage.
Reimplemented in duckdb::FileLogStorage.
|
overridevirtual |
Apply a new log storage configuration.
Reimplemented from duckdb::LogStorage.
|
overridevirtual |
Returns whether the table is enabled for this storage.
Implements duckdb::LogStorage.
|
protectedpure virtual |
Interface to child classes.
Invoked whenever buffers are full to flush to storage
Implemented in duckdb::CSVLogStorage, and duckdb::InMemoryLogStorage.
|
protectedvirtual |
This method is called in a chained way down the class hierarchy. This allows each class to interpret its own part of the config. Unhandled config values that are left over will result in an error
Reimplemented in duckdb::CSVLogStorage, and duckdb::FileLogStorage.
ResetAllBuffers will clear all buffered data. To be overridden by child classes to ensure their buffers are flushed too
Reimplemented in duckdb::CSVLogStorage, and duckdb::InMemoryLogStorage.
|
protected |
Helper methods.
Flushes all tables
|
mutableprotected |
lock to be used by this class and child classes to ensure thread safety TODO: maybe remove and delegate thread-safety to LogManager?
|
protected |
Switches between using false = use LoggingTargetTable::ALL_LOGS, true = use LoggingTargetTable::LOG_ENTIRES + LoggingTargetTable::CONTEXTS
|
private |
This flag is set whenever a new context_is written to the entry buffer. It means that the next flush of LoggingTargetTable::LOG_ENTRIES also requires a flush of LoggingTargetTable::LOG_CONTEXTS