![]() |
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.
|

Public Member Functions | |
| CSVBufferManager (ClientContext &context, const CSVReaderOptions &options, const OpenFileInfo &file, bool per_file_single_threaded=false, unique_ptr< CSVFileHandle > file_handle=nullptr) | |
| shared_ptr< CSVBufferHandle > | GetBuffer (const idx_t buffer_idx) |
| void | ResetBuffer (const idx_t buffer_idx) |
| void | Initialize () |
| Initializes the buffer manager, during it's construction/reset. | |
| void | UnpinBuffer (const idx_t cache_idx) |
| idx_t | GetBufferSize () const |
| Returns the buffer size set for this CSV buffer manager. | |
| idx_t | BufferCount () const |
| Returns the number of buffers in the cached_buffers cache. | |
| bool | Done () const |
| void | ResetBufferManager () |
| string | GetFilePath () const |
| bool | IsBlockUnloaded (idx_t block_idx) |
| idx_t | GetBytesRead () const |
Public Attributes | |
| unique_ptr< CSVFileHandle > | file_handle |
| unique_ptr to the file handle, gets stolen after sniffing | |
| ClientContext & | context |
| idx_t | skip_rows = 0 |
| bool | sniffing = false |
| const bool | per_file_single_threaded |
Private Member Functions | |
| bool | ReadNextAndCacheIt () |
| Reads next buffer in reference to cached_buffers.front(). | |
Private Attributes | |
| const OpenFileInfo | file |
| The file this Buffer Manager refers to. | |
| vector< shared_ptr< CSVBuffer > > | cached_buffers |
| The cached buffers. | |
| shared_ptr< CSVBuffer > | last_buffer |
| The last buffer it was accessed. | |
| idx_t | global_csv_pos = 0 |
| idx_t | buffer_size |
| The size of the buffer, if the csv file has a smaller size than this, we will use that instead to malloc less. | |
| bool | done = false |
| If this buffer manager is done (i.e., no more buffers to read beyond the ones that were cached. | |
| idx_t | bytes_read = 0 |
| mutex | main_mutex |
| Because the buffer manager can be accessed in Parallel we need a mutex. | |
| bool | has_seeked = false |
| If the file_handle used seek. | |
| unordered_set< idx_t > | reset_when_possible |
| bool | is_pipe |
This class is used to manage the CSV buffers. Buffers are cached when used for auto detection. When parsing, buffer are not cached and just returned. A CSV Buffer Manager is created for each separate CSV File.
| duckdb::CSVBufferManager::CSVBufferManager | ( | ClientContext & | context, |
| const CSVReaderOptions & | options, | ||
| const OpenFileInfo & | file, | ||
| bool | per_file_single_threaded = false, | ||
| unique_ptr< CSVFileHandle > | file_handle = nullptr ) |
| shared_ptr< CSVBufferHandle > duckdb::CSVBufferManager::GetBuffer | ( | const idx_t | buffer_idx | ) |
Returns a buffer from a buffer id (starting from 0). If it's in the auto-detection then we cache new buffers Otherwise we remove them from the cache if they are already there, or just return them bypassing the cache.


| void duckdb::CSVBufferManager::ResetBuffer | ( | const idx_t | buffer_idx | ) |
| void duckdb::CSVBufferManager::Initialize | ( | ) |
Initializes the buffer manager, during it's construction/reset.

| void duckdb::CSVBufferManager::UnpinBuffer | ( | const idx_t | cache_idx | ) |
| idx_t duckdb::CSVBufferManager::GetBufferSize | ( | ) | const |
Returns the buffer size set for this CSV buffer manager.
| idx_t duckdb::CSVBufferManager::BufferCount | ( | ) | const |
Returns the number of buffers in the cached_buffers cache.
| bool duckdb::CSVBufferManager::Done | ( | ) | const |
If this buffer manager is done. In the context of a buffer manager it means that it read all buffers at least once.
| void duckdb::CSVBufferManager::ResetBufferManager | ( | ) |
| string duckdb::CSVBufferManager::GetFilePath | ( | ) | const |
| bool duckdb::CSVBufferManager::IsBlockUnloaded | ( | idx_t | block_idx | ) |
| idx_t duckdb::CSVBufferManager::GetBytesRead | ( | ) | const |
|
private |
Reads next buffer in reference to cached_buffers.front().
