beautypg.com

2 itrace::applydisplayoptions – Teledyne LeCroy SierraFC Automation API User Manual

Page 24

background image

LeCroy Corporation

SierraFC M8-4 API Reference Manual

Manual Version 1.00

24

4.1.2 ITrace::ApplyDisplayOptions


HRESULT ApplyDisplayOptions (

[in] BSTR do_file_name );

Applies the specified display options to the trace.

Parameters


do_file_name

String providing the full pathname to the display options file

Return values


ANALYZERCOMERROR_UNABLELOADDO -

unable to load the display options file

Remarks

Use this method if you want to filter traffic of some type in the recorded or opened trace.

The display options file is the file with extension .opt created by the SierraFC Protocol
Analyzer application. You can create this file

when you select ―Setup –> Display

Options…‖ from the SierraFC Protocol Analyzer application menu, change the display
options in the

―Display Options‖ dialog, and select the ―Save…‖ button.


Note: This does not work on Multisegment traces.

Example


WSH:

Set Analyzer = WScript.CreateObject("LeCroy.FCAnalyzer")
CurrentDir = Left(WScript.ScriptFullName, InstrRev(WScript.ScriptFullName, "\"))
Set Trace = Analyzer.MakeRecording (CurrentDir & "Input\test_ro.rec")
Trace.ApplyDisplayOptions CurrentDir & "Input\test_do.opt"
Trace.Save CurrentDir & "Output\saved_file.sat"

C++:

IFCTrace* sas_trace;

TCHAR file_name[_MAX_PATH];


. . .

try

{

sas_trace->ApplyDisplayOptions( file_name );

}

catch (_com_error& er)
{

if (er.Description().length() > 0)
::MessageBox( NULL, er.Description(), _T("SierraFC M8-4 client"), MB_OK
);
else
::MessageBox( NULL, er.ErrorMessage(), _T("SierraFC M8-4 client"), MB_OK
);
return 1;

}