Skip to content

CCSDS AOS Deframer#4779

Open
Willmac16 wants to merge 100 commits intonasa:develfrom
Willmac16:aos-deframer
Open

CCSDS AOS Deframer#4779
Willmac16 wants to merge 100 commits intonasa:develfrom
Willmac16:aos-deframer

Conversation

@Willmac16
Copy link
Contributor

@Willmac16 Willmac16 commented Feb 27, 2026

Related Issue(s)
Has Unit Tests (y/n) y
Documentation Included (y/n) n
Generative AI was used in this contribution (y/n) y

Change Description

Add a CCSDS AOS SDL version 5 defamer that supports:

  • Space Packet Protocol
  • Encapsulation Packet Protocol
  • FECF on or off
  • 1 virtual channel--all the internal code should be ready for multiple just needs agreement on config & output port setup (i.e. vc per port array index)

Rationale

You need an AOS Deframer to rx AOS Frames from payloads/other craft.
AOS lets you do fixed frame width w/ variable packet size (including packets that span multiple frames)

Testing/Review Recommendations

Take a look at the processing I'm doing on SPP & EPP packets and what I'm emitting in the context for them. I could imagine a later rev of this component sharing w/ SPP defamer more logic/doing its job for it.

Other facet on the SPP & EPP processing is how light my validation is. I'm only checking that they contain the right PVN & grabbing size + idle. If we moved the full SPP parsing into this/called into a lib then you could maybe avoid throwing away packets by ID-ing a problem earlier (although dropping a frame upon packet issues is probably the only safe thing to do).

A double check on my read of the EPP spec would be beneficial since I caught a few bugs that lingered all the way into testing.

Future Work

I am likely done w/ AOS for near term; however, future work could be:

  • Porting downlink stack to AOS
  • Using AOS Framer to bootstrap USLP
  • Making a proper EPP Framer & Deframer
  • Consolidating logic into a lib btw AOS, SPP, & EPP deframers
  • Writing an AOS Frame Detector if using AOS over a byte stream like tcp vs a datagram protocol like UDP

AI Usage (see policy)

  • Claude Code for Web did the first pass
  • The Claude Code GitHub extension addressed feedback on 3-4 commits
  • Over the past couple days, while I worked in VSCode I would use ChatGPT Codex & Claude Code CLI for minor code movement/event creation and test tweaks. I've reviewed (and quite often heavily refactored) all of the flight code to match my stylistic and structural preferences

Overall, I'm not convinced the first 2 steps really provided that much of a speedup since much of the EPP structure was completely wrong, and the approach to spanning packets had significant code duplication. Maybe a minor psychological speedup simply because I had code to review to bootstrap rather than a blank slate.

The minor test writing & event creation usage felt like a speedup, but better editor skills/snippets might be able to handily beat that.

binaryfile
BINDIR
bitfield
Bitfield

Check warning

Code scanning / check-spelling

Ignored Expect Variant

[Bitfield](#security-tab) is ignored by check spelling because another more general variant is also in expect. \(ignored-expect-variant\)
endmacro
endraw
enduml
EPP

Check warning

Code scanning / check-spelling

Ignored Expect Variant

[EPP](#security-tab) is ignored by check spelling because another more general variant is also in expect. \(ignored-expect-variant\)
@Willmac16 Willmac16 changed the title Aos deframer CCSDS AOS Deframer Feb 27, 2026
@Willmac16
Copy link
Contributor Author

This PR should look less scary once #4630 merges

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@Willmac16 Willmac16 marked this pull request as ready for review March 2, 2026 20:09
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.

2 participants