Skip to content
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

Closed
loudnate opened this issue Aug 15, 2015 · 4 comments
Closed

Packet decoding will need to account for pump model #20

loudnate opened this issue Aug 15, 2015 · 4 comments

Comments

@loudnate
Copy link
Contributor

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?

@ps2
Copy link
Owner

ps2 commented Aug 17, 2015

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.

@ps2
Copy link
Owner

ps2 commented Aug 17, 2015

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

@ps2
Copy link
Owner

ps2 commented Aug 17, 2015

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.

@ps2
Copy link
Owner

ps2 commented Aug 18, 2015

This issue was moved to ps2/rileylink_ios#1

@ps2 ps2 closed this as completed Aug 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants