space_packet_parser icon indicating copy to clipboard operation
space_packet_parser copied to clipboard

Generic packet

Open greglucas opened this issue 9 months ago • 4 comments

This is an attempt to refactor our xtce parsing to be more generic and allow any RawDataObject, not just ccsds packets.

  • RawPacketData has the read_* methods, RawCCSDSPacketData subclasses that and adds on cached properties to access specific header items.
  • Moved the ccsds continuation packet logic into the ccsds_generator to try and keep all ccsds logic in one place.

Thoughts/suggestions on how to make this better for other packet types are welcome!

  • I was thinking it might be nice if a user could pass in raw bytes directly to definition.parse_packet(bytes) and not our wrapped classes that add the reading methods. Perhaps we could wrap the input bytes into our own container class within the function itself which would remove some of the user-facing need to create a RawPacketData-like object with read_* methods on it.

closes #130

Checklist

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

greglucas avatar Feb 13 '25 04:02 greglucas