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

Fix #45, use separate dispatcher for messages #49

Merged
merged 1 commit into from
Mar 30, 2023

Conversation

jphickey
Copy link
Contributor

Checklist (Please check before submitting)

Describe the contribution
Isolate the message verification and dispatch from the general message processing. Functions in the "cmds" file now strictly handle the command content, and do not get involved in general validation.

The "Custom" code isolation is also in a separate dispatcher. There is a separate issue to address this.

Fixes #45

Testing performed
Build and run HK in CFE and run all tests

Expected behavior changes
No change in actual implementation, splits up source files into smaller units only

System(s) tested on
Debian

Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.

@github-advanced-security
Copy link

You have successfully added a new CodeQL configuration coding-standard. As part of the setup process, we have scanned this repository and found 27 existing alerts. Please check the repository Security tab to see all alerts.

/* Process a command pipe message */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void HK_AppPipe(const CFE_SB_Buffer_t *BufPtr)

Check notice

Code scanning / CodeQL

Long function without assertion

All functions of more than 10 lines should have at least one assertion.
/* Noop command */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void HK_NoopVerifyDispatch(const CFE_SB_Buffer_t *BufPtr)

Check notice

Code scanning / CodeQL

Long function without assertion

All functions of more than 10 lines should have at least one assertion.
/* Reset counters command */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void HK_ResetCountersVerifyDispatch(const CFE_SB_Buffer_t *BufPtr)

Check notice

Code scanning / CodeQL

Long function without assertion

All functions of more than 10 lines should have at least one assertion.
/* Verify Command Length */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
int32 HK_VerifyCmdLength(const CFE_SB_Buffer_t *BufPtr, size_t ExpectedLength)

Check notice

Code scanning / CodeQL

Long function without assertion

All functions of more than 10 lines should have at least one assertion.
/* Verify Non-Command Msg Length (Event is differnt) */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
int32 HK_VerifyMsgLength(const CFE_SB_Buffer_t *BufPtr, size_t ExpectedLength)

Check notice

Code scanning / CodeQL

Long function without assertion

All functions of more than 10 lines should have at least one assertion.
@@ -404,7 +321,7 @@
/* Housekeeping request */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void HK_HousekeepingCmd(const CFE_MSG_CommandHeader_t *Msg)
void HK_SendHkCmd(const CFE_SB_Buffer_t *BufPtr)

Check notice

Code scanning / CodeQL

Long function without assertion

All functions of more than 10 lines should have at least one assertion.
@github-advanced-security
Copy link

You have successfully added a new CodeQL configuration security. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab.

Isolate the message verification and dispatch from the general message
processing.  Functions in the "cmds" file now strictly handle the
command content, and do not get involved in general validation.

The "Custom" code isolation is also in a separate dispatcher.  There is
a separate issue to address this.
@jphickey
Copy link
Contributor Author

Updated to address format check and documentation

@dzbaker dzbaker merged commit eff974a into nasa:main Mar 30, 2023
@jphickey jphickey deleted the fix-45-dispatch branch March 31, 2023 13:46
@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 this pull request may close these issues.

Apps should check/verify msg BEFORE calling handler
4 participants