Add getters and setters to GPRS, GSM, GSMClient for custom inherited classes#86
Add getters and setters to GPRS, GSM, GSMClient for custom inherited classes#86johncpang wants to merge 4 commits intoarduino-libraries:masterfrom
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>
|
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.