On 8/11/2011 16:27, Pascal Baerten wrote:
See below my results with a comparable configuration (even slower CPU)
You see that getting temperature9 is taking 217ms average via owfs and
238ms via owread.
Pascal,
I am following along here as these issues are close to what I am working on.
I tried your test code on my system. It's slightly slower. Probably CPU.
# time for i in {1..10}; do /usr/bin/owread -s localhost:4304
/uncached/1F.5A1D02000000/main/28.AD4900020000/fasttemp; done
26.5 26.5 26.5 26.5 26.5
26.5 26.5 26.5 26.5 26.5
real 0m3.526s
user 0m0.110s
sys 0m0.190s
Note I used fasttemp which is the readonly equivalent of temperature9.
Using your little test script helped me understand the behaviour of
uncached. I can confirm here that a conversion is issued for the
specific resolution for a given register. For example when I read
temperature12, the conversions take about 1 second for each:
# time for i in {1..10}; do /usr/bin/owread -s localhost:4304
/uncached/1F.5A1D02000000/main/28.AD4900020000/temperature12; done
26.8125 26.8125 26.8125 26.8125 26.875
26.8125 26.875 26.8125 26.875 26.875
real 0m9.223s
user 0m0.110s
sys 0m0.180s
OWFS does NOT trigger periodical conversion, it only initiate a new
conversion when a temperature attribute is accessed and if the cached
value is outdated. Reading the uncached temperature always force a new
conversion regardless of cached data timestamp.
Thank you for this clarification.
However, even if you reach the same timing, you may exceed your 250ms
requirement if you read successively the four devices.
To solve this, the next step is to explicitly force a simultaneous
conversion on the four _powered _devices and simply read the _cached_
temperatures.
The problem here is, I think, that the simultaneous conversion will
issue a full 12 bit conversion, right?
I can't speak for Pascal's needs, but it seems that he might need a new
conversion on each read. My guess is it does him no good to read from
cache - and get the same data.
My needs are similar, but not so tight. I won't take data from cache at
all because my application already stores the last reading. But I will
need to refresh data every few seconds, which means a read from uncached.
We have however to clarify with Paul if the simultaneous is able to
explicitly trigger the fasttemp?
I suppose it does, and everything else. In other words, maybe the
simultaneous/temperature register controls this but it takes a 1 only.
Would be sweet if you could put the number of bits for the conversion
instead (eg simultaneous/temperature = 9 -> 9 bit group conversion
triggers), or perhaps expose simultaneous/fasttemp,
simultaneous/temperature9... etc.
/m
------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it.
http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers