[Nut-upsdev] MGE NMC and NutShutdownModule (and other stuff)
Arjen de Korte
nut+devel at de-korte.org
Thu Nov 5 19:32:28 UTC 2009
Citeren Arjen de Korte <nut+devel op de-korte.org>:
>> 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
More information about the Nut-upsdev
mailing list