CF icon indicating copy to clipboard operation
CF copied to clipboard

Fix #288, Remove unnecessary `CF_UnionArgs_Payload_t` union

Open thnkslprpt opened this issue 2 years ago • 1 comments

Checklist

Describe the contribution

  • Fixes #288 CF_UnionArgs_Payload_t has been removed, given that only a single member of the 3 is used in CF. That member variable - byte - has been moved into the CF_UnionArgsCmd_t struct, which was the only place where CF_UnionArgs_Payload_t was used.

  • Re-introduced from https://github.com/nasa/CF/pull/341. https://github.com/nasa/CF/issues/393, https://github.com/nasa/CF/pull/395 reverted this PR due to integration issues. Resubmitting here for consideration in next release.

Testing performed GitHub CI actions (incl. Build + Run, Unit Tests etc.) all passing successfully.

Expected behavior changes No impact on logic. Code is simplified and clearer.

Contributor Info Avi Weiss @thnkslprpt

thnkslprpt avatar Jul 12 '23 11:07 thnkslprpt

We need to also do this but I'd like to approach it a bit differently. Although only the "byte" field is used now, it is still used for a few different things in different commands. Now that each command has its own definition, this should be made type-correct.

@jphickey So you want to create command-specific struct members for each command? What exactly do you mean in terms of the solution to make it type-correct? Cheers

thnkslprpt avatar Dec 05 '23 21:12 thnkslprpt