beautypg.com

2 ifcverificationscript:: getvscriptengine – Teledyne LeCroy SierraFC Automation API User Manual

Page 43

background image

LeCroy Corporation

SierraFC M8-4 API Reference Manual

Manual Version 1.00

43

4.3.2 IFCVerificationScript:: GetVScriptEngine


HRESULT GetVScriptEngine (

[in] BSTR script_name,
[out, retval] IVScriptEngine** vs_engine )

Retrieves the verification script engine object.

Parameters
script_name

Name of the verification script to initialize the verification script engine

vs_engine

Address of a pointer to the

FCVScriptEngine

object interface


Return values

S_OK – if the verification script engine object was successfully retrieved.

Remarks
The name of the verification script is the name of the verification script file (*.pevs). See
remark to

IFCVerificationScript:: RunVerificationScript

for details.


Example

C++:
// In this example, we use wrapper functions provided by the #import directive.

IFCTrace* sas_trace;

. . .

IFCVerificationScript* sas_vscript = NULL;

sas_trace->QueryInterface( IID_IFCVerificationScript, (void**)&sas_vscript ) )
assert( sas_vscript != NULL );
IVScriptEngine* sas_vsengine = NULL;
sas_vsengine = sas_vscript -> GetVScriptEngine("Test_1");
assert( sas_vsengine != NULL );
VS_RESULT result = sas_vsengine ->RunVScript();

if( result == PASSED )
{

::MessageBox( NULL, "Test verification 1 is passed !!!", "SierraFC M8-4 client",
MB_OK );

}

. . .

WSH:
Set Analyzer = WScript.CreateObject("LeCroy.SierraFC M8-4")
Set Trace = Analyzer.OpenFile( "C:\Some trace files\some_trace.sas" )
Dim Result
Set VSEngine = Trace.GetVScriptEngine( "Test1" )
Result = VSEngine.RunVScript

If Result = 1 Then

Msgbox "PASSED"

Else

Msgbox "FAILED"

End If

MsgBox( "Done" )