GithubHelp home page GithubHelp logo

Comments (14)

Apollon77 avatar Apollon77 commented on August 23, 2024 1

I would completely second that. I think especially all command that only give one line as standard response could call "execute" with a parameter so that the first response line after the command is given directly to the caller as result and so these methods could parse this by themself.

Also all normal commands are "AT+Command" and the Response starts with "Command" so this also can be auto detected. This should reduce lot of complexity.

Then only a solution wuld be needed for "unknownnumer of lines" as response ... does this exist?

from serialport-gsm.

Apollon77 avatar Apollon77 commented on August 23, 2024 1

I have no idea how far you are with your refactoring plans and if someone is actively working on, I could also offer my help - but we shoukd sync that not multiple persons work on the same topic

from serialport-gsm.

karianpour avatar karianpour commented on August 23, 2024 1

Hi @Apollon77,

I almost finished the refactor.
At the step, backward compatibility and extendablity was the goal. I change the code the way that I was sure that no break would happen.
The way that you suggest sounds nice, which can be the next step. If you take a look at the code, now you can inject the logic as you suggest with no major code change. Just add a execute function which works as you say.
Just executeCommand and get the item , then add the processig logic function to the item.
You can also add a listener for processing further actions like ussd support.

from serialport-gsm.

Apollon77 avatar Apollon77 commented on August 23, 2024 1

Ok, then I take the current GitHub code and do some stuff

from serialport-gsm.

Apollon77 avatar Apollon77 commented on August 23, 2024 1

Ahhh ok now I see your changes ... I was iterating on the "npm" code so far ;-)
This looks much better. Me personally would have it done differently, but don't matter, it works well that way. So I maybe foxus more on feature stuff. But I will gibe it a try today.

This is a huge improvement!!

from serialport-gsm.

zabsalahid avatar zabsalahid commented on August 23, 2024

@karianpour I think so, lots of my codes haven't been arranged well yet. Man, you're very helpful on this project, thank you so much.

from serialport-gsm.

karianpour avatar karianpour commented on August 23, 2024

@zabsalahid I prepared a sample refactoring, can you please check the draft pull request.

from serialport-gsm.

zabsalahid avatar zabsalahid commented on August 23, 2024

Hey @Apollon77 !

I would appreciate any help. At the meantime, only @karianpour is working on the project.

from serialport-gsm.

Apollon77 avatar Apollon77 commented on August 23, 2024

@karianpour do you do anything?! Else I would prepare a PR for discussion on the weekend ...

from serialport-gsm.

Apollon77 avatar Apollon77 commented on August 23, 2024

One question: Is it intended that nearly all comparisms only use "==" instead of "==="? The latter would be more type safe and such ... what are your thoughts on this? (maybe start own issue to discuss such general code style things?)

from serialport-gsm.

zabsalahid avatar zabsalahid commented on August 23, 2024

One question: Is it intended that nearly all comparisms only use "==" instead of "==="? The latter would be more type safe and such ... what are your thoughts on this? (maybe start own issue to discuss such general code style things?)

I agree, coding conventions and guidelines ☕️.

from serialport-gsm.

Apollon77 avatar Apollon77 commented on August 23, 2024

Ok, moved to : #21

from serialport-gsm.

karianpour avatar karianpour commented on August 23, 2024

@zabsalahid I guess that we can close this issue.

from serialport-gsm.

Apollon77 avatar Apollon77 commented on August 23, 2024

I will bring in some fixed with my PR today.

from serialport-gsm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.