Data Sheet

Teledyne LeCroy Automation API Reference Manual for USBTracer, USB Advisor, and Voyager USB Protocol
Suite
88
3.11.2 IUsbVerificationScript::GetVScriptEngine
HRESULT GetVScriptEngine( [in] BSTR script_name,
[out, retval] IVScriptEngine** pVSEngine );
Retrieves a verification script engine object.
Parameters
script_name Name or full path of the verification script to initialize the script
verification engine
pVSEngine Address of a pointer to the VScriptEngine object primary interface
Return values
S_OK If verification script engine object was successfully retrieved.
Remarks
The name of the verification script is the name of the verification script file (*.vse) without the file
extension. See remark to RunVerificationScript(…) for details.
Example
C++:
// In this example, use wrapper functions provided by #import directive.
IusbTrace* Usb_trace;
. . .
IUsbVerificationScript* Usb_vscript = NULL;
Usb_trace->QueryInterface(IID_ IUsbVerificationScript, (void**)&Usb_vscript))
assert(Usb_vscript != NULL);
IVScriptEngine* Usb_vsengine = NULL;
Usb_vsengine = Usb_vscript -> GetVScriptEngine("Test_1");
assert(Usb_vsengine != NULL);
VS_RESULT result = Usb_vsengine ->RunVScript();
if(result == PASSED)
{
::MessageBox( NULL, "Test verification 1 is passed !!!", "UsbAnalyzer client", MB_OK );
}
. . .
WSH:
Set Analyzer = WScript.CreateObject("CATC.USBTracer")
Set Trace = Analyzer.OpenFile("C:\Some trace files\some_trace.usb")
Dim Result
Set VSEngine = Trace.GetVScriptEngine("Test1")
Result = VSEngine.RunVScript
If Result = 1 Then
Msgbox "PASSED"
Else
Msgbox "FAILED"
End If
MsgBox( "Done" )