Ivscriptengine::getscriptvar – Teledyne LeCroy SAS_SATA Automation API manual User Manual

Page 128

Advertising
background image

Teledyne LeCroy

SASVScriptEngine Object

122

Automation API for Teledyne LeCroy SAS/SATA Protocol Suite

IVScriptEngine::GetScriptVar

HRESULT GetScriptVar (
[in] BSTR var_name,
[out, retval] VARIANT* var_value )

Changes the current verification script name and runs the verification script.

Parameters

var_name

String providing the name of the global variable or constant used 

in the running verification script

var_value

Address of a VARIANT variable where the result will be kept

Return Value

E_PENDING 

If this method is called when the script is already running

Remarks

If there is no such global variable or constant with the name var_name, the resulting 

value will contain an empty VARIANT.

Example

C++:

// This example uses wrapper functions provided by the

#import directive.

ISASTrace* sas_trace;

. . .

ISASVerificationScript* sas_vscript = NULL;

sas_trace->QueryInterface( IID_ISASVerificationScript,
(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();

. . .
VARIANT my_var;
VariantInit( &my_var );

Advertising