Skip to content

Fix #181, remove unused command type declarations - #183

Closed
sylvesterkaczmarek wants to merge 1 commit into
nasa:devfrom
sylvesterkaczmarek:fix-181-unused-command-types
Closed

sylvesterkaczmarek wants to merge 1 commit into
nasa:devfrom
sylvesterkaczmarek:fix-181-unused-command-types

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Checklist

  • Reviewed the SC and top-level cFS contributing guides.
  • Contributor License Agreement completion has not been verified for this submission.

Contribution

Fixes #181.

Remove the unreferenced SC_Process_Enum_t alias and the duplicate, unused SC_SetContinueAtsOnFailureCmd_t command structure. Repository-wide exact-name searches found both only at their declarations before the change and no remaining references afterward.

Retain every SC_Process_* enumerator and compatibility macro, the payload definition SC_SetContinueAtsOnFailureCmd_Payload_t, and the actively used SC_ContinueAtsOnFailureCmd_t. Command dispatch, message validation, scheduling logic, and active command/telemetry layouts are unchanged. This is independent of the event-definition cleanup in #180.

Compatibility

External source using SC_Process_Enum_t must use its underlying uint8 type. External source using the duplicate command structure should use the existing SC_ContinueAtsOnFailureCmd_t, which has the same fields and is the type used by dispatch. No use of the removed names exists in this repository; downstream repositories were not audited.

Testing performed

Built the SC application module and all eight SC unit-test executables on unchanged dev, then rebuilt and reran them with the patch. All eight passed on both revisions. The SBN core application's four test executables in the same test mission also passed on both runs: 12/12 total.

cmake -S cfe -B build-rotationj -DMISSIONCONFIG=rotationj \
  -DSIMULATION=native -DENABLE_UNIT_TESTS=ON
cmake --build build-rotationj --parallel 4
cmake --build build-rotationj/native/default --parallel 4 --target sc \
  coverage-sc-sc_rtsrq-testrunner coverage-sc-sc_utils-testrunner \
  coverage-sc-sc_app-testrunner coverage-sc-sc_atsrq-testrunner \
  coverage-sc-sc_state-testrunner coverage-sc-sc_loads-testrunner \
  coverage-sc-sc_cmds-testrunner coverage-sc-sc_dispatch-testrunner
ctest --test-dir build-rotationj/native/default --output-on-failure \
  --no-tests=error -R '^coverage-sc-'

git diff --check passed. The enum assignments are unchanged. This declaration-only cleanup adds no new executable behavior; the existing compiled tests provide the regression coverage.

SC baseline: 1161ad6201d7054d52701c0f85b4bb4f48366307.

System tested

Debian 12 ARM64 in Docker on an Apple Silicon Mac, GCC 12.2.0 and CMake 3.31.6. An isolated cFS test mission enables SC and the SBN core application with unit tests and non-EDS interfaces. Its configuration and all build outputs remain outside these PRs.

  • cFE: 5dd74afa85e5ed5e8c1ed4129281d21611f8d699
  • OSAL: 5befd8e9f6c62b44bb7ff4c15db8629c0e00efa0
  • PSP: 36c24cb953b047ab5525240579aeb06adf5ac11f

The complete cFS runtime, flight hardware, EDS configuration, table-file generation, and live SBN transports were not exercised. The original static-analysis tool was not run; this is not a claim of full MISRA compliance. No third-party code, dependency, or workflow changes.

Contributor

Sylvester Kaczmarek, Personal.

@sylvesterkaczmarek

Copy link
Copy Markdown
Author

Any feedback on this Stored Command cleanup? Let me know what needs changing before review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SC Unused type declarations

1 participant