Error injection on packets of target emulator – Teledyne LeCroy Sierra SAS_SATA Protocol Analyzer STX API Reference Manual User Manual
Page 103
Sierra SAS/SATA Protocol Suite, STX Software API Reference Manual
Using Target/Device Emulator API Functions 103
Error Injection on Packets of Target Emulator
To inject errors on the packets, frames, or events of a Target Emulator project, first define a
variable for the Target Emulator Error Injection Interface, and then query the interface for its
instantiation.
ITargetEmulatorErrorInjectionPtr
m_pITargetEmulatorErrorInjection;
m_pITargetEmulator.QueryInterface
(
__uuidof
(ITargetEmulatorErrorInjection),
(
void
**)&m_pITargetEmulatorErrorInjection);
Next set a Data Block using SetDataBlock () of the Emulator Engine:
m_pITargetEmulatorErrorInjection->SetDataBlock
(theApp.m_pDataBlocks);
CTartgetEmulEngine::QueryInterface ()
Prototype
HRESULT QueryInterface (REFIID riid, void** ppv);
Usage
Name>), Inputs REFIID riid: ID of a reference object of an Interface Void** ppv: Void reference to hold the instantiated address of the interface Return Value None long SetDataBlock (IDataBlocks *pIDB); Usage ( Inputs IDataBlocks* pIDB: Pointer to an Interface of CDataBlocks of DBELib Return Value None
Description Call QueryInterface () to query the Target Emulator Error Injection Interface.
CTartgetEmulEngine::SetDataBlock ()
Prototype
Description Call SetDataBlock () method to set a DataBlocks interface for engine.