beautypg.com

4 ianalyzer::startgeneration, Ianalyzer::startgeneration – Teledyne LeCroy USB Analyzer Automation Manual User Manual

Page 13

background image

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

13

2.1.4 IAnalyzer::StartGeneration


HRESULT StartGeneration (

[in] BSTR gen_file_name,
[in] long gen_mode,
[in] long loop_count );

Starts USB 2.0 traffic generation from the file.

Parameters


gen_file_name

String providing the full pathname to the generation file.
If a valid name, the file is opened after any pre-existing
Generation File is closed in accordance with the behavior set
forth by Bit 31 in the gen_mode parameter.
If NULL string, it just closes any existing Generation File.

gen_mode

Generation mode:
Bit 0: 0 = bitstream; 1 = IntelliFrame
Bit 31: 0 = Load gen_file_name only if:

1. Different than pre-existing Generation Filename OR
2. The gen_file_name file is already loaded but has
been changed since the time it was loaded OR
3. The generation mode (bit 0) is different than the
previous invocation. Leaving this bit set to 0 allows
a file to be generated repeatedly without having to
be re-parsed or downloaded to the Analyzer
hardware, saving time.
1 = Reload gen_file_name unconditionally.


loop_count

Number of times to repeat:
-1 = loop forever
1 through 16381 executes generation file that number of times.

Return values

ANALYZERCOMERROR_UNABLEOPENFILE

Unable to open file


ANALYZERCOMERROR_UNABLESTARTGENERATION

Unable to start generation
(USB 3.0 generation is running,
invalid state, or other)

E_INVALIDARG

Remarks

Used to load a .utg file and begin generating traffic.

Example