-
Notifications
You must be signed in to change notification settings - Fork 32
Open Source Draco Release #125
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
Conversation
8f1fc1f to
5dd9250
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
Batch update of latest cFS software release Reflects commit 9712a6105855aaa6036545daecf66d2f2c43d38f from NASA internal development repo
5dd9250 to
488d8c1
Compare
b61ebe2 to
70552b4
Compare
| /* */ | ||
| /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | ||
| void FM_ProcessCmd(const CFE_SB_Buffer_t *BufPtr) | ||
| void FM_ProcessGroundCommand(const CFE_SB_Buffer_t *BufPtr) |
Check warning
Code scanning / CodeQL
Poorly documented large function Warning
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 23 hours ago
In general, the best fix is to add a clear, structured comment block documenting FM_ProcessGroundCommand, including its purpose, how it processes commands, expectations on the input buffer, and its error-handling behavior. This raises the comment density within the function’s region and provides maintainers with important context, without altering any functionality.
Concretely, we should add a Doxygen-style function header comment immediately above the definition of FM_ProcessGroundCommand (line 84) in fsw/src/fm_dispatch.c. The comment should briefly describe that this is the ground command dispatcher for the FM application, that it extracts the function code from the incoming software bus buffer, verifies command length for each specific command type, and invokes the corresponding handler. It should also describe the BufPtr parameter and note that invalid or malformed commands will result in an error event and increment of the command error counter by the called verification routine. No new imports or code changes are needed—just the documentation.
-
Copy modified lines R84-R101
| @@ -81,6 +81,24 @@ | ||
| /* FM application -- command packet processor */ | ||
| /* */ | ||
| /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | ||
| /** | ||
| * @brief Process a ground command message for the File Manager (FM) application. | ||
| * | ||
| * This routine is the central dispatcher for all FM ground commands received | ||
| * on the software bus. It extracts the FM function code from the incoming | ||
| * message buffer and, based on the code, verifies the command message length | ||
| * and invokes the corresponding FM command handler. | ||
| * | ||
| * The command-specific length checks are performed via #FM_VerifyCmdLength | ||
| * prior to calling each handler. If a length mismatch is detected, an error | ||
| * event is generated and the FM command error counter is incremented; the | ||
| * associated handler is not called in that case. | ||
| * | ||
| * @param[in] BufPtr Pointer to the software bus buffer that contains the | ||
| * FM ground command message to be processed. This pointer | ||
| * is expected to reference a valid, fully-populated | ||
| * CFE_SB_Buffer_t structure received from the software bus. | ||
| */ | ||
| void FM_ProcessGroundCommand(const CFE_SB_Buffer_t *BufPtr) | ||
| { | ||
| CFE_MSG_FcnCode_t CommandCode = 0; |
NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
Batch update of latest cFS software release
Reflects commit 9712a6105855aaa6036545daecf66d2f2c43d38f from NASA internal development repo