beautypg.com

3 itrace::save, Itrace::save, Catc ver. 1.40 – Teledyne LeCroy Automation API for Bluetooth Analyzers User Manual

Page 39

background image

33

Automation API for CATC Bluetooth Analyzers

CATC

Ver. 1.40

2.4.3 ITrace::Save

Saves trace into file, allows to save a range of packets

Parameters

file_name

-

string providing the full pathname to file where trace is saved

packet_from

-

beginning packet number when you are saving a range of packets,

value –1 means that the first packet of saved trace would be the first
packet of this trace

packet_to

-

ending packet number when you are saving a range of packets, value

–1 means that the last packet of saved trace would be the last packet of
this trace

Return values

ANALYZERCOMERROR_UNABLESAVE

unable to save trace file

Remarks

Use this method if you want to save recorded or opened trace into the file. If the display
options applied to this trace (see

ITrace::ApplyDisplayOptions, IAnalyzer::LoadDisplayOptions

) then

hidden packets would not be saved.
If packet range is specified and it is invalid (for example packet_to is more then last
packet number in the trace, or packet_from is less then first packet number in the trace, or

packet_from

is more then

packet_to

) then packet range will be adjusted automatically.

Example

WSH:

Set Analyzer = WScript.CreateObject("CATC.Merlin")

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.blt"

C++:

IBTTrace* bt_trace;

TCHAR file_name[_MAX_PATH];

LONG packet_from;

LONG packet_to;

. . .

try

{

bt_trace->Save( file_name, packet_from, packet_to );

}

catch ( _com_error& er)

{

HRESULT Save (

[in] BSTR file_name,

[in, defaultvalue(-1)] long packet_from,

[in, defaultvalue(-1)] long packet_to );