6 using counters in events and actions – Teledyne LeCroy SierraNet M408 User Manual Ver.1.40 User Manual
Page 214

LeCroy Corporation
InFusion Scenarios
212
SierraNet M408 Protocol Analyzer User Manual
Usage of Action Register:
Each Counter in Global Rules = 2
Each Counter in State = 3
Each Timer in Global Rules = 2
Each Timer in State = 3
Other Actions = 1
4.5.6
Using Counters in Events and Actions
Many of the Events and Actions supported by InFusion also support counters that can
control functions.
Within Events, counters determine how many times the Event must occur before the
associated Actions are triggered. Event counters typically have two properties:
Count Randomly: Can be set to “Yes” or “No” (default value is “No”).
If the Count Randomly checkbox is selected, the Event repeats a random num‐
ber of times (between 1 and the value set in the property Max Random Count,
which replaces the property Counter Value when “Yes” is selected), before the
Action is triggered.
Counter Value: Number of repeats required when the Count Randomly check‐
box is not selected. The default value is 1.
Within Actions, counters determine how many times the Event happens before it
executes the Action. Note that an Event can be defined for a number of occurrences, so in
total, the Event will have to occur for Event counter multiplied by the Action counter
times before the Action gets executed. For example, if the Event is defined with a counter
of 5, and Action with a counter of 10 such Events, the Event looked at will have to occur
50 times before the Action is taken.
Action counters typically have two properties:
Action Random: Can be set to “Yes” or “No” (default value is “No”).
If the Action Random checkbox is selected, the Action triggers a number of
occurrences before the Action takes place. That number ranges randomly
between 1 and the value set in the property Every Nth occurrence, which
replaces the property Every Nth occurrence when the Action Random checkbox
is selected.
Every Nth occurrence: Number of times the system calls the Action before it
acts.
Note that there is some overlap in the way these counters can be used. For example, in
the simple case of a single Event leading to a single Action, it makes no difference
whether you specify the Event to require five repeats before triggering the Action, or the
Action to require five occurrences before it acts.
However, in the case of combined Events and/or Actions, the separate counters provide
flexibility in designing test cases. For example, consider the case where Event_1 OR
Event_2 leads to Action. If Event_1 has a counter of 5, then the Action triggers either
when Event_1 has repeated five times or when Event_2 happens the first time,
whichever occurs first.