3 iusbtrace2::exporttocsv, Iusbtrace2::exporttocsv – Teledyne LeCroy USB Analyzer Automation Manual User Manual
Page 63

Teledyne LeCroy Automation API Reference Manual for USBTracer, USB Advisor, and Voyager USB Protocol
Suite
63
3.2.3 IUsbTrace2::ExportToCsv
HRESULT ExportToCsv(
[in] BSTR file_name,
[in] long level,
[in, defaultvalue(-1)] long unit_from,
[in, defaultvalue(-1)] long unit_to );
Exports a trace into a text file in CSV format and allows exporting a range of packets.
Parameters
file_name
String providing the full pathname of the trace export file
level
Transaction level
0
– Packets
1
– USB Transactions
(Currently only these are supported.)
unit_from
Beginning packet number when you are exporting a range of packets. Value
–1
makes the first packet of the exported trace be the first packet of the trace.
unit_to
Ending packet number when you are exporting a range of packets.
Value
–1 makes the last packet of the exported trace be the last packet of the
trace.
Return values
ANALYZERCOMERROR_UNABLESAVE
Unable to export trace file
Remarks
Use this method if you want to export a recorded or opened trace into a text file in CSV format. If display
options apply to this trace (see
), then hidden units would not be exported.
If a unit range is specified and it is invalid (for example, unit_to is more than the last unit number in the
trace, or unit_from is less than first unit number in the trace, or unit_from is more then unit_to) then
unit range adjusts automatically.