beautypg.com

Open a saved target emulator, Modify an existing target emulator project – Teledyne LeCroy Sierra SAS_SATA Protocol Analyzer STX API Reference Manual User Manual

Page 101

background image


Sierra SAS/SATA Protocol Suite, STX Software API Reference Manual

Using Target/Device Emulator API Functions 101

Function Prototypes and Descriptions
(Refer to

Create Instances of the two objects just declared in the main class of your application

for prototype and description of CreateInstance ().)

Open a Saved Target Emulator

To open a saved Target Emulator Project, use the Load () function of the Target Emulator Engine

with file path string as its only parameter

m_pITargetEmulator->Load (bstrFilePathName);


Function Prototypes and Descriptions:

Prototype

HRESULT Load (BSTR bstrFileName, long* plRetVal);

Usage

-> Load (

name>);

Inputs

BSTR bstrFileName: Path of the project file

Long* plRetVal: Return value of the method specifying its success or failure

status

Return Value If this method succeeds, the return value equals to CEI_OK.

Otherwise, the return value equals the status error code.

Description Call the Load () method to open/load a saved target emulator project.

Modify an Existing Target Emulator Project

A Target emulator project has four main sections:

• Pages
• Error Injection
• User Defined Commands
• Settings

Modifying any of these sections, or their corresponding subsections or individual fields modifies

the entire Target Emulator Project. The following sections discuss how to modify Individual

Sections of a Target Emulator Project.

Modify Pages

To modify pages of a Target Emulator Project, edit the fields of each page that are NOT read-

only (writeable). Each edited new value of a field can be set using the SetFieldStream () or

SetIdentifyDeviceFieldStream () functions for SAS and SATA projects, respectively.
Example
In a Standard INQUIRY Data Page of a SAS Project, to change the RMB field to one (1), use: