Hide this message
Looking to compare latest NPM features with previous versions of NPM?
The NPM new feature summary offers a comparison of new features and improvements offered with this release.
Specify a method that decides what happens if a polled value is less than the previous polled value.
Orion Platform products are capable of handling either 32-bit or 64-bit counters.
By default, counters are assumed to be 32-bit.
32-bit counters have a maximum value of 232, or 4,294,967,296.
64-bit counters have a maximum value of 264, or 18,446,744,073,709,551,616.
This method detects a rollover, and calculates based on it.
First, the method checks whether the device rebooted and reset its counters to 0. In this case, the last value is 0.
When it is a real rollover, we take the maximum value of the 32 or 64 bit number, take the difference between the maximum and the last polled value, and add it to the current polled value: (MaxValue - LastPolledValue) + CurrentPolledValue
When a rollover is detected, Orion drops the poll and takes a new sample within 20 seconds. The new data point is stored, throwing the first data point away.
In memory, we have the value from the previous poll (A) and the LastPolledValue (B). Because B < A, we detect counter rollover. Orion drops the last poll and does a fast poll within 20 seconds. The value stored in the database is calculated as C-B.
Orion fully supports the use of 64-bit counters, but these counters can exhibit erratic behavior in some implementations. If you notice peculiar results, disable the use of 64-bit counters for the problem device, and contact the device manufacturer.