LeCroy Conquest User Manual

PROTOCOL SOLUTIONS GROUP 3385 SCOTT BLVD SANTA CLARA, CA 95054
Application Program Interface (API)
Conquest
Manual
For Software Version 7.40
September 2008
Document Disclaimer
di spo s al and rec ycl ing r egulat ion s that vary by country and region. Many countr ies prohibit the disposal of wa ste elec tronic equip m ent in stan dar d waste receptacles. For more information about pr oper di spo s al and rec ycl ing of y our Ca t al yst product, please visit www.getcatalyst.com/recycle.
The information in this document has been carefully checked and is believed to be reliable. However, no responsibility can be assumed for inaccuracies that may not have been detected.
LeCroy reserves the right to revise the information in this document without notice or penalty.
Trademarks
LeCroy and Conquest are trademarks of LeCroy Corporation. Universal Serial Bus and On-The-Go are registered trademarks of USB-IF. Microsoft and Windows are registered trademarks, and Visual C++ and Visual Basic are trademarks, of
Microsoft Corporation. Borland and Delphi are trademarks of Borland Corporation.
All other trademarks and registered trademarks are property of their respective owners.
Copyright
Copyright ©2008 LeCroy Corporation. All rights reserved. This document may be printed and reprod uced withou t addition al permission, but all copies sh ould cont ain
this copyright notice.
Part number: 400-0066-001
WEEE Program
This elec t r onic product is su bject to
Contents
Introduction - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1
Using the Library - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1 Object Hierarchy - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1
IUsbGeneral Services Interface - - - - - - - - - - - - - - - - - - - - - - - - - - - 2
SetPort- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2 IsHardwareStoped - - - - - - - - - - - - - - - - - - - - - - - - - 2 SaveOutFiles- - - - - - - - - - - - - - - - - - - - - - - - - - - - 3 EnableProtocolError - - - - - - - - - - - - - - - - - - - - - - - - 3 IsEnableProtocolError - - - - - - - - - - - - - - - - - - - - - - - 3 GetMaxMemorySize - - - - - - - - - - - - - - - - - - - - - - - - 3 AttachDevice- - - - - - - - - - - - - - - - - - - - - - - - - - - - 3 AttachToDevice - - - - - - - - - - - - - - - - - - - - - - - - - - 4 GetDeviceIDList - - - - - - - - - - - - - - - - - - - - - - - - - - 4 DetachDevice - - - - - - - - - - - - - - - - - - - - - - - - - - - 4 SaveSmpAsText - - - - - - - - - - - - - - - - - - - - - - - - - - 4
IusbEasyDataCapturePrj Interface- - - - - - - - - - - - - - - - - - - - - - - - - 5
GetCaptureAndTrigger - - - - - - - - - - - - - - - - - - - - - - - 6 GetExerciser - - - - - - - - - - - - - - - - - - - - - - - - - - - - 6 GetSetting - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 6 Open- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 6 Save - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 7 Run - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 7 Stop - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 7 SetAnalyzerType - - - - - - - - - - - - - - - - - - - - - - - - - - 7 GetAnalyzerType- - - - - - - - - - - - - - - - - - - - - - - - - - 8 SetPAOutFile - - - - - - - - - - - - - - - - - - - - - - - - - - - 8 GetPAOutFile - - - - - - - - - - - - - - - - - - - - - - - - - - - 8 SetTAOutFile- - - - - - - - - - - - - - - - - - - - - - - - - - - - 8 GetTAOutFile - - - - - - - - - - - - - - - - - - - - - - - - - - - 8 SetPreTrigger - - - - - - - - - - - - - - - - - - - - - - - - - - - 9 GetPreTrigger - - - - - - - - - - - - - - - - - - - - - - - - - - - 9 SetEntireMemory- - - - - - - - - - - - - - - - - - - - - - - - - - 9 IsSetEntireMemory - - - - - - - - - - - - - - - - - - - - - - - - - 9 SetSamplesNo - - - - - - - - - - - - - - - - - - - - - - - - - - - 9 GetSamplesNo- - - - - - - - - - - - - - - - - - - - - - - - - - -10 SetRunExerciser - - - - - - - - - - - - - - - - - - - - - - - - - -10 IsSetRunExerciser - - - - - - - - - - - - - - - - - - - - - - - - -10
iii
Contents
CaptureAndTrigger - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 11
SetTriggerType - - - - - - - - - - - - - - - - - - - - - - - - - - 12 GetTriggerType - - - - - - - - - - - - - - - - - - - - - - - - - - 12 SetManualTrig- - - - - - - - - - - - - - - - - - - - - - - - - - - 12 IsSetManualTrig - - - - - - - - - - - - - - - - - - - - - - - - - - 12 SetTriggerDeviceAddress - - - - - - - - - - - - - - - - - - - - - 13 GetTriggerDeviceAddress - - - - - - - - - - - - - - - - - - - - - 13 SetTriggerEndPoint - - - - - - - - - - - - - - - - - - - - - - - - 13 GetTriggerEndPoint - - - - - - - - - - - - - - - - - - - - - - - - 13 SetTriggerDataPacket - - - - - - - - - - - - - - - - - - - - - - - 14 GetTriggerDataPacket - - - - - - - - - - - - - - - - - - - - - - - 14 SetDataCapture1 - - - - - - - - - - - - - - - - - - - - - - - - - 15 GetDataCapture1 - - - - - - - - - - - - - - - - - - - - - - - - - 15 SetDataCapture2 - - - - - - - - - - - - - - - - - - - - - - - - - 16 GetDataCapture2 - - - - - - - - - - - - - - - - - - - - - - - - - 16 SetDataCapture3 - - - - - - - - - - - - - - - - - - - - - - - - - 17 GetDataCapture3 - - - - - - - - - - - - - - - - - - - - - - - - - 17 ExcludeNakedTransactions - - - - - - - - - - - - - - - - - - - - 17 IsExcludeNakedTransactions - - - - - - - - - - - - - - - - - - - 18 ExcludeNYETedTransactions - - - - - - - - - - - - - - - - - - - 18 IsExcludeNYETedTransactions - - - - - - - - - - - - - - - - - - 18 ExcludeKeepAliveEvents - - - - - - - - - - - - - - - - - - - - - 18 IsExcludeKeepAliveEvents- - - - - - - - - - - - - - - - - - - - - 18 ExcludeSOFPackets- - - - - - - - - - - - - - - - - - - - - - - - 19 IsExcludeSOFPackets - - - - - - - - - - - - - - - - - - - - - - - 19 SetTimingPattern - - - - - - - - - - - - - - - - - - - - - - - - - 19 GetTimingPattern - - - - - - - - - - - - - - - - - - - - - - - - - 19
IExerciser - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20
AddCommand - - - - - - - - - - - - - - - - - - - - - - - - - - - 21 AddUserDefineCommand - - - - - - - - - - - - - - - - - - - - - 22 InsertCommand - - - - - - - - - - - - - - - - - - - - - - - - - - 23 InsertUserDefineCommand - - - - - - - - - - - - - - - - - - - - 24 DeleteCommand- - - - - - - - - - - - - - - - - - - - - - - - - - 24 DeleteAllCommands - - - - - - - - - - - - - - - - - - - - - - - - 25 SetStartOfLoop - - - - - - - - - - - - - - - - - - - - - - - - - - 25 SetEndOfLoop- - - - - - - - - - - - - - - - - - - - - - - - - - - 25 SetRepeatCommand - - - - - - - - - - - - - - - - - - - - - - - 25 FindDevice - - - - - - - - - - - - - - - - - - - - - - - - - - - - 26 GetFoundDevicesNo- - - - - - - - - - - - - - - - - - - - - - - - 26 GetDeviceEndPointsNo - - - - - - - - - - - - - - - - - - - - - - 26 GetEndPointType - - - - - - - - - - - - - - - - - - - - - - - - - 26 GetEndPointDirection - - - - - - - - - - - - - - - - - - - - - - - 27 GetEndPointNo - - - - - - - - - - - - - - - - - - - - - - - - - - 27
iv
Contents
IsDeviceHub - - - - - - - - - - - - - - - - - - - - - - - - - - - -27 SetStartExerciserWith - - - - - - - - - - - - - - - - - - - - - - -28
ISetting - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 29
SetAnalyzerSpeed - - - - - - - - - - - - - - - - - - - - - - - - -30 GetAnalyzerSpeed - - - - - - - - - - - - - - - - - - - - - - - - -30 SetExerciserLoopCounter - - - - - - - - - - - - - - - - - - - - -30 Get ExerciserLoopCounter - - - - - - - - - - - - - - - - - - - - -30 SetExternalTriggerType - - - - - - - - - - - - - - - - - - - - - -31 GetExternalTriggerType - - - - - - - - - - - - - - - - - - - - - -31 EnableNonStdClock - - - - - - - - - - - - - - - - - - - - - - - -31 IsEnableNonStdClock - - - - - - - - - - - - - - - - - - - - - - -31 SetNonStdClockRateType - - - - - - - - - - - - - - - - - - - - -31 GetNonStdClockRateType - - - - - - - - - - - - - - - - - - - - -32 EnableSecondPort - - - - - - - - - - - - - - - - - - - - - - - - -32 IsEnableSecondPort - - - - - - - - - - - - - - - - - - - - - - - -32 SetSecondPortStore - - - - - - - - - - - - - - - - - - - - - - - -32 GetSecondPortStore - - - - - - - - - - - - - - - - - - - - - - - -32 EnableHighSpeedTestMode - - - - - - - - - - - - - - - - - - - -33 IsEnableHighSpeedTestMode - - - - - - - - - - - - - - - - - - -33 SetInfiniteExerciserLoopCounter - - - - - - - - - - - - - - - - - -33 IsInfiniteExerciserLoopCounter - - - - - - - - - - - - - - - - - - -33
API Constants- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 34
Analyzer Type definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -34 Analyzer Speed definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 34 Trigger Items definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -34 Data Packet Type definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -35 Timing Analyzer Pattern Type definitions - - - - - - - - - - - - - - - - - - - - - - - - - - 35 Capturing Items definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 35 Exerciser Command Type definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - -36 HUB Features definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -36 HUB Port Features definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 36 Port definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -36 Protocol Error Type definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -37 External Trigger Type definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -37 Non Standard Clock Rate Type definitions - - - - - - - - - - - - - - - - - - - - - - - - -37 Second Port Capturing Items definitions - - - - - - - - - - - - - - - - - - - - - - - - - -37 Endpoint Type definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 38
v
Contents
Endpoint Direction Definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 38 Exerciser Start With event definition - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 38
API Errors - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 39 Exerciser Command Parameters - - - - - - - - - - - - - - - - - - - - - - - - - 40
vi
Introduction
IUSBEasyDataCapturePrj
IUSBGeneralService
IExerciser
ISetting
ICaptureAndTrigger
Introduction
The Conquest™ Application Program Interface (API) is a collection (library) of COM objects. The API enables programmers to use most of the Conquest Suite software functionality in their programs for the hardware, to execute a specific project with an event sequence and program selections. The software is for use with applications developed under
COM Supported Platforms such as Microsoft®Visual C++™, Borland®Delphi™, and Microsoft Visual Basic™.
Using the Library
To use the library:
1. Copy the Conquest SystemData folder into the system32 folder of the Windows directory of the PC.
2. Import usb.tlb into your software project.
3. Create a dispatch USBGeneralServices interface. See page 2.
Object Hierarchy
Objects are organized in a hierarchy of interfaces, with a set of methods for each.
4. Create a dispatch USBEasyDataCapturePrj interface. See page 5.
5. Use the API functions for required settings.
Note: You must run the Conquest Suite software before using the API.
Figure 1 Object Hierarchy Definition
1
IUsbGeneral Services Interface
IUsbGeneral Services Interface
Method Description
SetPort Set hardware attached port. IsHardwareStoped Is hardware stopped? SaveOutFiles Save output file of last run project. EnableProtocolError Enable or disable protocol errors by Type. IsEnableProtocolError Is protocol error type enabled or not. GetMaxMemorySize Get the maximum size of memory. AttachDevice Attach device. DetachDevice Detach device. SaveSmpAsText Save captured data in a text file.
SetPort
Declaration: long SetPort(short sPortType) Input(s): sPortType specifies hardware port type.
Valid port types are introduced in API Constants.
Return Value: Zero if the SetPort was successful. Otherwise, non-zero.
Each non-zero value indicates an error code.
Remark: This method sets the port type and connects the software to the
hardware.
See Also API Errors
IsHardwareStoped
Declaration: long IsHardwareStoped(BOOL* bIsStoped) Input(s): bIsStoped specifies hardware stop flag. Return Value: Zero if the IsHardwareStoped was successful. Otherwise, non-zero.
Each non-zero value indicates an error code.
Remark: This function sets bIsStoped to TRUE if hardware is stopped.
Otherwise, sets to FALSE. Returns error code if an error occurs.
See Also API Errors
2
IUsbGeneral Services Interface
SaveOutFiles
Declaration: longSaveOutFiles() Input(s): None Return Value: Zero if the SaveOutFiles was successful. Otherwise, non-zero.
Each non-zero value indicates an error code.
Remark: This method saves the output file for Protocol analyzer,
Timing analyzer, or both.
See Also API Errors
EnableProtocolError
Declaration: long EnableProtocolError(short sProtocolErrorType, BOOL bEnable) Input(s): sProtocolErrorType specifies type of protocol error.
Valid types are introduced in API Constants. bEnable specifies status of selected protocol error type.
Return Value: Zero if the EnableProtocolError was successful.
Otherwise, non-zero. Each non-zero value indicates an error code. Remark: Enables or disables a protocol error type. See Also API Errors
IsEnableProtocolError
Declaration: BOOL IsEnableProtocolError(short sProtocolErrorType) Input(s) sProtocolErrorType specifies the type of protocol error.
Valid types are introduced in API Constants. Return Value: Zero if IsEnableProtocolError was successful. Otherwise, non-zero.
Each non-zero value indicates an error code. Remark: Returns true if protocol error tspecified by sProtocolErrorType is
enabled. Otherwise, it returns false. See Also API Errors
GetMaxMemorySize
Declaration: long GetMaxMemorySize(long* lMaxSize) Input(s): lMaxSize specifies maximum available memory size. Return Value: Zero if GetMaxMemorySize was successful. Otherwise, non-zero.
Each non-zero value indicates an error code. Remark: This method sets lMaxSize to available memory size. See Also API Errors
AttachDevice
Declaration: long AttachDevice() Input(s): None Return Value: Zero if AttachDevice was successful. Otherwise, non-zero.
Each non-zero value indicates an error code. Remark: This function attaches the device to the analyzer. See Also API Errors
3
IUsbGeneral Services Interface
AttachToDevice
Declaration: long AttachToDevice(LPCTSTR lpctstrMacAddress) Input(s): lpctstrMacAddress specifies hardware MAC address. Return Value: Zero if AttachToDevice was successful. Otherwise, non-zero.
Each nonzero value indicates an error code.
Remark: This method attaches the software to the requested hardware
specified by its MAC address.
See Also API Errors
GetDeviceIDList
Declaration: BSTR GetDeviceIDList(long nPortType) Input(s): nPortType specifies hardware port type.
Valid port types are listed below.
Return Value: Each Device ID is separated with ',', and each Device ID number is in
hexadecimal format, such as "0200000E850002D8,0400000E85000131".
Remark: This method enumerates all available devices on the selected port
and returns available device IDs in string format.
CEIHAL_PORT_USB 0x02 CEIHAL_PORT_TCP 0x04 CEIHAL_PORT_EPP 0x08
DetachDevice
Declaration: long DetachDevice() Input(s): None Return Value: Zero if the DetachDevice was successful. Otherwise, non-zero.
Each non-zero value indicates an error code. Remark: This function detaches the device from the analyzer. See Also API Errors
SaveSmpAsText
Declaration: long SaveSmpAsText(LPCTSTR strSmpFilePath,
LPCTSTR strTextFilePath) Input(s): strSmpFilePath specifies path of sample file (.smp).
Return Value: Zero if the SaveSmpAsText was successful. Otherwise, non-zero.
Remark: This function converts smp file to text file and saves it. See Also: API Errors
strTextFilePath specifies path of out text file.
Each non-zero value indicates an error code.
4
IusbEasyDataCapturePrj Interface
IusbEasyDataCapturePrj Interface
This interface allows you to create an Easy Data Capture project or open and modify an existing Easy Data Project.
Method Description
GetCaptureAndTrigger Get capture and trigger interface. GetExerciser Get easy exerciser interface. GetSetting Get project setting interface. Open Open easy capture project (.ecp) file. Save Save easy capture project (.ecp) file. Run Run easy capture project. Stop Stop easy capture project. SetAnalyzerType Set analyzer type. GetAnalyzerType Get analyzer type. SetPAOutFile Set Protocol Analyzer output file name. GetPAOutFile Get Protocol Analyzer output file name. SetTAOutFile Set Timing Analyzer output file name. GetTAOutFile Get Timing Analyzer output file name. SetPreTriggger Set pre-trigger value. GetPreTriggger Get pre-trigger value. SetEntireMemmory Set use entire available memory. IsSetEntireMemmory Is use entire available memory set? SetSamplesNo Set capture samples number. GetSamplesNo Get capture samples number. SetRunExerciser Set run the easy exerciser. IsSetRunExerciser Is run the easy exerciser set?
5
IusbEasyDataCapturePrj Interface
GetCaptureAndTrigger
Declaration: ICaptureAndTrigger GetCaptureAndTrigger() Input(s): None Return Value: Capture and Trigger interface. Remark: Returns interface of CaptureAndTrigger object.
Do not use CreateDispatch to create CaptureAndTrigger interface.
GetExerciser
Declaration: IExerciser GetExerciser() Input(s): None Return Value: Exerciser interface Remark: Returns interface of Exerciser object.
Do not use CreateDispatch to create Exerciser interface.
GetSetting
Declaration: ISetting GetSetting() Input(s): None. Return Value Setting interface Remark: Returns interface of Setting object.
Do not use CreateDispatch to create Setting interface.
Open
Declaration: long Open(LPCTSTR strFilePath) Input(s): strFilePath specifies path to a file. Return Value: Zero if the open was successful. Otherwise, non-zero.
Each non-zero value indicates an error code. Remark: Opens easy capture project (.ecp) file. See Also API Errors
6
IusbEasyDataCapturePrj Interface
Save
Declaration: long Save(LPCTSTR strFilePath) Input(s): strFilePath points to the fully qualified path to save the file. Return Value: Zero if the save was successful. Otherwise, non-zero.
Each non-zero value indicates an error code. Remark: Saves current easy capture project (.ecp) file. See Also API Errors
Run
Declaration: long Run() Input(s): None Return Value Zero if project can run. Otherwise, non-zero.
Each non-zero value indicates an error code. Remark: Checks data entries before run and runs easy data capture project. See Also API Errors
Stop
Declaration: long Stop() Input(s): None Return Value: Zero if project can stop. Otherwise, non-zero.
Each non-zero value indicates an error code. Remark: Stops easy data capture project. See Also API Errors
SetAnalyzerType
Declaration: long SetAnalyzerType(short sAnalyzerType) Input(s): sAnalyzerType specifies type of analyzer.
Valid analyzer types are introduced in API Constants. Return Value: Error code or zero (no error) Remark: This attribute specifies type of analyzer. See Also API Errors
7
IusbEasyDataCapturePrj Interface
GetAnalyzerType
Declaration: short GetAnalyzerType() Input(s): None Return Value: Returns selected Analyzer type.
Valid analyzer types are introduced in API Constants.
Remark: Identifies type of analyzer.
SetPAOutFile
Declaration: long SetPAOutputFile(LPCTSTR strPAOutputFile) Input(s): strPAOutputFile specifies protocol analyzer output file name. Return Value: Error code or zero (no error) Remark: Specifies name of protocol analyzer output file. See Also API Errors
GetPAOutFile
Declaration: CString GetPAOutputFile() Input(s): None Return Value: Protocol Analyzer output file name Remark: Specifies name of protocol analyzer output file.
SetTAOutFile
Declaration long SetTAOutputFile(LPCTSTR strTAOutputFile) Input(s): strTAOutputFile specifies timing analyzer output file name. Return Value Error code or zero (no error) Remark: Specifies name of timing analyzer output file. See Also API Errors
GetTAOutFile
Declaration: CString GetTAOutputFile() Input(s): None Return Value: Timing Analyzer output file name Remark: Specifies name of timing analyzer output file.
8
IusbEasyDataCapturePrj Interface
SetPreTrigger
Declaration: long SetPreTrigger(short sPreTigger) Input(s): sPreTigger sets pre-trigger percent. It can be between 1 and 99. Return Value: Error code or zero (no error) Remark: Specifies pre-trigger percent.
Value of this attribute can be between 1 and 99. See Also API Errors
GetPreTrigger
Declaration: short GetPreTrigger() Input(s): None Return Value: Pre-trigger value. It is a short value between 1 and 99. Remark: Returns pre-trigger percent setting.
SetEntireMemory
Declaration: void SetEntireMemory(BOOL bEntireMemory) Input(s): bEntireMemory sets entire the memory for capturing. Output(s) None Return Value Error code or zero (no error) Remark: If set to TRUE, the system uses entire installed memory.
Otherwise, it uses number specified by SamplesNo.
IsSetEntireMemory
Declaration: BOOL IsSetEntireMemory() Input(s): None Return Value: Use entire memory flag status. Remark: Reports if entire memory flag is set.
SetSamplesNo
Declaration: long SetSamplesNo(long lSamplesNo) Input(s): lSamplesNo specifies the number of samples to capture. Return Value Error code or zero (no error) Remark: Specifies the number of samples to capture.
Note that if EntireMemory property has been set to FALSE, the
system uses this attribute. See Also API Errors
9
Loading...
+ 33 hidden pages