Hi Marc,
The protocol require that the master always initiate the communication. so
polling is unavoidable.
However the functinality you're wondering exist; you may reduce bus traffic
by using alarm function:
basically you configure the slave to respond to conditionnal search only
when a change occurred on its inputs.
on ds2408 use the set_alarm property to configure conditional behaviour. (
http://owfs.org/index.php?page=ds2408) then iteratively look for alarmed
slaves by enumerating devices of alarm directory and read bit state only on
theses alarmed devices.
while this polling does not seems effective when few slaves are monitored on
the bus, this become really interesting when many have to be monitored. you
are able to poll 10 time per second as many slave as the bus may hold.
Adding the use of simultaneous property for temperature aquisition, and you
never lock the bus for duration of a conversion. even ds18?20 temp sensors
use alarm function to appears in alarm directory (after a conversion
command) if temp goes outside given limits.
Pascal
2011/3/18 Marc MERLIN <[email protected]>
> I have this board:
> http://owfs.org/index.php?page=8-channel-i-o
>
> I know how to read the I/O status from it, but I was wondering what's the
> best way to get immediately notified of an input bit flip?
>
> Do I need to read the uncached tree every second and spam the 1-wire bus
> (probably preventing reading temperatures from other processes), or is
> there
> a way to get a 'please poll me, my status changed' notice of some kind?
>
> Marc
> --
> "A mouse is a device used to point at the xterm you want to type in" -
> A.S.R.
> Microsoft is to operating systems & security ....
> .... what McDonalds is to gourmet
> cooking
> Home page: http://marc.merlins.org/
>
>
> ------------------------------------------------------------------------------
> Colocation vs. Managed Hosting
> A question and answer guide to determining the best fit
> for your organization - today and in the future.
> http://p.sf.net/sfu/internap-sfd2d
> _______________________________________________
> Owfs-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
--
Pascal
www.brain4home.eu
to subscribe, send a mail to <[email protected]>
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers