Previous Section Next Section

7.4 Sampling Events

Events are used to define the points at which temporal expressions are sampled. An event attached to a temporal expression becomes the sampling event for the temporal expression. The temporal expression is evaluated whenever the sampling event is emitted.

The sampling period is the interval of time from the emission of a sampling event to the next time the sampling event is emitted. All other event emissions within the same sampling period are considered simultaneous. Multiple emissions of a particular event within one sampling period are considered to be one emission of that event.

In Figure 7-1, Q and R are previously defined events that are emitted at the points shown. The temporal expression "Q@R" means "evaluate Q every time the sampling event R is emitted." If Q has been emitted since the previous R event, then "Q@R" succeeds upon the next emission of R. The final "Q@R" success happens because the sampling period for the expression includes the last R event, which is emitted at the same time as the last Q.

Figure 7-1. Sampling Event for a Temporal Expression

graphics/07fig01.gif

If "Q" in the figure above is a temporal expression that includes other events, "R" is the default sampling event of the temporal expression. The default sampling event of a temporal expression applies to all subexpressions within the expression, except where it is overridden explicitly by another event embedded in the expression.

Previous Section Next Section