On 8/12/07, Paul Alfille <[EMAIL PROTECTED]> wrote: > I presume that when you try one of the other programs (owread, for example) > you get the data you expect? > I.e. the question is about the ruby code, not the sensor?
I'm not sure. owread outputs the right thing but so does my ruby code if I do a puts to a terminal since printf ignores those characters. I'll have to strace owread. > http://www.owfs.org/index.php?page=owserver-protocol > --rather extensive protocol information. > If you are familiar with other languages, there are implementations of > owserver protocol clients > in perl, C, php, python, visual basic, java, pascal, ... All relatively > small pieces of code. I've based the ruby on on the python code which seems to be based on the C code since it had some loops that look the same as the ones in the C version but don't actually do anything in the python one. > > there's an offset there but it doesn't seem to be used anywhere. > > That's for reading "large" memory blocks in parts. Ignore it (set it to zero > and ignore result) > Actually offset is used for some directory flags on return (whether any > devices support alarms, simultaneous, etc) Interesting. The documentation doesn't cover these, does it? > > Looking at the owserver code it seems way too complicated for > > something that only does read/write/dir. Are there any plans to > > replace it? > > Well, owserver includes includes support for multiple threads, persistent > connections, > loop suppression (so you don't have owserver sending messages to itself in > an infinite loop) > owserver also links in the owlib library which has all the functionality: > support for ~10 adapters, ~50 1-wore devices, caching, autodiscovery, etc. When would owserver need loop suppression? I understand that owlib has the functionality that's why owserver seems complicated for something that only has to answer three commands. > For debugging your ruby code, take a look at owtap. It's a stand-alone tcl > program (just > chmod +x owtap.tcl > ./owtap.tcl -s 4304 -p 4000 > and insteady of binding your ruby code to owserver at 4304, you bind to 4000 > (just example port numbers). > > owtap will show each transaction and you can click on the transaction to see > details. > > owtap is a work in progress, but getting more mature. Download the CVS > version regularly. Seems interesting. Thanks, Pedro. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Owfs-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/owfs-developers
