beautypg.com

2 itrace::applydisplayoptions, Itrace::applydisplayoptions – Teledyne LeCroy USB Analyzer Automation Manual User Manual

Page 44

background image

Teledyne LeCroy Automation API Reference Manual for USBTracer, USB Advisor, and Voyager USB Protocol
Suite

44

3.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 display options file

Return values

ANALYZERCOMERROR_UNABLELOADDO

Unable to load 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 USB Protocol Suite

application. You can create such a file by selecting Setup

– Display Options… from the USB Protocol

Suite application menu, changing the display options in the dialog, and selecting the Save button.

Example


WSH:

Set Analyzer = WScript.CreateObject("CATC.USBTracer")
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.usb"

C++:

IUsbTrace* usb_trace;
TCHAR file_name[_MAX_PATH];


. . .

try

{

usb_trace->ApplyDisplayOptions( file_name );

}
catch ( _com_error& er)
{

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

}