On 8/11/07, Pedro Côrte-Real <[EMAIL PROTECTED]> wrote:
>
> I'm trying to read the presure from a sensor using owserver. I'm
> reading this from:
>
> /12.CC8834000000/TAI8570/pressure
>
> And I get something like:
>
> " 994.431"
>
> when it's reading from the cache. But when I use uncached or the
> server actually reads from the device I get:
>
>
> "\000\000\000\000\000\000\000\f\000\000\000\f\000\000\001\002\000\000\000\f\000\000\000\000
> 994.416"
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 using the Ruby binding I wrote. It could be something wrong there.
> Is there a specification for the owserver protocol somewhere? I see
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.
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)
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.
Thanks,
>
> Pedro.
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.
Paul Alfille
-------------------------------------------------------------------------
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