beautypg.com

1 ivscriptengine::vscriptname, Parameters, Return values – Teledyne LeCroy Automation API for Teledyne LeCroy PETracer_PETrainer User Manual

Page 122: Remarks, Example, Ipetrace* pe_trace, Ipeverificationscript* pe_vscript = null, Ivscriptengine::vscriptname

background image

Teledyne LeCroy

Automation API for PETracer/PETrainer

117

9.1.1 IVScriptEngine::VScriptName


[propget] HRESULT VScriptName( [out, retval] BSTR *pVal )

[propput] HRESULT VScriptName( [in] BSTR newVal )

Property putting and getting current verification script name.

Parameters

pVal

Address of the variable where the current verification script name is kept

newVal

Name of the verification script to initialize script verification engine

Return values


Remarks


The name of verification script is the name of verification script file (*.pevs). If only the name of the script

without file extension is specified, the PETracer server is going to search for the named script among the scripts
loaded from the \Scripts\VFScripts folder under PETracer installation folder. If the full path to the script is
specified, then the server is going to attempt loading the script from the specified path prior to running it.

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("MyVSEngine");
assert( pe_vsengine != NULL );


pe_vsengine -> PutVScriptName("Test_1");
assert( pe_vsengine -> GetVScriptName() == "Test_1" );


VS_RESULT result = pe_vsengine ->RunVScript();
if( result == PASSED )
{
::MessageBox( NULL, "Test 1 passed !!!", "PETracer client", MB_OK );

}

. . .