Chapter 3 – Teledyne LeCroy SAS_SATA Protocol Suite Verification Script Engine Reference Manual User Manual

Page 9

Advertising
background image


9

Chapter 3: Interaction Between

SASSuite/SATASuite and a Verification Script

When you run a script against a pre-recorded trace, the following sequence occurs:

Prior to sending information to the script's main processing function ProcessEvent(), VSE
looks for the function OnStartScript() and calls it if it is found. In this function, setup actions are
defined, such as specifying the kind of trace events that should be passed to the script and
setting up initial values for script-specific global variables.

Next, VSE parses the recorded trace to verify that the current packet or other event meets
specific criteria. If it does, VSE calls the script’s main processing function ProcessEvent(),
placing information about the current event in the script’s input context variables.
(Please refer to the topic "

Input context variables

" later in this document for a full description of

verification script input context variables.)

ProcessEvent() is the main verification routine for processing incoming trace events. This
function must be present in all verification scripts. When the verification program consists of a
few stages, the ProcessEvent() function processes the event sent to the script, verifies that
information contained in the event is appropriate for the current stage, and decides if VSE
should continue running the script or, if the whole result is clear on the current stage, tells VSE
to complete execution of the script.

The completion of the test before the entire trace has been evaluated is usually done by setting
the output context variable:
out.Result = _VERIFICATION_PASSED or _VERIFICATION_FAILED

(Please refer to the topic "

Output context variables

" later in this document for a full description

of verification script output context variables.)

NOTE: Not only does a verification script evaluate recorded traces against some criteria,
but it can also extract information of interest and post-process it later by some
third-party applications. A set of script functions allows you to save extracted data in
text files, or send it to other applications, via COM/Automation interfaces.


When the script has completed running, VSE looks for the function OnFinishScript() and calls
it if found. In this function, some resetting procedures can be done.

The following figure illustrates the interaction between the SASSuite/SATASuite application and
a running verification script:

Advertising