-
Notifications
You must be signed in to change notification settings - Fork 122
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
Packet decoding will need to account for pump model #20
Comments
That makes sense; I have that separation (packet encoding vs message semantics) in the https://github.com/ps2/minimed_rf library as well, and I'd like to keep them roughly in sync. |
One thing I'd like to do differently than minimed_rf, is to have the message classes be aware of the first 5 bytes. I plan to update minimed_rf message classes to be the same way |
When separate message types have a common field type that is parsed in varying ways determined by pump model, then it makes sense for that decoding to be shared, and configurable by pump model. I would think that there is still a single message type that can handle the various pumps. But I might not be understanding what's common and what varies completely. We'd need to discuss specifics, I think, to get the best layout. For now, I agree 100% on separating message semantics from the 4b6b encoding, crc calculation, and other rf packet details. |
This issue was moved to ps2/rileylink_ios#1 |
There are a lot of folks now with hardware that plan to talk to X22 pumps, which have about a dozen encoding differences across major packets. The most common one is when decoding insulin amounts, since the X22 and X23+ have different stroke sizes. However, there are other cases where bytes are in different offsets.
One approach that should work would be to create a family of PumpModel classes with an index by model string, and a family of Message classes to handle the decoding. MinimedPacket should continue to be agnostic to the intricacies of the message data and focus on RF encoding/decoding and validation.
Thoughts?
The text was updated successfully, but these errors were encountered: