In this example, repetition R1 is associated with TotoNotHere. If this event is realized 3 times consecutively then the repetition is realized. In this case, the event window time is 15s, and event are checked very 5s. The repetition value is 3, this means that if TotoNotHere is activated during at least 3 x 5s = 15s, the repetition will be activated.
This example has a different effect from the one with a variable used as an event counter. In the former example, the event was realized at the third occurrence of a pattern. No matter if the time between the
occurrences was 5s of 3 days. The occurrence could be not consecutive and separated by periods when the
event was off. This makes this example quite different from the 'Repetition' which imply that all the occurrences are grouped together with no change of the event state.
Kazimir: LogFile = /dev/tty ; EventDir = /tmp/eventdir ; OutputDir = /tmp/outputdir ;\
LockFile = /tmp/kazimir.lock ; EventUpdateInt = 5
Pattern: Name = PsToto ; Log = PsEdf ; RegExp =toto;
Event : Name = TotoNotHere ; Fenetre = 15s;
Begin
!PsToto
End
Repetition: Name = R1 ; Event = TotoNotHere ; Number = 3 ;
Order: Name = ordre1 ; Event = TotoNotHere ; Action = StartToto;
Action: Name = StartToto ; Path = /usr/local/bin/toto ;
Order: Name = Toto3TimeConsecutive ; Event = R1 ; Action = SayHelloToto ;
Action: Name = SayHelloToto ; Path = echo ``Hello Toto''