Itrace::save – Teledyne LeCroy SAS_SATA Automation API manual User Manual
Page 62

Teledyne LeCroy
SASTrace Object
56
Automation API for Teledyne LeCroy SAS/SATA Protocol Suite
ITrace::Save
HRESULT Save (
[in] BSTR file_name,
[in, defaultvalue(-1)] long packet_from,
[in, defaultvalue(-1)] long packet_to );
Saves trace into a file while allowing you to specify a range of packets.
Parameters
file_name
String providing the full pathname to the file where the trace is saved
packet_from
Beginning packet number when you are saving a range of packets,.
–1 = first packet of the saved trace is the first packet of this trace.
packet_to
Ending packet number when you are saving a range of packets.
–1 = last packet of the saved trace is the last packet of this trace.
Return Values
ANALYZERCOMERROR_UNABLESAVE
Unable to save the trace file
ANALYZERCOMERROR_INVALIDPACKETNUMBER Bad packet range
Remarks
Use this method to save a recorded or opened trace into a file. If the display
options apply to this trace (see
ISASAnalyzer::LoadDisplayOptions
, then hidden packets would not be saved.
If the packet range specified is invalid (for example, packet_to is more than the last
packet number in the trace, or packet_from is less than the first packet number in the
trace, or packet_from is more than packet_to), then the packet range is adjusted
automatically.
Example
WSH:
Set Analyzer =
WScript.CreateObject("LeCroy.SASAnalyzer")
CurrentDir = Left(WScript.ScriptFullName,
InstrRev(WScript.ScriptFullName, "\"))
Set Trace = Analyzer.MakeRecording (CurrentDir &
"Input\test_ro.sac")
Trace.ApplyDisplayOptions CurrentDir &
"Input\test_do.slf"
Trace.Save CurrentDir &
"Output\saved_file.scs"