Teledyne LeCroy SAS_SATA Tracer_Trainer Automation API Manual User Manual

Page 46

Advertising
background image

LeCroy Corporation

Automation API for SAS/SATATracer/Trainer

Manual Version 1.11

46

Example

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

ISASTrace* trace;

. . .

ISASVerificationScript* vscript = NULL;

if ( SUCCEEDED ( trace->QueryInterface( IID_ISASVerificationScript,
(void**)&vscript ) )
{

try
{

VS_RESULT result = vscript ->RunVerificationScript("Test1");
if( result == PASSED )
{
::MessageBox( NULL, "Test verification 1 is passed !!!", "SASTracer
client", MB_OK );
}

}
catch (_com_error& er)
{

if (er.Description().length() > 0)
::MessageBox( NULL, er.Description(), "SASTracer client", MB_OK );
else
::MessageBox( NULL, er.ErrorMessage(), "SASTracer client", MB_OK );
return 1;

}

}

else
{

::MessageBox( NULL, "Unable to get ISASVerificationScript interface !!!",
_T("SASTracer client"), MB_OK );
return 1 ;

}

. . .

WSH:

Set Analyzer = WScript.CreateObject("LeCroy.SASTracer")
Set Trace = Analyzer.OpenFile( "C:\Some trace files\some_trace.sas" )

Dim Result
Result = Trace.RunVerificationScript( "Test1" )

If Result = 1 Then

Msgbox "PASSED"

Else

Msgbox "FAILED"

End If

MsgBox( "Done" )


Advertising