nasa / SC

The Core Flight System (cFS) Stored Commands (SC) application.
Apache License 2.0
38 stars 20 forks source link

Fix #108, dispatch pattern for SC #111

Closed jphickey closed 1 year ago

jphickey commented 1 year ago

Checklist (Please check before submitting)

Describe the contribution Move switch statements to a separate dispatch source file, and update all unit tests accordingly.

All business logic of commands is put into separate command handler functions in sc_cmds.c. No logic is inside the switch statement, outside of message validation.

Fixes #108

Testing performed Build and run SC and all tests

Expected behavior changes No external/observable behavior change

System(s) tested on Debian

Additional context Intent is to improve code consistency, ease future maintenance, and to match patterns used elsewhere.

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

jphickey commented 1 year ago

Workflow failure currently reported in this PR should be fixed by my other pending PRs. Once reviewed and merged I this can be rebased.

jphickey commented 1 year ago

Everything rebased and tests/workflows are passing.