Comments (7)
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.
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.
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.
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.
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.
ok
from libsml.
Note sure about scope of this discussion. +1 for renaming to sml_parser or parsesml.
from libsml.
Related Issues (20)
- Unsigned current Power Value HOT 9
- timeout HOT 6
- libsml crc enhancements ? HOT 10
- DZG workaround not necessary anymore HOT 20
- Add support for efr SGM-C4 meter
- sml_server does not decode testfile from eBZ DD3 2R06 HOT 2
- SML-Errors with Holley DTZ541 HOT 2
- hexdump() compatibility issue with newest Arduino / ESP8266 libraries HOT 8
- libsml debian package still points to dailab repo HOT 3
- Cannot Build on Raspberry Debian 11 with gcc version 10.2.1 HOT 2
- sml_server does not decode data from device DZMeteringGmbH_WS_7412.1 (negative values) HOT 15
- sml_server not part of libsml1 debian package HOT 7
- Odd readings from DWSB20.2TH: Display shows power -195W, vzlogger reports 460W HOT 15
- List of projects using libsml HOT 3
- How to use libsml in ESPhome? HOT 3
- deprecate / replace `sml_transport` API
- support arduino?
- DZG - libsml: error: unrecognized sequence HOT 8
- More Examples HOT 6
- Compile Error on Alpine: no member named '__jmpbuf' HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libsml.