Using counters in events and actions – Teledyne LeCroy SAS_SATA InFusion - Users Manual User Manual
Page 55
SAS InFusion User Manual
Version 2.0
LeCroy Corporation
41
Using
Counters in
Events and
Actions
Many of the events and actions supported by SAS InFusion also support counters which
can be used to control functions.
Within events, counters are used to determine how many times the event must occur
before the associated actions are triggered. Event counters are typically provided with
two properties:
•
Count Randomly, which can be set to "Yes" or "No" (default value is "No").
If set to "Yes", the event will need to be repeated a random number 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, which is the number of repeats required when Count
Randomly is set to "No". The default value is 1.
Within actions, counters are used to determine how many times the action must be called
before it will act. Action counters are typically provided with two properties:
•
Random, which can be set to "Yes" or "No" (default value is "No"). If set to
"Yes", the action will need to be triggered for a number of occurrances before
the action will take place, That number will range randomly between 1 and
the value set in the property At least every Nth occurrence, which replaces
the property Every Nth occurrence when "Yes" is selected).
•
Every Nth occurrence, which is the number of times the action needs to be
called before it will act.
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 will make no difference
whether you specify the event to require 5 repeats before triggering the action, or the
action to require 5 occurances before it acts.
However, in the case of combined events and/or actions, the separate counters provide
a great deal of 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 will
be triggered either when Event_1 has repeated 5 times or when Event_2 happens the
first time, whichever occurs first.
But if the event counters are set to 1 and the Action counter is set to 5, then the Action
will happen after 5 occurrences of EITHER Event_1 or Event_2.