![]() |
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 Types | |
| using | CachedFileRangeOverlap = ExternalFileCache::CachedFileRangeOverlap |
| using | CachedFileRange = ExternalFileCache::CachedFileRange |
| using | CachedFile = ExternalFileCache::CachedFile |
Public Member Functions | |
| DUCKDB_API | CachingFileHandle (QueryContext context, CachingFileSystem &caching_file_system, const OpenFileInfo &path, FileOpenFlags flags, optional_ptr< FileOpener > opener, CachedFile &cached_file) |
| DUCKDB_API FileHandle & | GetFileHandle () |
| Get the underlying FileHandle. | |
| DUCKDB_API BufferHandle | Read (data_ptr_t &buffer, idx_t nr_bytes, idx_t location) |
| DUCKDB_API BufferHandle | Read (data_ptr_t &buffer, idx_t &nr_bytes) |
| Read (non-seeking) nr bytes from the file (or cache), same as above, also sets nr_bytes to actually read bytes. | |
| DUCKDB_API string | GetPath () const |
| Get some properties of the file. | |
| DUCKDB_API idx_t | GetFileSize () |
| DUCKDB_API timestamp_t | GetLastModifiedTime () |
| DUCKDB_API string | GetVersionTag () |
| DUCKDB_API bool | Validate () const |
| DUCKDB_API bool | CanSeek () |
| DUCKDB_API bool | IsRemoteFile () const |
| DUCKDB_API bool | OnDiskFile () |
| DUCKDB_API idx_t | SeekPosition () |
| DUCKDB_API void | Seek (idx_t location) |
Private Member Functions | |
| const string & | GetVersionTag (const unique_ptr< StorageLockKey > &guard) |
| Get the version tag of the file (for checking cache invalidation). | |
| BufferHandle | TryReadFromCache (data_ptr_t &buffer, idx_t nr_bytes, idx_t location, vector< shared_ptr< CachedFileRange > > &overlapping_ranges, optional_idx &start_location_of_next_range) |
| BufferHandle | TryReadFromFileRange (const unique_ptr< StorageLockKey > &guard, CachedFileRange &file_range, data_ptr_t &buffer, idx_t nr_bytes, idx_t location) |
| Try to read from the specified range, return an invalid BufferHandle if it fails. | |
| BufferHandle | TryInsertFileRange (BufferHandle &pin, data_ptr_t &buffer, idx_t nr_bytes, idx_t location, shared_ptr< CachedFileRange > &new_file_range) |
| Try to insert the file range into the cache. | |
| idx_t | ReadAndCopyInterleaved (const vector< shared_ptr< CachedFileRange > > &overlapping_ranges, const shared_ptr< CachedFileRange > &new_file_range, data_ptr_t buffer, idx_t nr_bytes, idx_t location, bool actually_read) |
Private Attributes | |
| QueryContext | context |
| CachingFileSystem & | caching_file_system |
| The client caching file system that was used to create this CachingFileHandle. | |
| ExternalFileCache & | external_file_cache |
| The DB external file cache. | |
| OpenFileInfo | path |
| For opening the file (possibly with extra info). | |
| FileOpenFlags | flags |
| Flags used to open the file. | |
| optional_ptr< FileOpener > | opener |
| File opener, which contains file open context. | |
| CacheValidationMode | validate |
| Cache validation mode for this file. | |
| CachedFile & | cached_file |
| The associated CachedFile with cached ranges. | |
| unique_ptr< FileHandle > | file_handle |
| The underlying FileHandle (optional). | |
| timestamp_t | last_modified |
| Last modified time and version tag (if FileHandle is opened). | |
| string | version_tag |
| idx_t | position |
| Current position (if non-seeking reads). | |
| duckdb::CachingFileHandle::CachingFileHandle | ( | QueryContext | context, |
| CachingFileSystem & | caching_file_system, | ||
| const OpenFileInfo & | path, | ||
| FileOpenFlags | flags, | ||
| optional_ptr< FileOpener > | opener, | ||
| CachedFile & | cached_file ) |
| duckdb::CachingFileHandle::~CachingFileHandle | ( | ) |
| FileHandle & duckdb::CachingFileHandle::GetFileHandle | ( | ) |
Get the underlying FileHandle.

| BufferHandle duckdb::CachingFileHandle::Read | ( | data_ptr_t & | buffer, |
| idx_t | nr_bytes, | ||
| idx_t | location ) |
Read (seek) nr_bytes from the file (or cache) at location. The pointer will be set to the requested range The buffer is guaranteed to stay in memory as long as the returned BufferHandle is in scope


| BufferHandle duckdb::CachingFileHandle::Read | ( | data_ptr_t & | buffer, |
| idx_t & | nr_bytes ) |
Read (non-seeking) nr bytes from the file (or cache), same as above, also sets nr_bytes to actually read bytes.

| string duckdb::CachingFileHandle::GetPath | ( | ) | const |
Get some properties of the file.
| idx_t duckdb::CachingFileHandle::GetFileSize | ( | ) |
| timestamp_t duckdb::CachingFileHandle::GetLastModifiedTime | ( | ) |
| string duckdb::CachingFileHandle::GetVersionTag | ( | ) |
| bool duckdb::CachingFileHandle::Validate | ( | ) | const |
| bool duckdb::CachingFileHandle::CanSeek | ( | ) |
| bool duckdb::CachingFileHandle::IsRemoteFile | ( | ) | const |
| bool duckdb::CachingFileHandle::OnDiskFile | ( | ) |
| void duckdb::CachingFileHandle::Seek | ( | idx_t | location | ) |
|
private |
Get the version tag of the file (for checking cache invalidation).

|
private |
Tries to read from the cache, filling "overlapping_ranges" with ranges that overlap with the request. Returns an invalid BufferHandle if it fails


|
private |
Try to read from the specified range, return an invalid BufferHandle if it fails.


|
private |
Try to insert the file range into the cache.


|
private |
Read from file and copy from cached buffers until the requested read is complete If actually_read is false, no reading happens, only the number of non-cached reads is counted and returned

