Closed ddasilva closed 1 year ago
Patch coverage: 97.80
% and project coverage change: +0.10
:tada:
Comparison is base (
e15f2bf
) 94.82% compared to head (4cb0354
) 94.92%.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
@ehsteve Let me know what you think of this at a high level. There's a lot of dense code added, no pressure to review it
Closes #58
Build of Updated documentation (hidden from public): https://ccsdspy.readthedocs.io/en/var-length-prev-field/user-guide/variablelength.html
Hey @ddasilva maybe I'm not understanding something but given that the packet length is already in the ccsds header, isn't it always possible to work out the length of a variable field with this new functionality. Seems to me like any data length field is redundant unless you are relaxing the requirement on having only one expanding field.
That is correct, you have multiple variable length fields per packet.
And there is a unit test that does just this!
I updated the user guide to show the example having two reference-based variable fields, and added a statement to the user guide about how there is not a limit to the number of these reference-based variable fields, but there is for expanding fields.
https://ccsdspy.readthedocs.io/en/var-length-prev-field/user-guide/variablelength.html
@ehsteve I merged this because several weeks went by and I assumed you didn't have any comments on this. If you have comments, let me know and we can go back to discuss
This change updates the
VariableLength
class to support variable length fields where the length is determined by another field in the packet. For example, you could have fieldsdata1_len
which sets the length of thedata
array, and thendata2_len
which follows it and sets the length of thedata2
array. I have been told that some instruments generate these types of packets, which were currently unsupported by thearray_shape="expand"
method.I added a new test for this and all the previous tests pass. I updated the user's guide for variable length packets and added to the changelog.