-
Notifications
You must be signed in to change notification settings - Fork 51
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 getters and setters to GPRS, GSM, GSMClient for custom inherited classes #86
base: master
Are you sure you want to change the base?
Conversation
… and create async version of these classes
Co-Authored-By: johncpang <johncpang@users.noreply.github.com>
Co-Authored-By: johncpang <johncpang@users.noreply.github.com>
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.
Update indent
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.
Replace tabs with spaces
Hi @johncpang, I think there was a misunderstanding from my comment in #84 (comment). I'm ok with adding a |
Hi @sandeepmistry I have been carefully on not to expose unnecessary APIs while building an asynchronous variants for Take
Synchronous version will change
There are a few things worth consider:
|
Hi @sandeepmistry, may I know what the status of this pull request now? What shall I change if need to be accepted? Regarding not exposing the internal state machine, I'm on your side too. When I made the changes, I checked all related source codes to make sure (1) the change is minimum, (2) the change is necessary for extended classes to work just like the sync-version. |
Hi @johncpang, Please see my comment above in #86 (comment). If you add only |
Hi @sandeepmistry, I totally agree with you that setting status is dangerous. However, if extended class cannot or does not set the status to ERROR when timed-out, My update was to meant to minimize the changes so that it won't affect your sync-version. Probably would you consider one of the two suggestions I mentioned before? |
I've accepted the CLA and updated my GitHub account's setting. Please check and accept my commit. Thanks. |
The CLA check is now ✔️. Thanks so much @johncpang! |
As mentioned in #84, when we need to create async version of these classes and keep the same logic as the original version, we need to access several internal variables. Therefore, we need getter and setter pairs for them.
I successfully create async version of these three classes (in my own library) with these modified sync version. New getters and setters has absolutely no impact to existing library/existing Arduino project, because they don't modify any existing functions.