Skip to content

Fix #521, command compatibility layer for CF - #523

Open
jphickey wants to merge 1 commit into
nasa:devfrom
jphickey:fix-521-command-compat
Open

jphickey wants to merge 1 commit into
nasa:devfrom
jphickey:fix-521-command-compat

Conversation

@jphickey

Copy link
Copy Markdown
Contributor

name: FSW Code Change
about: Flight Software code changes
labels: fsw

Description of Change

Adds an argument translator for CF commands using the previous definitions.

All commands which had the definition modified as part of #516 are changed to point at a compatibility shim instead of invoking the command directly. New (temporary) command codes are added to invoke the "non-shim" command directly.

This should all be considered deprecated from the start and removed in a future update. This is purely to preserve compatibility with existing scripts.

Linked Issue

Closes #521

Requirements Impact

  • Requirement ID(s):
  • Requirements updated as necessary
  • Existing requirements are still satisfied by this change

Testing Evidence

Unit Tests (UT Assert)

COSMOS Test Suite

Areas of Expertise Touched

  • ASTRO
  • CI/CD
  • COSMOS
  • Cybersecurity
  • Docker
  • EDS
  • Git
  • PSPs
  • SBN
  • SMP
  • Tables
  • TSN
  • Unit Tests
  • Other

Author Checklist

  • Linked GitHub issue is referenced above
  • Code has been formatted with .clang-format
  • Static analysis workflows ran and passed
  • Unit tests (UT Assert) updated/added to cover code changes
  • Unit test workflows ran and passed
  • COSMOS test suite was run; tests updated/added if relevant changes were made
  • Requirements have been reviewed; updated or confirmed still satisfied (see above)
  • Testing evidence is included above
  • Self-review of the diff completed

Reviewer Checklist

  • Code logic is correct and matches the stated intent
  • Code is readable, maintainable, and follows project conventions
  • .clang-format has been applied
  • Static analysis results reviewed and acceptable
  • The change has been exercised by the unit tests (not just that tests pass — the new/changed code paths are actually covered)
  • COSMOS test suite was executed against this change and results reviewed (or confirmed N/A with justification)
  • Reviewer has independently verified the change behaves as described (e.g., by running the tests locally, reviewing CI output in detail, or performing additional ad-hoc testing as warranted)
  • Memory safety reviewed (allocation, bounds, lifetime, stack usage)
  • Requirements impact reviewed and appropriate
  • Error handling is appropriate
  • Appropriate Expert areas have been reviewed

Reviewer Testing Notes

Adds an argument translator for CF commands using the previous
definitions.

All commands which had the definition modified as part of nasa#516 are
changed to point at a compatibility shim instead of invoking the command
directly.  New (temporary) command codes are added to invoke the "non-shim"
command directly.

This should all be considered deprecated from the start and removed in a
future update.  This is purely to preserve compatibility with existing
scripts.

@sylvesterkaczmarek sylvesterkaczmarek left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

254 is the old compound-key sentinel for transaction commands, but CF_Translate_CompatChannel() maps it to all channels and that helper is also used by Freeze, Thaw, TxFile, EnableDequeue, etc. So an invalid channel 254 on those commands becomes a valid all-channels command. The 254 special case should stay in the transaction translator; the generic channel translator should only special-case 255.

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.

Need backward compatibility bridge for CF commands

3 participants