-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add spp.create_packet_list function #160
base: main
Are you sure you want to change the base?
Conversation
4380fab
to
85e4b51
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #160 +/- ##
==========================================
+ Coverage 93.43% 93.49% +0.05%
==========================================
Files 37 37
Lines 2605 2627 +22
==========================================
+ Hits 2434 2456 +22
Misses 171 171 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
packet_generator_kwargs : Optional[dict] | ||
Keyword arguments passed to `XtcePacketDefinition.packet_generator()` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to add this option if we are thinking about getting rid of the generator on the definition? I'm wondering if we want to accept a generator instead here, or call this method create_ccsds_packet_list
or something like that?
I'm still torn on how this should all behave and how to make it simple and general at the same time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we accept a custom generator function then I think we want to allow the user to pass kwargs to it. We certainly need it for the ccsds_generator
, right? One option could be to disallow additional kwarg passing and tell the user they have to pass the generator as a functools.partial
with options already set. I'm not sure what is easier for people.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking broader about what it means to be generic to any packet type with XTCE parsing. We probably shouldn't provide a generator like I mentioned, instead the XTCE parsing would yield the packets that it produces during its parsing. This would also mean removing the ccsds_generator from the definition.packet_generator()
routine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linking to #140.
I'm still not understanding how we would decide how many bytes to read from the source before we instantiate a Packet
for parsing without letting users define that logic for themselves. For CCSDS it's obvious but it's not obvious to me how we would do it without a CCSDS header to tell us how many bytes are in the packet. e.g. How many bytes should go in the binary_data
attribute of a new Packet
object?
55d0152
to
d0a1873
Compare
Checklist