Comments (5)
That branch is already in when I see it correctly https://github.com/rscada/libmbus/blob/master/mbus/mbus-serial.c#L119
from libmbus.
Oh sorry, I mean branch "adjustable-timeout".
https://github.com/rscada/libmbus/blob/adjustable-timeout/mbus/mbus-serial.c
from libmbus.
I honestly would question the approach of the branch ... thet offset thing noone will really understand (whats the timeout value now in the end if I set tit to X?). I think it is better to just allow to overwrite timeout (unless it is smaller value as the default) ... but there is also no PR for that branch so :-(
@lategoodbye do you remember the purpose of that branch from your perspective?
from libmbus.
@Apollon77 Unfortunately i don't remember exactly why i created the 'adjustable-timeout' branch, but it's might be related to #121 . M-Bus is a pretty old protocol (Byte oriented, timing critical) which doesn't work well with current hardware (USB) and software (non RTOS). The original idea was to let libmbus calculate the serial timeout by itself. But nowaways pure serial interfaces on PCs has been become rare and it's hard to predict the timeout by all these adapters and other layers.
So i wanted to give the user the chance to adjust the timeout. Since the timeout still depends on the baudrate, i tought it would be the best to add an offset which represent the expected delay. So the user doesn't have to calculate the timeout on it's own. Sure this branch is poorly documented and the unit of 1/10 secs is little bit atypical. Please keep in mind, that setting the timeout to high would make a serial scan very lenghty. At the end i'm open for better ideas.
from libmbus.
I understand the idea now better. In fact it is a valid approach.
Both ways are having strange issues ... like yours that do not allow to really "know" what its the final timeout" but also mine idea to say "we calculate a minimum timeout but it can be increased" which would ignore "too short user provided timeout values by just ignoring them. That was my idea: allow to specify a value but still calculate the "default" one and use the higher one in fact :-)
Both ways work. Now that there is a real user usecase needing higher ones would be good to do one :-)
from libmbus.
Related Issues (20)
- Show VIFE-Code in query
- ./build.sh Failure HOT 1
- m.bus Adapter - Current Unrecognized VIF extension: 0x3a - Stromzähler B+G Tech SDM 630 V2 HOT 4
- Mbus clarification HOT 3
- Finding EMU meters via mbus-tcp-scan-secondary
- Value resolution
- Negative values start with F HOT 4
- rs485 to usb converter and libmbus?
- Documentation not accesible HOT 2
- Decoding frame data
- Add manufactorer specific VIFE infos in (XML) response
- Feature Request: Eastron-SDM-Serie: instantaneous electrical information HOT 5
- Sending different init frames to a slave... HOT 2
- I'm trying to get data from mbus tc, it doesn't find any results when I scan
- Received invalid M-Bus response frame HOT 1
- IPv6 does not work HOT 4
- Pollucom E- reduced / unexpected answer?
- IME Electrical meter support HOT 2
- libmbus problem in python-script HOT 2
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 libmbus.