beautypg.com

Example, Ipetrace* pe_trace, Ipeverificationscript* pe_vscript = null – Teledyne LeCroy Automation API for Teledyne LeCroy PETracer_PETrainer User Manual

Page 57: Dim result, If result = 1 then, Else

background image

Teledyne LeCroy

Automation API for PETracer/PETrainer

52

Example

C++:

// In this example we use wrapper functions provided by #import directive
//

IPETrace* pe_trace;


. . .


IPEVerificationScript* pe_vscript = NULL;

pe_trace->QueryInterface( IID_IPEVerificationScript, (void**)&pe_vscript ) )

assert( pe_vscript != NULL );

IVScriptEngine* pe_vsengine = NULL;
pe_vsengine = pe_vscript -> GetVScriptEngine("Test_1");
assert( pe_vsengine != NULL );

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

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

}


. . .

WSH:

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

Dim Result


Set VSEngine = Trace.GetVScriptEngine( "Test1" )

Result = VSEngine.RunVScript

If Result = 1 Then

Msgbox "PASSED"

Else

Msgbox "FAILED"

End If

MsgBox( "Done" )