beautypg.com

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

Page 126

background image

Teledyne LeCroy

Automation API for PETracer/PETrainer

121

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 1 passed !!!", "PETracer client", MB_OK );

}


result = pe_vsengine ->RunVScriptEx("Test_2");
if( result == PASSED )
{

::MessageBox( NULL, "Test 2 passed !!!", "PETracer client", MB_OK );

}


result = pe_vsengine ->RunVScriptEx("C:\\MyTests\\Test_3.pevs");
if( result == PASSED )
{

::MessageBox( NULL, "Test 3 passed !!!", "PETracer client", MB_OK );

}


. . .