space_packet_parser
space_packet_parser copied to clipboard
Avoid reading the header twice during packet parsing
I was actually wondering about this check and whether we could avoid reading the first 7 items in the container definition and rely on the CCSDS header being correct. That way we could start the Packet class right away when we are doing the header above and then continue on here. Currently we are parsing the header twice essentially.
Could we check this condition in the definition itself somehow so that when someone is creating the definition from the XTCE we would raise immediately before parsing even began?
Originally posted by @greglucas in https://github.com/medley56/space_packet_parser/pull/79#discussion_r1776293877
https://github.com/medley56/space_packet_parser/pull/79#discussion_r1778803200