A
composite event
is a high-level event, formed from
zero or more user-defined (that is, nonsystem) atomic events. When
included in a composite event, an atomic event is known as a
sub-event
.
The
DEFINE COMPOSITE EVENT
command defines a
predicate
,
which is a logical expression typically involving sub-events. At all
times, the composite event's fire status reflects the value of the
predicate. When the predicate becomes true, the composite event
fires;
when it becomes false, the composite's fire status reverts to NOTFIRED.
The logical operator that is applied to the composite event's
predicate
is one of the Boolean operators AND or OR.
When first defined, a composite event contains between zero and
eight sub-events. (A composite event that contains zero sub-events
is said to be “empty”.) The ADD SUBEVENT command can be used to add
further sub-events to the composite event.
A composite event that uses the OR Boolean operator fires when
any of its sub-events fires.
A composite event that uses the AND operator fires when all of
its sub-events have fired, or when it is empty.
Figure 1
shows four composite events,
C1 through C4. Each composite event contains two sub-events. C1 and
C2 use the OR Boolean operator. C3 and C4 use the AND operator. The
shaded circles indicate the events that have fired.
Figure 1. Composite events. An
OR composite event fires when any of its sub-events fires. An AND
composite event fires when all of its sub-events have fired.
Note:
An empty composite event that uses the AND operator is always
true (FIRED). An empty composite event that uses the OR operator
is
always false (NOTFIRED).
The following
cannot
be added as sub-events to a composite
event:
Composite events
Sub-events of other composite events
System events
Input events, if the composite uses the AND operator.