Updated DynamicTable configuration to support row-based recording#305
Open
oruebel wants to merge 12 commits into
Open
Updated DynamicTable configuration to support row-based recording#305oruebel wants to merge 12 commits into
oruebel wants to merge 12 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #303
Problem: The current implementation of
DynamicTableis mainly designed for the purpose of metadata tables, e.g.,ElectrodeTable, where we can usually fill in the whole table before the actual acquisition. With the newEventTable, however, we need enhanced support for acquiring the data in the table as part of the acquisition workflow.Goal: Update
DynamicTableandEventTableto simplify row-based recording and configuration of the tableChanges:
addColumnData::DataSpecBaseandData::DataSpec<T>to support runtime configuration ofDynamicTablecolumn layouts and to decouple table schema definition from object initialization. EachDatasubclass (e.g.,VectorData,ElementIdentifiers,TimestampVectorData,DurationVectorData) now exposes a nestedDataSpecstruct that bundles the dataset configuration, description, and any type-specific parameters needed to create and initialize the column.DynamicTable::createDefaultDataSpecsstatic factory to return the default ordered list ofDataSpecobjects for a table (currently just theidcolumn). Subclasses (ElectrodesTable,EventsTable,MeaningsTable) override this to append their own required columns, allowing callers to retrieve, inspect, and customize the default column configuration before passing it toinitialize().DynamicTable::initialize,ElectrodesTable::initialize,EventsTable::initialize, andMeaningsTable::initializeto accept astd::vector<DataSpecPtr>column-spec list instead of individualrowChunkSize/ resolution / flag parameters.DynamicTable::addColumn(DataSpecPtr)overload consistent with the newDataSpec-based API used byinitialize()andcreateDefaultDataSpecs().DynamicTable::addRowandDynamicTable::addRowsmethods to support row-based data insertion into aDynamicTable. Rows are specified asDynamicTable::RowData(anunordered_mapfrom column name toCellValuevariant), enabling type-safe, column-keyed writes without requiring callers to manage per-column buffers directly. Row IDs are auto-generated if not provided.BaseDataType::BaseDataVariantscalar variant type andBaseDataType::createEmptyVectorVarianthelper to support runtime-typed single-cell and buffer operations needed byaddRow/addRows. (@cline, @oruebel, #305)MeaningsTableto a columns