-
Notifications
You must be signed in to change notification settings - Fork 13
Copilot/add yamcs opcode recognition #376
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
Open
Mikefly123
wants to merge
17
commits into
main
Choose a base branch
from
copilot/add-yamcs-opcode-recognition
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
5c3f237
Incremental Progress
Mikefly123 4e69dcf
Add YAMCS integration (Option B auth bridge)
Mikefly123 27ad83a
patches: add fprime-yamcs-noapp-path.patch and wire into fprime-venv
Mikefly123 584c8f3
Fix fprime-yamcs-events missing dict arg and short TM frame reads
Mikefly123 f92c02e
Fix YAMCS adapter steady-state misalignment and process cleanup
Mikefly123 f072133
Fix YAMCS packet preprocessor so Space Packets appear in Packets tab
Mikefly123 7a33070
Fix YAMCS parameter extraction by specifying tm_realtime rootContainer
Mikefly123 cc7f2bc
Fix YAMCS→FSW command path: correct TC framing and CCSDS header fields
Mikefly123 8327fe7
Fix TM frame loss caused by FSW console text on shared UART
Mikefly123 c449582
Updated README With YAMCS Instructions
Mikefly123 fa24059
Apply suggestions from code review
Mikefly123 d5079a2
feat: add OpCode acknowledgement bridge for YAMCS command verification
Copilot 7b54bf9
refactor: address code review feedback on opcode-ack bridge
Copilot 935466e
Merge remote-tracking branch 'origin/main' into copilot/add-yamcs-opc…
Copilot 10ac413
Fixed ACK Bridge
Mikefly123 ae1f251
fix opcode ack bridge: correct key lookup, XTCE name parsing, and add…
Mikefly123 5a90544
Merge branch 'main' into copilot/add-yamcs-opcode-recognition
Mikefly123 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| """Patch FPrimeEventProcessor to include event args in the send_event extra field. | ||
|
|
||
| The extra field is a free-form str→str mapping that YAMCS stores alongside each | ||
| event. By including event arguments there, the opcode_ack_bridge can recover the | ||
| opcode value from OpCodeCompleted events without needing to re-decode the raw | ||
| CCSDS packet or parse the human-readable message string. | ||
| """ | ||
|
|
||
| import sys | ||
|
|
||
| if len(sys.argv) != 2: | ||
| print( | ||
| f"Usage: {sys.argv[0]} <path-to-processor.py>", | ||
| file=sys.stderr, | ||
| ) | ||
| sys.exit(1) | ||
|
|
||
| path = sys.argv[1] | ||
| with open(path) as f: | ||
| content = f.read() | ||
|
|
||
| SENTINEL = "extra=event_args if event_args else None," | ||
|
|
||
| if SENTINEL in content: | ||
| print("⚠ fprime-yamcs-events opcode-ack fix already applied") | ||
| sys.exit(0) | ||
|
|
||
| OLD = ( | ||
| " self.yamcs_client.send_event(\n" | ||
| " instance=self.yamcs_instance,\n" | ||
| " source='FPrimeEventProcessor',\n" | ||
| " event_type=event_name,\n" | ||
| " severity=yamcs_severity,\n" | ||
| " message=message,\n" | ||
| " )\n" | ||
| ) | ||
| NEW = ( | ||
| " self.yamcs_client.send_event(\n" | ||
| " instance=self.yamcs_instance,\n" | ||
| " source='FPrimeEventProcessor',\n" | ||
| " event_type=event_name,\n" | ||
| " severity=yamcs_severity,\n" | ||
| " message=message,\n" | ||
| " extra=event_args if event_args else None,\n" | ||
| " )\n" | ||
| ) | ||
|
|
||
| fixed = content.replace(OLD, NEW) | ||
|
|
||
| if fixed == content: | ||
| print( | ||
| "❌ Error: pattern not found in events processor — fix may not apply or upstream changed" | ||
| ) | ||
| sys.exit(1) | ||
|
|
||
| with open(path, "w") as f: | ||
| f.write(fixed) | ||
| print("✓ Applied fprime-yamcs-events opcode-ack fix") |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's fork instead. Thoughts?