Citeren Arjen de Korte <[email protected]>:

BTW it's the same reason why we need to parse differently the subscription reply, there is no root element). Maybe my code was a little bit obscure about it.
No, it was very clear. But the NMC sends out alarms separately. What's different here, is that the arrival of an alarm immediately triggers reading it. We don't hang around in the main driver body until the pollinterval elapses, but break from that.

You can easily see how this works by running the driver in debug mode. In debug level 2, the full content of the buffer is displayed where ne_read_sock() stores whatever it reads:

    /path/to/netxml-ups -DD -a <upsname>

I have never seen more than one message in it, even when alarms are spaced just a few tenths of a second apart. And even if we would miss something, nothing is lost, since the summary and get_object pages will have identical data.

Best regards, Arjen
--
Please keep list traffic on the list


_______________________________________________
Nut-upsdev mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev

Reply via email to