Try to use the alarm-directory.

# Setup
foreach 12.*
     openeach
     writevalue_to_set_alarm
     closeeach
end foreach

# Main loop
foreach uncached/alarm
     openeach
     readvalue
     reset_alarm
     closeeach
end loop

--
Serg.

> Greetings to all,
>
> I am implementing a system which need to poll sensors (mainly DS2406 and 
> DS2408) nearly every second. Of course I use uncached values of sensors to 
> get the most recent data. I have about 15-20 sensors to poll.
>
> I see three options:
>
> First:
> loop:
>     openfile("12.XXXXXXXX/latch.A");
>     readvalue;
>     closefile;
> end loop.
>
> The most obvious one, but open/close file is rather costly operation.
>
> Second:
> openfile("12.XXXXXXXX/latch.A");
> loop:
>      readvalue;
>      goto_first_line;
> end loop;
> closefile;
>
> This is better, but is there some chance, that value will be cached somewhere 
> inside OS?
>
> Third:
> give up on owfs and use owhttpd and make tcp connections to read files.
>
> I think this is a heaviest one, but crossplatform, so can be used on windows. 
> Can owhttpd have about 20 concurrent connections in a second?
>
>
> What strategy to choose? Thank you for any help in advance.
>
>
> Best Regards,
>
> Ivan, PhD
>
>
>
>
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
>
>
>
> _______________________________________________
> Owfs-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to