nasa / fprime

F´ - A flight software and embedded systems framework
https://fprime.jpl.nasa.gov
Apache License 2.0
10.02k stars 1.29k forks source link

Update `Svc/PolyDb` to use configurable FPP enumeration as index #2587

Closed timcanham closed 5 months ago

timcanham commented 5 months ago
Related Issue(s) none
Has Unit Tests (y/n) y
Documentation Included (y/n) y

Change Description

Update Svc/PolyDb to use an FPP enum for the database index. PolyDb implementation files were also updated to the new file naming convention.

Rationale

Using an FPP enum allows projects to assign names to the index as opposed to using just a bare integer. This will make the code clearer and less error-prone. Moving the index enum to the config directory separates it from the implementation so projects can customize it.

Testing/Review Recommendations

Unit testing was update to the new file organization and helper classes. The nominal unit test code was essentially unchanged except for updating to use the enumeration class.

Future Work

This enables the future sequencing proposals to have conditional logic based on PolyDb entries. The sequences can have entries by name using the FPP enum to make it clearer.