Skip to content
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

Add continuation packet support #115

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

greglucas
Copy link
Collaborator

This builds on the packet refactor work (the final commit of this PR is relevant to continuation packets) and adds continuation packet support to the XTCE parsing and packet generation. This adds logic to concatenate packet data fields together across successive packets (if there was too much data to fit in a single CCSDS packet or it was logically better to split by other teams).

  • Add warnings if packets are out of sequence within a given apid.
  • Add ability to remove secondary header bytes from subsequent packets.
    definition.packet_generator(data, combine_segmented_packets=True, secondary_header_bytes=4)

Notes:

  • This is only in the XTCE packet parsing definition generator for now, so thoughts on doing this up a level are welcome. I chose not to to keep it as "raw" as possible at that stage, but could see an argument either way.
  • I've chosen to keep old behavior with combine_segmented_packets=False, so this is opt-in behavior. I'm not sure if that is what we should do or if we should start combining them right away and have it be opt-out instead?

closes #114

Checklist

  • Changes are fully implemented without dangling issues or TODO items
  • Deprecated/superseded code is removed or marked with deprecation warning
  • Current dependencies have been properly specified and old dependencies removed
  • New code/functionality has accompanying tests and any old tests have been updated to match any new assumptions
  • The changelog.md has been updated

- Add header properties to the RawPacketData class that can be used
  to look up the values directly from the bytes object.
- Add a create_ccsds_packet function that takes in integers for
  the header items and packs them for users. Especially useful for
  creating test data packets.
…arsing

Create a separate CCSDS packet generator that is dedicated to handling the input
data and yielding individual packets. The parsing functions then utilize
this generator to handle the actual data parsing.
These are unused now that the packet itself can be used to get
the previously parsed values.
@greglucas greglucas requested a review from medley56 as a code owner December 15, 2024 15:09
When combining continuation packets the first packet's header
(and potentially secondary_header) are kept and only the data field
of subsequent packets are concatenated onto the first.
packet1header, packet1secondary, packet1data, packet2data, packet3data, ...
@greglucas greglucas force-pushed the continuation-packets branch from f404a40 to 6212a8d Compare December 15, 2024 15:13
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.

Add support for continuation packets
1 participant