It's possible for the DCS server to return Inf, -Inf and NaN for totalValue and periodValue with the get_readings method. This can occur when virtual meters give a divide by zero, or calibration readings are not set up correctly so are generally erroneous situations, however these are none-the-less valid values of IEEE 754 floating points and Python's representation of floats. These are currently returned as strings and not floats and probably should be returned as such.
Caveat though is that returning a string will cause an immediate exception when attempting to do most (but not all) arithmetic or numeric comparisons while the appropriate floats will not allowing more mysterious behaviour to manifest itself later in downstream code making it harder to trace.
It's possible for the DCS server to return
Inf,-InfandNaNfortotalValueandperiodValuewith theget_readingsmethod. This can occur when virtual meters give a divide by zero, or calibration readings are not set up correctly so are generally erroneous situations, however these are none-the-less valid values of IEEE 754 floating points and Python's representation of floats. These are currently returned as strings and not floats and probably should be returned as such.Caveat though is that returning a string will cause an immediate exception when attempting to do most (but not all) arithmetic or numeric comparisons while the appropriate floats will not allowing more mysterious behaviour to manifest itself later in downstream code making it harder to trace.