![]() |
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 | |
| PartialBlockManager (QueryContext context, BlockManager &block_manager, PartialBlockType partial_block_type, optional_idx max_partial_block_size=optional_idx(), uint32_t max_use_count=DEFAULT_MAX_USE_COUNT) | |
| PartialBlockAllocation | GetBlockAllocation (uint32_t segment_size) |
| void | RegisterPartialBlock (PartialBlockAllocation allocation) |
| Register a partially filled block that is filled with "segment_size" entries. | |
| void | ClearBlocks () |
| Clear remaining blocks without writing them to disk. | |
| void | Rollback () |
| Rollback all data written by this partial block manager. | |
| void | Merge (PartialBlockManager &other) |
| Merge this block manager into another one. | |
| void | FlushPartialBlocks () |
| Flush any remaining partial blocks to disk. | |
| unique_ptr< PartialBlock > | CreatePartialBlock (ColumnData &data, ColumnSegment &segment, PartialBlockState state, BlockManager &block_manager) |
| unique_lock< mutex > | GetLock () |
| block_id_t | GetFreeBlockId () |
| BlockManager & | GetBlockManager () const |
| Returns a reference to the underlying block manager. | |
| optional_ptr< ClientContext > | GetClientContext () const |
| Returns the optional client context. | |
Static Public Attributes | |
| static constexpr const idx_t | DEFAULT_MAX_USE_COUNT = 1u << 20 |
| Max number of shared references to a block. No effective limit by default. | |
| static constexpr const idx_t | MAX_BLOCK_MAP_SIZE = 1u << 31 |
Protected Member Functions | |
| virtual void | AllocateBlock (PartialBlockState &state, uint32_t segment_size) |
| bool | GetPartialBlock (idx_t segment_size, unique_ptr< PartialBlock > &state) |
| bool | HasBlockAllocation (uint32_t segment_size) |
Protected Attributes | |
| optional_ptr< ClientContext > | context |
| BlockManager & | block_manager |
| PartialBlockType | partial_block_type |
| mutex | partial_block_lock |
| multimap< idx_t, unique_ptr< PartialBlock > > | partially_filled_blocks |
| uint32_t | max_partial_block_size |
| The maximum size (in bytes) at which a partial block will be considered a partial block. | |
| uint32_t | max_use_count |
Enables sharing blocks across some scope. Scope is whatever we want to share blocks across. It may be an entire checkpoint or just a single row group. In any case, they must share a block manager.
|
inline |
|
protected |
Try to obtain a partially filled block that can fit "segment_size" bytes If successful, returns true and returns the block_id and offset_in_block to write to Otherwise, returns false
No point letting map size grow unbounded. We'll drop blocks with the least free space first.
|
protected |
The optional client context in which we use the partial block manager. The SingleFileCheckpointWriter contains a partial block manager, and the destructor of AttachedDatabase invokes CreateCheckpoint with that checkpoint writer. Thus, we're using the optional client context instead of a reference.
|
protected |
A map of (available space -> PartialBlock) for partially filled blocks This is a multimap because there might be outstanding partial blocks with the same amount of left-over space