Conversation
Signed-off-by: David Young <davidsamuelyoung@protonmail.com>
Signed-off-by: David Young <davidsamuelyoung@protonmail.com>
…lated entities Signed-off-by: David Young <davidsamuelyoung@protonmail.com>
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.
Closes #135
This pull request introduces a comprehensive ID-based identity model for all major simulation objects, moving away from the previous name-based identification system. This change addresses the fragility of relying on unique names and provides a more robust internal mechanism for object referencing and management throughout the simulation core and UI.
Key Changes
Core & C++ API (
libfers)SimIdtype (a 64-bit integer) andSimIdGeneratorhave been introduced to create unique, structured IDs for simulation objects. The ID is composed of a 16-bit type code and a 48-bit counter.Platform,Transmitter,Receiver,Target,Antenna,Waveform, andTiming, are now assigned a uniqueSimIdupon creation.Worldclass) have been refactored to useSimIdas the primary key instead ofstd::stringnames.libfers/api.hhas been updated to reflect these changes. Functions likefers_get_antenna_patternand structs likefers_visual_link_tnow operate with IDs instead of names.Frontend (
fers-ui)idUtils.ts) has been added to the frontend to manage object identities within the React/Zustand state, replacing the previousuuidimplementation.LinkVisualizer,AntennaPatternMesh, andSceneTree, have been modified to use IDs for data fetching and state management.Serialization and Compatibility
.xmlscenario files remain unchanged. They continue to use string names for references to maintain backward compatibility and user-friendliness.SimIds for all objects and resolves the name-based references into ID-based ones internally. It also enforces name uniqueness at load time to prevent ambiguity.