always
boolean TPT.always(timed_boolean expr, [timed_float resampleExpr])
This operation checks if the timed expression expr
of type boolean
is
true
for all points in time of the current context interval. If the expression is
false
for at least one sample period the result is false
. The
function ignores samples where the expression is undefined. If the expression is undefined for
all points in time in the current context interval the result of this function is
false
.
This function will consider all points in time if resampleExpr
is not specified.
If the (optional) resampleExpr
is specified, this function will consider only
points in time where the given resampleExpr
changes its value. In particular, if
there is no such sample where the given resampleExpr
changes its value the result
of this function is false
. See TPT.resampleOnChange()
for a more
detailed description of the resample semantics.
Parameters:
expr Timed boolean expression that shall be checked.
[resampleExpr] (optional) resample signal for checks to be performed only if the value changes (e.g. task counter).
Returns:
value indicating if the always-check was successful
See Also: