beautypg.com

2 iuwbverificationscript::getvscriptengine, Iuwbverificationscript::getvscriptengine – Teledyne LeCroy UWBTracer Automation Manual User Manual

Page 57

background image

LeCroy

UWBTracer Automation API Reference Manual

Manual Version 3.02

53

4.4.2 IUwbVerificationScript::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.
//
IuwbTrace3*

Uwb_trace;


. . .


IUwbVerificationScript* Uwb_vscript = NULL;

Uwb_trace->QueryInterface(IID_ IUwbVerificationScript, (void**)&Uwb_vscript))

assert(Uwb_vscript != NULL);

IVScriptEngine* Uwb_vsengine = NULL;
Uwb_vsengine = Uwb_vscript -> GetVScriptEngine("Test_1");
assert(Uwb_vsengine != NULL);

VS_RESULT result = Uwb_vsengine ->RunVScript();
if(result == PASSED)
{

::MessageBox( NULL, "Test verification 1 is passed !!!", "UwbAnalyzer client", MB_OK );

}


. . .


WSH:

Set Analyzer = WScript.CreateObject("CATC.UWBAnalyzer")
Set Trace = Analyzer.OpenFile("C:\Some trace files\some_trace.Uwb")


Dim Result


Set VSEngine = Trace.GetVScriptEngine("Test1")

Result = VSEngine.RunVScript

If Result = 1 Then

Msgbox "PASSED"

Else

Msgbox "FAILED"

End If
MsgBox( "Done" )