Skip to main content

Module cov_change

Module cov_change 

Source
Expand description

The change test of COV reporting (Clause 13.1), shared by the server’s COV notifications and a Trend Log that logs by COV (#1480).

A numeric value reports when it has moved by at least the increment in use; with no increment, or one of zero or less, any change reports. Every other value reports when it differs at all. Which increment is in use is effective_increment’s rule: one the client supplied wins, otherwise only a numeric Present_Value takes the object’s COV_Increment (Table 13-1 for the objects it lists, Table 13-1a for any other property).

Functions§

effective_increment
The increment in use: an explicit one (a SubscribeCOVProperty increment, or a Trend Log’s Client_COV_Increment) wins; otherwise only a numeric Present_Value inherits the object’s current COV_Increment.
is_numeric
Whether value, read from property (at index) of object, is a numeric quantity the increment applies to: a REAL, Double, Unsigned or INTEGER that is not a whole array or an array’s size.
reports_change
Whether current is a change from previous worth reporting. A numeric pair of the same datatype is held to increment; a non-finite REAL or Double reports when its bits differ. Anything else reports when same_value says the two differ.
same_value
Value equality for change detection: REALs and Doubles compare by their bits (so NaN equals itself and 0.0 differs from -0.0), lists element by element, everything else as == does.