Am 25.05.2016 um 19:01 schrieb Guy COLIN:
>
> Ok, I wasn't clear in my explanantions. I understand that the fact of reading 
> from uncached updates the cache. I mean that in my system I do everything 
> with /mnt/1wire. I don't need to be fast. The cache is updated every minute 
> that's ok for me.
>
The cache for a certain directory is updated when you read that
directory (and it's not taken from the cache). There isn't an automatic
update.



> My system basically does 2 things: 1st log values (temp, 
> humidity, etc.) every 5 minutes and generate graph from these values and 2nd 
> drives the heating system and the swimming pool filter pump. When I write a 0 
> or a 1 to a PIO thru /mnt/1wire owfs does it instantaneously as described in 
> the doc (doesn't wait 60sec)
>
In that case, the directory cache is never updated because you never
sample the directory. That's okay for OWFS as it doesn't make
assumptions about the chips connected. Aside from the cache, it's a
really "raw" driver.

Writing doesn't affect the cache. The cache is only about reading
values. (There is an exception: there are properties marked as
reads-as-written, but I'd have to investigate how the cache kicks in there.)


> Anyway in these applications 1 minutes is nothing, I have an hysteresis of 
> 0.1°C in my home heating system. Example the set point is 20°C the heating 
> start order will be given when the measured value is <19.9 and stop when 
>> 20.1, so it will heat during something like 15 minutes. So I'm ok by doing 
> everything with the cached values.
>
When you sample that slowly, the cache is always expired (it's 15s for
properties and 60s for directories), so /uncached won't change anything.


> I mean I have seen many times that when a device disappear from /mnt/1wire it 
> also disappear from /mnt/1wire/uncached. But it can be very strange I have 
> links like TempSensorRoom pointing to the corresponding sensor. If the sensor 
> disappear from the directory sometimes, not always, I can still read it thru 
> TempSensorRoom/temperature
> 
If the cache isn't expired that's perfectly normal. OWFS doesn't connect
the directory listing to any other property.


And even if the cache is expired (or /uncached is read), you may access
chips which haven't been listed in the previous directory sampling. That
is because chips may come and go anytime they want and you shouldn't be
required to "Search ROM" for them if you know them already.

In short: OWFS doesn't make any assuption about the chips present on the
bus. Each transaction starts with a clean slate.


Kind regards

        Jan

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to