medley56 / space_packet_parser

A CCSDS telemetry packet decoding library based on the XTCE packet format description standard.
https://space-packet-parser.readthedocs.io
Other
19 stars 5 forks source link

Pathological case for XTCE definition #4

Closed medley56 closed 1 year ago

medley56 commented 1 year ago

In the event that an XTCE definition allows for parsing only the header, no UnrecognizedPacketErrors are generated. It simply regards the packet as a header without body (48b) and notes that the parsed packet length doesn't match the PACKET_LENGTH in the header.

Investigate why this is happening and document an XTCE definition that prevents this and does raise UnrecognizedPacketErrors if only the header is recognized as part of the packet structure.

medley56 commented 1 year ago

I have determined this is not a pathological case but rather a failure to define the header SequenceContainer as abstract=true. If the top level container is abstract (it should always be abstract) and no valid inheritors are defined (e.g. no APID match), the parser will raise an UnrecognizedPacketError.