2 ianalyzererrors::get_count, Ianalyzererrors::get_count – Teledyne LeCroy USB Analyzer Automation Manual User Manual
Page 115

Teledyne LeCroy Automation API Reference Manual for USBTracer, USB Advisor, and Voyager USB Protocol
Suite
115
8.1.2 IAnalyzerErrors::get_Count
HRESULT get_Count(
[out, retval] long* number_of_errors );
Parameters
number_of_errors
Points to long value where number of elements in the collection
is retrieved.
Remarks
Example
WSH:
' Makes recording, and
' saves the portions of the recorded trace where "Bad VCRCs" errors occurred.
CurrentDir = Left(WScript.ScriptFullName, InstrRev(WScript.ScriptFullName, "\"))
Set Analyzer = WScript.CreateObject("CATC.USBTracer")
Set Trace = Analyzer.MakeRecording (CurrentDir & "Input\test_ro.rec")
Set Errors = Trace.AnalyzerErrors (16) ' Packet Length Error
For Each ErrorPacketNumber In Errors
ErrorFile = CurrentDir & "\Output\ PckLen_error_span_" & CStr(ErrorPacketNumber)
& ".usb"
Trace.Save ErrorFile, CInt(ErrorPacketNumber)-5, CInt(ErrorPacketNumber)+5
Next