Giter Site home page Giter Site logo

Comments (7)

r00t- avatar r00t- commented on September 24, 2024

you could make it a server by running it in inetd ;)

also, the feature to read from a serial port seems useful, but conflicts slightly with the "parsesml" name?

from libsml.

devZer0 avatar devZer0 commented on September 24, 2024

to be honest, do we need to handle/init the serial port stuff in sml_server at all? to do it right, we need to rework all the initialization stuff for proper init, i.e. need more cmdline opts. can't we do that much better with the appropriate and specialized cmdline util? i wonder if we can't drop opening files from sml_server and use stty/setserial instead and then do : sml_server </dev/$SERIAL or cat /dev/$SERIAL | sml_server

no name conflict with parsesml then, too. the tool simply does one thing: parsing sml and translating that into readable content.

from libsml.

hmueller01 avatar hmueller01 commented on September 24, 2024

For me it is the "server", as it runs permanent in background and reads the data from the meter. So it "serves" the data ...

Init the serial device is important as default values could be different and your solution would not work that way.

from libsml.

devZer0 avatar devZer0 commented on September 24, 2024

yes it IS important, but what do you mean with "default values could be different" ? is there anything in the init stuff which can't be done with stty? see https://linux.die.net/man/1/stty

from libsml.

hmueller01 avatar hmueller01 commented on September 24, 2024

No, do not think there is anything. Can be done by stty. If we rename it to parser we have to remove this stuff from the code and need to use stty. This is also only an example, how one could implement something with this lib. So it could also be renamed to sml_example.c ...
If we some day implement your output formatting proposals of #26 we we could start new and call this parsesml, parse_sml or sml_parse and remove in this new code the tty stuff. Maybe you should rename your issue like this and add the proposals as you closed #26. But I like to stay with an example including tty init.

from libsml.

devZer0 avatar devZer0 commented on September 24, 2024

ok

from libsml.

andig avatar andig commented on September 24, 2024

Note sure about scope of this discussion. +1 for renaming to sml_parser or parsesml.

from libsml.

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.