NASA-AMMOS / aerie

A software framework for modeling spacecraft.
https://nasa-ammos.github.io/aerie-docs/
MIT License
73 stars 19 forks source link

FPrime Dictionary Support #1542

Closed goetzrrGit closed 1 month ago

goetzrrGit commented 2 months ago

Description

Frontend PR: https://github.com/NASA-AMMOS/aerie-ui/pull/1447

This PR introduces a plugin system for the sequencing server in efforts for Seq 2.0:

Plugin loader: A flexible plugin loader has been added to support various dictionary parsers. By default, the AMPCS dictionary parser is loaded from /ampcs-dictionary-parser/ampcs-parser.js.

Plugin manager: The PluginManager has been implemented to manage the loaded parsers and their use in dictionary uploads.

Dictionary parsing: Dictionary uploads now leverage the parsers provided by the PluginManager, allowing for more diverse dictionary formats.

Nested repeat arguments: Support for nested repeat arguments has been added to the eDSL generation, enabling better handling of Fprime dictionaries. Sequence expansion is experimental with FPrime dictionaries

New environment variable: A new environment variable has been introduced to specify the path to a custom dictionary parser, providing flexibility in parser selection.

Dictionary parser plugins: Two new plugins have been created:

Sequencing server configuration: The sequencing server has been configured to build the Aerie-supported dictionary parser plugins.

Testing:

  1. In the docker-compose file uncomment line DICTIONARY_PARSER_PLUGIN to use the FPrime parser
  2. Build the sequencing server ./gradlew sequence-server:clean; ./gradlew sequencing-server:assemble;
  3. Destroy and Rebuild the sequencing server container
  4. Ensure you use the UI branch linked to this PR.
  5. You can now upload the FPrime dictionary via the UI under the 'Dictionary Section'. ./sequencing-server/plugins/fprime-dictionary-parser/test/dictionary/RefTopologyDictionary.json
  6. Git Clone the aerie-fprime-adaptation and build the adaptation. Use the readme
  7. Upload the adaptation via the UI under the 'Dictionary Section'
  8. Make a Parcel containing the FPrime dictionary and adaptation
  9. With the Sequence Editor, create a workspace, and new sequence
  10. Select the Parcel within the editor that contains the Fprime and Adatapion
  11. Play around with the editor and see that the output generates an FPrime sequence.
  12. Export and import a sequence to verify round-tripping.

Verification

Still got to update e2e test...

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud