Skip to content

Conversation

@kyleajones
Copy link
Contributor

  • Update enumerations in Types.fpp to use U8 instead of the default I32; the full I32 size is not needed for these simple enumerations
Related Issue(s) n/a
Has Unit Tests (y/n) n
Documentation Included (y/n) n

Change Description

This change request modifies the enumeration size for all enums listed in Types.fpp from the default I32 type to the smaller U8 type.

Rationale

This change will improve the memory footprint for telemetry channels that are defined by structs that contain members of types defined in this file. Particularly useful in memory-constrained systems that use F-Prime.

Testing/Review Recommendations

The change is straightforward. One review item worth considering would be using I8 instead of U8 as the type. In either case, all enums are well within the bounds of either type. I don't know if F-Prime has a preference to use the signed version of the type for these enums or if unsigned is fine.

Future Work

No planned future work associated with this issue.

- Update enumerations in Types.fpp to use U8 instead of the default I32; the full I32 size is not needed for these simple enumerations
@celskeggs celskeggs requested a review from LeStarch July 31, 2025 16:47
@LeStarch LeStarch requested a review from bocchino July 31, 2025 16:49
@LeStarch
Copy link
Collaborator

@bocchino could you weigh in on the use of an unsigned type as the enumeration backing type? Is this ok to do?

@bocchino
Copy link
Collaborator

Yes, that seems fine.

@LeStarch LeStarch merged commit 26aad95 into nasa:devel Jul 31, 2025
49 checks passed
kyleajones added a commit to kyleajones/fprime that referenced this pull request Aug 1, 2025
- Update enumerations in Types.fpp to use U8 instead of the default I32; the full I32 size is not needed for these simple enumerations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants