<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Unsigned Integer DCI and diff()]]></title><description><![CDATA[<p dir="auto">I've been monitoring UPS runtime, and as that really should never go into a negative value, I thought I'd use an unsigned integer for the DCI.<br />
I also used a threshold to alert if the runtime dropped by 20 minutes within 1 minute, kind of as an indicator that the battery is on its way out.</p>
<p dir="auto">The result of the above setup is that the threshold gets triggered a lot. Every time the runtime goes down, it triggers.<br />
For all I can tell this is due to the unsigned integer. If the the difference to the previous value is negative (i.e. from 120 to 116, a difference of -4), it compares the threshold of 20 with 4294967292 (i.e. 2^32 - diff). I don't think the unsigned integer class for the actual value should apply to the result of the diff?<br />
Or did is this some other odd issue I ran into? Since switching from Unsigned Int to Integer, I'm not getting these alerts anymore.</p>
]]></description><link>https://forum.netxms.org/topic/4417/unsigned-integer-dci-and-diff</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 13:08:21 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/4417.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 18 Apr 2016 23:24:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Unsigned Integer DCI and diff() on Tue, 27 Dec 2016 15:20:47 GMT]]></title><description><![CDATA[<p dir="auto">Fixed in version 2.1-M2.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/21552</link><guid isPermaLink="true">https://forum.netxms.org/post/21552</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Tue, 27 Dec 2016 15:20:47 GMT</pubDate></item><item><title><![CDATA[Reply to Unsigned Integer DCI and diff() on Tue, 19 Apr 2016 13:53:54 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">it's actually a bug, diff definitely should be treated as signed value. I'll register it in our issue tracker.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/19684</link><guid isPermaLink="true">https://forum.netxms.org/post/19684</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Tue, 19 Apr 2016 13:53:54 GMT</pubDate></item></channel></rss>