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 #114, clean up dispatch logic #115

Merged
merged 1 commit into from
Jan 4, 2024
Merged

Conversation

jphickey
Copy link
Contributor

Checklist (Please check before submitting)

Describe the contribution
Next step in adherence to established patterns for headers and dispatch code.

  • Define MsgIDs for HS based on TopicIDs
  • Define Command Handlers based on pattern (CFE_Status_t return, command structure type input)
  • Define EDS dispatcher (only used in EDS builds)

Fixes #114

Testing performed
Build and run

Expected behavior changes
None

System(s) tested on
Debian

Additional context
Dispatch logic now has topicID-based definitions and fully supports EDS definitions via the eds_dispatch code.

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

@@ -46,7 +46,7 @@
/* Housekeeping request */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void HS_SendHkCmd(const CFE_SB_Buffer_t *BufPtr)
CFE_Status_t HS_SendHkCmd(const HS_SendHkCmd_t *BufPtr)

Check notice

Code scanning / CodeQL

Function too long Note

HS_SendHkCmd has too many lines (141, while 60 are allowed).
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* Disable event monitor command */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void HS_DisableEventMonCmd(const CFE_SB_Buffer_t *BufPtr)
CFE_Status_t HS_DisableEventMonCmd(const HS_DisableEventMonCmd_t *BufPtr)

Check notice

Code scanning / CodeQL

Long function without assertion Note

All functions of more than 10 lines should have at least one assertion.
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* Enable events monitor command */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void HS_EnableEventMonCmd(const CFE_SB_Buffer_t *BufPtr)
CFE_Status_t HS_EnableEventMonCmd(const HS_EnableEventMonCmd_t *BufPtr)

Check notice

Code scanning / CodeQL

Long function without assertion Note

All functions of more than 10 lines should have at least one assertion.
@@ -46,7 +46,7 @@
/* Housekeeping request */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void HS_SendHkCmd(const CFE_SB_Buffer_t *BufPtr)
CFE_Status_t HS_SendHkCmd(const HS_SendHkCmd_t *BufPtr)

Check notice

Code scanning / CodeQL

Long function without assertion Note

All functions of more than 10 lines should have at least one assertion.
Next step in adherence to established patterns for headers
and dispatch code.

- Define MsgIDs for HS based on TopicIDs
- Define Command Handlers based on pattern (CFE_Status_t return, command structure type input)
- Define EDS dispatcher
@dzbaker dzbaker merged commit 312aa74 into nasa:main Jan 4, 2024
17 checks passed
@jphickey jphickey deleted the fix-114-topicids branch January 17, 2024 18:29
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.

Define and use Topic IDs instead of fixed Msg IDs
2 participants