beautypg.com

5 ivscriptengine::launchvscript, Ivscriptengine::launchvscript – Teledyne LeCroy USB Analyzer Automation Manual User Manual

Page 87

background image

Teledyne LeCroy Automation API Reference Manual for USBTracer, USB Advisor, and Voyager USB Protocol
Suite

87

5.1.5 IVScriptEngine::LaunchVScript

HRESULT LaunchVScript();

Launches verification script.

Parameters


Return values

S_FALSE

If VS Engine was not successfully launched
(either it is already running or verification script was not found).

Remarks

This method makes an “asynchronous” call, so this method immediately returns after the script starts
running.

When the verification script stops running, the VSE object sends a special event notification
“OnVScriptFinished” to the client event handler. You can also terminate script running using the
method “Stop”.

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 ->

LaunchVScript

();


// You can go further without waiting for the result from the VSE object.
// If you are interested in the result, implement the client event handler for
// OnVScriptFinished() notification.

. . .