Description
The measurement sequence number for a currently valid Value property
-
Property type
-
A Long value.
-
Syntax
-
object.ValueSequence([SequenceLimit])
The ValueSequence Property syntax has these parts: |
| object | An expression evaluating to an object of type McHeterogeneity. | | SequenceLimit | Optional. A Long value. If non-zero, the smallest acceptable ValueSequence. If the current ValueSequence is greater than this, then 0 is returned, indicating that the current Value property was computed after the McEngine.MeasurementSequence was at the SequenceLimit. Note that 0 is always returned if the IsValueStale property is True.
| Remarks
This sequence number is the value of the McEngine.MeasurementSequence when the last still valid Value was computed. If the current Value is stale or the current Value's stored ValueSequence is greater than a non-zero SequenceLimit parameter, then the exposed ValueSequence will be zero.
The purpose of the ValueSequence property is to allow you to determine if a Value you obtained from a measurement some time previously is still valid (not stale). You cannot just look at the IsValueStale property to determine this, because some client may have accessed a stale Value after you got your Value, thereby triggered a recomputation and clearing IsValueStale to False. Without a mechanism like the ValueSequence property, the only way to determine if your Value was still valid would be to compare it with the current Value, which would be an expensive operation. The example illustrates a typical use of this property.
|