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

Function prototypes can be moved out of cs_app.c #76

Closed
2 tasks done
thnkslprpt opened this issue Apr 5, 2023 · 0 comments · Fixed by #77
Closed
2 tasks done

Function prototypes can be moved out of cs_app.c #76

thnkslprpt opened this issue Apr 5, 2023 · 0 comments · Fixed by #77

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
These function prototypes can/should be moved into the header file. It's a little incongruous with the rest of cFS.

CS/fsw/src/cs_app.c

Lines 54 to 132 in 591d082

/**
* \brief Initialize the Checksum CFS application
*
* \par Description
* Checksum application initialization routine. This
* function performs all the required startup steps to
* get the application registered with the cFE services so
* it can begin to receive command messages and begin
* background checksumming.
*
* \par Assumptions, External Events, and Notes:
* None
*
* \return Execution status, see \ref CFEReturnCodes
* \retval #CFE_SUCCESS \copybrief CFE_SUCCESS
*/
int32 CS_AppInit(void);
/**
* \brief Process a command pipe message
*
* \par Description
* Processes a single software bus command pipe message. Checks
* the message and command IDs and calls the appropriate routine
* to handle the command.
*
* \par Assumptions, External Events, and Notes:
* None
*
* \param [in] BufPtr A #CFE_SB_Buffer_t* pointer that
* references the software bus message. The
* calling function verifies that BufPtr is
* non-null.
*
* \return Execution status, see \ref CFEReturnCodes
* \retval #CFE_SUCCESS \copybrief CFE_SUCCESS
*/
int32 CS_AppPipe(const CFE_SB_Buffer_t *BufPtr);
/**
* \brief Process housekeeping request
*
* \par Description
* Processes an on-board housekeeping request message.
*
* \par Assumptions, External Events, and Notes:
* This command does not affect the command execution counter
*
* \param[in] CmdPtr Command pointer, verified non-null in CS_AppMain
*/
void CS_HousekeepingCmd(const CS_NoArgsCmd_t *CmdPtr);
/**
* \brief Command packet processor
*
* \par Description
* Proccesses all CS commands
*
* \param [in] BufPtr A CFE_SB_Buffer_t* pointer that
* references the software bus pointer. The
* BufPtr is verified non-null in CS_AppMain.
*/
void CS_ProcessCmd(const CFE_SB_Buffer_t *BufPtr);
#if (CS_PRESERVE_STATES_ON_PROCESSOR_RESET == true)
/**
* \brief Restore tables states from CDS if enabled
*
* \par Description
* Restore CS state of tables from CDS
*
* \par Assumptions, External Events, and Notes:
* None
*
* \return Execution status, see \ref CFEReturnCodes
* \retval #CFE_SUCCESS \copybrief CFE_SUCCESS
*/
int32 CS_CreateRestoreStatesFromCDS(void);
#endif

I assume the original intent was to keep them private if they were not needed as part of the interface.

Expected behavior
Unless these are specifically being kept private, it seems better to keep CS consistent with the other apps and move these to the header file.

Reporter Info
Avi Weiss @thnkslprpt

thnkslprpt added a commit to thnkslprpt/CS that referenced this issue Apr 5, 2023
thnkslprpt added a commit to thnkslprpt/CS that referenced this issue Apr 13, 2023
dzbaker added a commit that referenced this issue Apr 13, 2023
…s-out-of-cs-app

Fix #76, Move function prototypes out of `cs_app.c`
@dmknutsen dmknutsen added this to the Equuleus milestone May 26, 2023
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.

3 participants