PROTOCOL SOLUTIONS GROUP
3385 SCOTT BLVD
SANTA CLARA, CA 95054
Application Program Interface (API)
Conquest
Manual
Version 7.40
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.
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
MethodDescription
SetPortSet hardware attached port.
IsHardwareStopedIs hardware stopped?
SaveOutFilesSave output file of last run project.
EnableProtocolErrorEnable or disable protocol errors by Type.
IsEnableProtocolErrorIs protocol error type enabled or not.
GetMaxMemorySizeGet the maximum size of memory.
AttachDeviceAttach device.
DetachDeviceDetach device.
SaveSmpAsTextSave 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 AlsoAPI 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 AlsoAPI 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 AlsoAPI 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 AlsoAPI 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 bysProtocolErrorType is
enabled. Otherwise, it returns false.
See AlsoAPI 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 AlsoAPI 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 AlsoAPI 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 AlsoAPI 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.
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 AlsoAPI 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 AlsoAPI 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 AlsoAPI 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 AlsoAPI 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 AlsoAPI Errors
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 AlsoAPI Errors
GetPAOutFile
Declaration:CString GetPAOutputFile()
Input(s):None
Return Value: Protocol Analyzer output file name
Remark:Specifies name of protocol analyzer output file.
SetTAOutFile
Declarationlong 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 AlsoAPI 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 AlsoAPI 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 AlsoAPI Errors
9
Loading...
+ 33 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.