Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HK struct members that are duplicated in the Global struct could be consolidated #106

Open
2 tasks done
thnkslprpt opened this issue Jun 5, 2023 · 0 comments
Open
2 tasks done

Comments

@thnkslprpt
Copy link
Contributor

Checklist

  • I reviewed the Contributing Guide.
  • I performed a cursory search to see if the bug report is relevant, not redundant, nor in conflict with other tickets.

Describe the bug
All of the housekeeping struct members except NumOpenFiles are duplicated (identically) in the global struct.

Code snips

FM/fsw/inc/fm_msg.h

Lines 547 to 563 in e7afedc

typedef struct
{
uint8 CommandCounter; /**< \brief Application command counter */
uint8 CommandErrCounter; /**< \brief Application command error counter */
uint8 Spare; /**< \brief Placeholder for unused command warning counter */
uint8 NumOpenFiles; /**< \brief Number of open files in the system */
uint8 ChildCmdCounter; /**< \brief Child task command counter */
uint8 ChildCmdErrCounter; /**< \brief Child task command error counter */
uint8 ChildCmdWarnCounter; /**< \brief Child task command warning counter */
uint8 ChildQueueCount; /**< \brief Number of pending commands in queue */
uint8 ChildCurrentCC; /**< \brief Command code currently executing */
uint8 ChildPreviousCC; /**< \brief Command code previously executed */
} FM_HousekeepingPkt_Payload_t;

FM/fsw/src/fm_app.h

Lines 66 to 79 in e7afedc

uint8 ChildCmdCounter; /**< \brief Child task command success counter */
uint8 ChildCmdErrCounter; /**< \brief Child task command error counter */
uint8 ChildCmdWarnCounter; /**< \brief Child task command warning counter */
uint8 ChildWriteIndex; /**< \brief Array index for next write to command args */
uint8 ChildReadIndex; /**< \brief Array index for next read from command args */
uint8 ChildQueueCount; /**< \brief Number of pending commands in queue */
uint8 CommandCounter; /**< \brief Application command success counter */
uint8 CommandErrCounter; /**< \brief Application command error counter */
uint8 Spare8a; /**< \brief Placeholder for unused command warning counter */
uint8 ChildCurrentCC; /**< \brief Command code currently executing */
uint8 ChildPreviousCC; /**< \brief Command code previously executed */

Expected behavior
Consolidate duplicated struct members to only exist (and be updated/accessed) in the housekeeping struct.

This more parsimonious approach is taken by several of the apps (CF, CS, MM, SC) as well as EVS and SB in the cFE.

Reporter Info
Avi Weiss @thnkslprpt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants