Closed ddasilva closed 1 year ago
Closes #24
I worry about your first assumption. It feels like common practice to put a checksum at the end of a packet or some other "footer" data.
That’s fine, I just didn’t know. I’ll update the PR
I worry about your first assumption. It feels like common practice to put a checksum at the end of a packet or some other "footer" data.
@ehsteve I updated the pull request with this constraint removed, and the docs here have been updated https://danieldasilva.org/var_length/ccsdspy.html
Wow! Amazing! I'll have a closer look in the new year. Happy new year!
Base: 95.72% // Head: 95.89% // Increases project coverage by +0.16%
:tada:
Coverage data is based on head (
0d5fc09
) compared to base (31b2557
). Patch coverage: 95.39% of modified lines in pull request are covered.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
This should work great with PUNCH image packets I think. We have just one expanding data field which is (at the moment) always at the end.
Thanks @jmbhughes !
This pull request implements variable length packets, via a custom decoder and interface through the
VariableLength
class. For convenience, I put a build of the API docs at this URL so reviewers can read: https://danieldasilva.org/var_length/ccsdspy.htmlThis merge request makes the following assumptions, which I think should meet the majority of use cases that occur in practice. I'm curious about what @ehsteve thinks about these assumptions based the data they're using. It assumes:
and it always comes at the endWhen you decode a variable length field, you get back an array of
dtype=object
, where each element is a reference to another array of the specified type (with different lengths each time). One thing to note is that this variable length decoder is slightly (but not impractically) slower than theFixedLength
decoder, so we want to continue to supportFixedLength
.Since the front page is kind of long, and the rules for this class are worth spelling out, I'm going to add a new page on the sidebar for this (and then link to it inline with the Fixed Length discussion). But for now I want to focus on making sure the decoder is right.