Skip to content

Allow optional secondary header fields based on secondary header flag #65

@ddasilva

Description

@ddasilva

This tends to not happen very often in practice, but it's part of the spec and we should support it. PacketField's should have a keyword argument secondary_header=True (defaults False). When this keyword argument is true, they are only included parsed into the packet body when the secondary header flag is 1.

The array in the return dictionary should be made a MaskedArray in this case. It only makes sense to do this for VariableLength, because the FixedLength decoder relies on fixed spacing between the packets.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions