Make structured data available to FPrime template. Refs #246.#247
Merged
ivanperez-keera merged 5 commits intonasa:developfrom Feb 8, 2025
Merged
Make structured data available to FPrime template. Refs #246.#247ivanperez-keera merged 5 commits intonasa:developfrom
ivanperez-keera merged 5 commits intonasa:developfrom
Conversation
…sa#246. The current FPrime backend is overly specific, complex and composes data manually. For example, it assumes a specific structure for the message handlers. It also extracts data from data structures, manually converts it to strings, and then packs it into a JSON structure. This limits user's abilities to adjust the template to fit their needs, since most of the data is given as fixed strings, rather than letting users access each variable declaration and, within them, each type and name individually. This commit simplifies the FPrime backend by packing all the raw data that may be relevant for the FPrime application in a data structure, converting it to JSON, and then passing it to the template expansion system.
…Refs nasa#246. The current FPrime backend is overly specific, complex and composes data manually. For example, it assumes a specific structure for the message handlers. It also extracts data from data structures, manually converts it to strings, and then packs it into a JSON structure. This limits user's abilities to adjust the template to fit their needs, since most of the data is given as fixed strings, rather than letting users access each variable declaration and, within them, each type and name individually. A prior commit has modified the FPrime backend to use provide more raw data to the FPrime template, making it more versatile. This commit updates the template to make use of such data, by moving to the template some of the constructs that the prior FPrime backend was providing as code snippets in strings. The template is modified such that it generates the exact same final FPrime application as before.
…#246. The current FPrime backend is overly specific, complex and composes data manually. For example, it assumes a specific structure for the message handlers. It also extracts data from data structures, manually converts it to strings, and then packs it into a JSON structure. This limits user's abilities to adjust the template to fit their needs, since most of the data is given as fixed strings, rather than letting users access each variable declaration and, within them, each type and name individually. Prior commits have modified the FPrime backend to provide more raw data to the FPrime template, and have adjusted the default template accordingly. This commit updates the README to document the new variables available to the template.
Member
Author
|
Change Manager: Verified that:
|
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.
Modify FPrime backend to make more structured data directly available to the FPrime template, as prescribed in the solution proposed for #246.