Start trainer – Teledyne LeCroy Sierra SAS_SATA Protocol Analyzer STX API Reference Manual User Manual
Page 144
![background image](/manuals/353624/144/background.png)
Sierra SAS/SATA Protocol Suite, STX Software API Reference Manual
Using Trainer 144
Start Trainer
To start the Trainer project, call the StartGeneration () function of SAS API Service with
Generation file name, Generation mode, Loop count, and Device configuration type as
parameters, in that order.
(Refer to
TestTrainerAPI -> TestTrainerAPIDlg.cpp -
>OnBnClickedStrtTarinerButton ().)
m_SASAPI->StartGeneration (bstrTrainerFileName,
0, 0, DEVICE_CONFIG_AT_0_0_0);
To manage the running status conditions, declare and implement an OnTimer () function that
includes the generation status checking functions of the SAS API Service Object, such as
GetGenerationStatus ().
(Refer to TestTrainerAPI -> TestTrainerAPIDlg.cpp -> OnTimer ().)
afx_msg void OnTimer(UINT nIDEvent)
CSasAPISrvs::StartGeneration ()
Prototype
HRESULT StartGeneration (BSTR gen_file_name, long gen_mode,
long loop_count, DeviceConfiguartionTypeEnum portConfig)
Usage
long lErrorCode =
(
Inputs
BSTR gen_file_name: String providing the full path name to the generation file
Long gen_mode:
Long loop_count:
DeviceConfigurationTypeEnum portConfig: Specifies the port configuration for
running the Trainer module along with the Analyzer or other engines.
See DeviceConfiguartiontype enums.
The parameter should contain theTrainer module. Otherwise, the method
returns an error code.
You can use one of the following configurations.