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
IusbEasyDataCapturePrj Interface
GetSamplesNo
Declaration:long GetSamplesNo()
Input(s):None
Output(s)None
Return Value Samples number
Remark:Returns the number of samples used in the capture.
SetRunExerciser
Declaration:void SetRunExerciser(BOOL bRun)
Input(s):bRun sets the run exerciser flag.
Outputs(s):None
Remark:If set to TRUE, exerciser also runs.
If set to FALSE, only analyzer runs.
IsSetRunExerciser
Declaration:BOOL IsSetRunExerciser()
Input(s):None
Return Value Run exerciser flag status.
Remark:If set to TRUE, exerciser is set to run.
If it set to FALSE, only analyzer is set to run.
10
CaptureAndTrigger
CaptureAndTrigger
This interface sets the Easy Capture Project parameters (for example, Trigger point and
capture data). (This is equivalent to Data Captur e And T rigger page in Easy capture project in
the software).
When you instantiate the IEsbEasyDataCapturePrj interface, the ICaptureAndTrigger
interface instantiates automatically in IEsbEasyDataCapturePrj.
You can get ICaptureAndTrigger interface from IEsbEasyDataCapturePrj by calling the
IEsbEasyDataCapturePrj ::GetCaptureAndTrigger method.
MethodDescription
SetTriggerTypeSet trigger type.
GetTriggerTypeGet trigger type.
SetManualTrigSet trigger manually.
IsSetManualTrigIs set to trigger manually?
SetTriggerDeviceAddressSet trigger device address.
GetTriggerDeviceAddressGet trigger device address.
SetTriggerEndPointSet trigger endpoint.
GetTriggerEndPointGet trigger endpoint.
SetTriggerDataPacketSet trigger data packet type.
GetTriggerData PacketGet trigger data packet type.
SetDataCapture1Set data capture item 1.
GetDataCapture1Get data captur e ite m 1.
SetDataCapture2Set data capture item 2.
GetDataCapture2Get data captur e ite m 2.
SetDataCapture3Set data capture item 3.
GetDataCapture3Get data captur e ite m 3.
ExcludeNakedTransactionsExclude NAK’ed transactions from capturing.
IsExcludeNakTransactionsAre NAK’ed transactions excludedfrom capturing?
ExcludeNYETedTransactionsExclude NYET’ed transactions from capturing.
IsExcludeNYETedTransactionsAre NYET’ed transactions excluded from capturing?
ExcludeKeepAliveEventsExclude Keep Alive events from capturing.
IsExcludeKeepAliveEventsIs exclude Keep Alive events from capturing
11
CaptureAndTrigger
ExcludeSOFPacketsExclude SOF packets from capturing.
IsExcludeSOFPacketsAre Keep SOF packets excluded from capturing?
SetTimmingPatternSet timing analyzer pattern.
GetTimmingPatternGet timing analyzer pattern.
SetTriggerType
Declaration:long SetTriggerType(short sTriggerType)
Input(s):sTriggerType specifies type of USB object on which to trigger the
hardware. Valid trigger types are in API Constants.
Return Value: Error code or zero (no error)
Remark:Sets trigger type. Trigger types are as same as Trigger combo
contents on Easy page.
See AlsoAPI Errors
GetTriggerType
Declaration:short GetTriggerType()
Input(s)None
Return Value Type of USB object on which the hardware is set to trigger
Remark:Returns trigger type.
SetManualTrig
Declaration:void SetManualTrig(BOOL bManualTrig)
Input(s):bManualTrig sets use of manual trigger in place of trigger type.
Return Value None
Remark:Sets the hardware to respond to manual trigger.
IsSetManualTrig
Declaration:BOOL IsSetManualTrig()
Input(s)None
Return Value Status of manual trig flag
Remark:Reports if the hardware is set to trigger manually.
12
SetTriggerDeviceAddress
Declaration:long SetTiggerDeviceAddress(LPCTSTR strDeviceAddress)
Input(s):strDeviceAddress specifies device address of trigger item.
Length of this parameter is 7 characters in binary mode, where each
character is one of 0, 1, x, or X (as do not care).
Return Value Error code or zero (no error)
Remark:Sets the device address on which to trigger.
Note that the passed device address must be exclusive with the
trigger type that is specified with the SetTrigger method beforehand.
See AlsoAPI Errors
GetTriggerDeviceAddress
Declaration:CString GetTriggerDeviceAddress()
Input(s):None
Return Value: Device address of trigger item.
Length of this parameter is 7 characters in binary mode, where each
character is one of 0, 1, x, or X (as do not care).
CaptureAndTrigger
Remark:Returns device address of trigger item.
SetTriggerEndPoint
Declaration:long SetTriggerEndPoint(LPCTSTR strEndPoint)
Input(s)strEndPoint specifies end point of trigger item.
Return Value: Error code or zero (no error)
Remark:This method sets endpoint of trigger item.
See AlsoAPI Errors
GetTriggerEndPoint
Declaration:CString GetTriggerEndPoint()
Input(s):None
Return Value: Endpoint number of trigger item
Remark:Returns endpoint of trigger item.
See AlsoAPI Errors
Input(s):sDataPacketType sets data packet type. Valid data packe t types are
presented in API Constants.
strData specifies data payload of data packet.
bIsDataBlock specifies strData is data block item name or not.
Return Value: Error code or zero (no error)
Remark:Sets type and data of data packet on which to trigger.
Note:To trigger on data packet, set trigger type to data packet by calling
the SetTrigger function with the API_TRIG_DATA_PACKETS
parameter.
Input(s):sCaptureType specifies type of capture item 2.
Return Value Error code or zero (no error)
Remark:Identifies the type of data, device address, and endpoint number of
strDeviceAddress, LPCTSTR strEndPoint)
Valid capture item types are in API Constants.
strDeviceAddress specifies device address of capture item if
capture type is one of transaction types.
strEndPoint specifies endpoint of capture item if capture type is one
of transaction types.
data on which to capture. T ype of data can be a value specified in the
Data Capture combo box on the Easy data capture page. If type of
data is set to everything or any transaction, the give n device address
and endpoint number do have not any effect.
Declaration:BOOL IsExcludeNAKedTransactions()
Input(s):None
Return Value: Status of exclude NAK’ed transactions flag
Remark:Returns TRUE if exclude Nak transactions flag is selected.
Returns FALSE if not.
ExcludeNYETedTransactions
Declaration:void ExcludeNYETedTransactions(BOOL bExclude)
Input(s):bExclude sets exclude
Return Value None
Remark:Excludes NYET transactions if TRUE.
Includes NYET transactions if FALSE.
NYET’ed transactions flag.
IsExcludeNYETedTransactions
Declaration:BOOL IsExcludeNYETedTransactions()
Input(s):None
Return Value: Status of exclude NYET’ed transactions flag.
Remark:Returns TRUE if exclude NYETed transactions flag is selected.
Returns FALSE if not.
ExcludeKeepAliveEvents
Declaration:void ExcludeKeepAliveEvents(BOOL bExclude)
Input(s)bExclude sets exclude KeepAlive events flag.
Return Value None
Remark:Excludes KeepAlive events if TRUE.
Includes KeepAlive events if FALSE.
IsExcludeKeepAliveEvents
Declaration:BOOL IsExcludeKeepAliveEvents()
Input(s):None
Return Value: Status of exclude KeepAlive Events flag
Remark:TRUE if exclude KeepAlive Events flag is set.
FALSE if not.
18
ExcludeSOFPackets
Declaration:void ExcludeSOFPackets(BOOL bExclude)
CaptureAndTrigger
Input(s):bExclude sets exclude
Return Value: None
Remark:Excludes SOF packets if set to TRUE.
Includes SOF packets when set to FALSE.
SOF packets flag.
IsExcludeSOFPackets
Declaration:BOOL IsExcludeSOFPackets()
Input(s):None
Return Value: Status of exclude SOF Packets flag
Remark: TRUE if exclude SOF Packets flag is set.
StrPattern sets timing analyzer pattern. Length of this pattern for
full speed patterns is eight characters, and for high-speed patt erns is
four characters. Each character can be 0, 1, x, or X.
Return Value Error code or zero (no error)
Remark:Sets timing patterns for timing analyzer.
See AlsoAPI Errors
Valid types are in API Constants.
Return Value: Pattern of specified pattern type
Remark:Returns pattern of specified timing analyzer pattern type.
19
IExerciser
IExerciser
This interface creates an exerciser program for an easy data capture project(This
isequivalent to the Exerciser page in an Easy capture project in the software).
When you instantiate the IEsbEasyDataCapturePrj interface, the IExerciser interface
instantiates automatically in IEsbEasyDataCapturePrj.
You can get the IExerciser interface from IEsbEasyDataCapturePrj by calling
IEsbEasyDataCapturePrj ::GetExerciser method.
MethodDescription
AddCommandAdd exerciser command.
AddUserDefineCommandAdd exerciser user-defined command.
InsertCommandInsert exerciser command.
InsertUserDefineCommandInsert exerciser user-defined command.
DeleteCommandDelete exerciser command.
DeleteAllCommandsDelete allexerciser commands.
SetStartOfLoopSet exerciser command to start of loop.
SetEndOfLoopSet exerciser command to end of loop.
SetRepeatCommandSet exerciser command to re pea t .
FindDeviceFind attached devices.
GetFoundDevicesNoGet found devices number.
GetDeviceEndPointsNoGet endpoints number of a device.
GetEndPointTyp eGet type of endpoint.
GetEndPointDirectionGet direction of an endpoint.
GetEndPointNoGet number of an endpoint.
IsDeviceHubIs device HUB?
SetStartExerciserWithSet exerciser start event type.
20
AddCommand
Declaration:long AddCommand(short sCommandType, short sDeviceIndex,
const VARIANT& vtParam1, const VARIANT& vtParam2,
const VARIANT& vtParam3)
Input(s):sCommandType selects the exerciser command type that you want
to send to the device.
Valid command types are in API Constants.
sDeviceIndex sets the found device index.
vtParam1 sets the first parameter of exerciser command.
vtParam2 sets the second parameter of exerciser command.
vtParam3 sets the third parameter of exerciser command.
Return Value: Error code or zero (no error)
Remark:Adds a command to exerciser program. A command can use none,
one, or more parameters defined in Exerciser Command
Parameters.
IExerciser
See AlsoAPI Errors
21
IExerciser
AddUserDefineCommand
Declaration:long AddUserDefineCommand(short sS peed, short sDeviceAddress,
short sEndpointNo, short sEndpointType, short sCommandType,
const VARIANT& vtParam1, const VARIANT& vtParam2,
const VARIANT& vtParam3)
Input(s):sSpeed sets speed of device.
Valid speed types are in API Constants.
sDeviceAddress sets device address of the device.
sEndpointNo sets endpoint number.
sEndpointType sets type of the endpoint.
Valid endpoint type arein API Constants.
sCommandType sets the exerciser command type that you want to
send to the device.
Valid command types are in API constants.
sDeviceIndex specifies device index.
vtParam1 specifies the first parameter of the exerciser command.
vtParam2 specifies the second parameter of the exerciser
command.
vtParam3 specifies the third parameter of the exerciser command.
Return Value Error code or zero (no error).
Remark:Adds a user-defined command to the exerciser program. A
command can use none, one, or more parameters defined in
Exerciser Command Parameters
See AlsoAPI Errors
22
InsertCommand
Declaration:long InsertCommand(short sInsertAt, short sCommandType,
Input(s):sInsertAt sets index of exerciser command for this command.
sCommandType sets exerciser command type that you want to
send to the device. Valid types are defined in API Constants.
sDeviceIndex sets device index.
vtParam1 sets first parameter of the exerciser command.
vtParam2 sets second parameter of the exerciser command.
vtParam3 setsthird parameter of the exerciser command.
Return Value Error code or zero (no error)
Remark:Adds a command to the exerciser program. A command can use
none, one, or more parameters defined in
Exerciser Command Parameters.
IExerciser
See AlsoAPI Errors
23
IExerciser
InsertUserDefineCommand
Declaration:long InsertUserDefineCommand(short sInsertAt, short sSpeed,
short sDeviceAddress, short sEndpointNo, short sEndpointType,
short sCommandType, const VARIANT& vtParam1,
const VARIANT& vtParam2, const VARIANT& vtParam3)
Input(s)sInsertAt sets index of exerciser command fo which this command
inserts a replacement.
sSpeed sets speed of device.
Valid speed types are in API Constants.
sDeviceAddress sets device address.
sEndpointNo sets endpoint number.
sEndpointType sets type of the endpoint.
Valid endpoint type are in API Constants.
sCommandType sets exerciser command type that you want to
send to the device. Valid types are defined in API Constants.
sDeviceIndex sets device index.
vtParam1 sets first parameter of the exerciser command.
vtParam2 sets second parameter of the exerciser command.
vtParam3 sets third parameter of the exerciser command.
Return Value: Error code or zero (no error)
Remark:Adds a user-defined command to the exerciser program. A
command can use none, one, or more parameters defined in
Exerciser Command Parameters.
See AlsoAPI Errors
DeleteCommand
Declaration:long DeleteCommand(short sCommandIndex)
Input(s):sCommandIndex is index of exerciser command.
Return Value: Error code or zero (no error)
Remark:Deletes specified exerciser command (with index) from exerciser
program.
See AlsoAPI Errors
24
DeleteAllCommands
Declaration:long DeleteAllCommands()
Input(s):None
Return Value: Error code or zero (no error)
Remark:Deletes all exerciser commands from exerciser program.
See AlsoAPI Errors
SetStartOfLoop
Declaration:long SetStartOfLoop(short sCommandIndex, long bSet)
Input(s):sCommandIndex sets index of exerciser command.
bSet sets status of start of loop flag for exerciser command.
Return Value: Error code or zero (no error)
Remark:Sets a specified command (with Index) as start of a loop.
IExerciser
See AlsoAPI Errors
SetEndOfLoop
Declaration:long SetEndOfLoop(short sCommandIndex, long bSet)
Input(s):sCommandIndex sets index of exerciser command.
bSet sets status of end of loop flag of exerciser command.
Return Value: Error code or zero (no error)
Remark:Sets a specified command (with Index) as end of a loop.
See Also:API Errors
SetRepeatCommand
Declaration:long SetRepeatCommand(short sCommandIndex, long bSet)
Input(s):sCommandIndex sets index of exerciser command.
bSet sets status of repeat flag of exerciser command.
Return Value: Error code or zero (no error)
Remark:Sets a specified command (with index) to repeat loop.
See Also:API Errors
25
IExerciser
FindDevice
Declaration:long FindDevice()
Inputs:None
Return Value: Error code or zero (no error)
Remark:This function finds any devices that are attached to the exerciser.
See Also:API Errors
GetFoundDevicesNo
Declaration:short GetFoundDevicesNo()
Input(s):None
Return Value: Number of devices found
Remark:This function returns the number of devices found.
Note:Use this function after a call to the FindDevice function.
sEndPointsNo sets the number of endpoints of the device and fills in
the function if the device index exists.
Return Value: Error code or zero (no error)
Remark:This function fills sEndPointsNo if the passed device index exists.
See AlsoAPI Errors
GetEndPointType
Declaration:long GetEndPointType(short sDeviceIndex, short sEndPointIndex,
short* sEndpointType)
Input(s):sDeviceIndex sets index of found device.
sEndPointIndex sets index of endpoint of a found device.
sEndpointType sets endpoint type of specified endpoint. This
parameter fills if the device index and endpoint index exist.
Return Value: Error code or zero (no error)
Remark:This function fills sEndPointT ype if passed device index and end point
Input(s):sDeviceIndex specifies the index of found device.
sEndPointIndex specifies the index of endpoint of a found device.
sDirection specifies direction of specified endpoint. This parameter
fills if device index and endpoint index exist.
Return Value: Error code or zero (no error)
Remark:This function fills sDirection if passed device index and endpoint
index exist.
See AlsoAPI Errors
GetEndPointNo
Declaration:long GetEndPointNo(short sDeviceIndex, short sEndPointIndex,
short* sEndpointNo)
IExerciser
Input(s):sDeviceIndex specifies the index of found device.
sEndPointIndex specifies the index of endpoint of a found device.
sEndpointNo specifies the number of the specified endpoint. This
parameter fills if device index and endpoint index exist.
Return Value: Error code or zero (no error)
Remark:This function fills sEndpointNo if passed device index and endpoint
index exist.
See Also:API Errors
IsDeviceHub
Declaration:long IsDeviceHub(short sDeviceIndex, BOOL* bIsHub)
Input(s):sDeviceIndex specifies index of found device.
bIsHub specifies whether the device is a hub. This parameter fills if
device index exists.
Return Value: Error code or zero (no error)
Remark:This function fills bIsHub if passed device index exists.
See Also:API Errors
27
IExerciser
SetStartExerciserWith
Declaration:long SetStartExerciserWith(short sEventType)
Input(s):sEventType specifies type of event with which the exerciser starts.
Valid types are in API Constants.
Return Value: Error code or zero (no error)
Remark:This function sets the type of exerciser start event.
See Also:API Errors
28
ISetting
ISetting
This interface sets values of a project. (This is an equivalent to Setting page in Easy (or
Advance) capture project in the software).
When you instantiate the IEsbEasyDataCapturePrj interface, the ISetting interface
instantiates automatically in IEsbEasyDataCapturePrj .
You can get the ISetting interface from IEsbEasyDataCapturePrj by calling
IEsbEasyDataCapturePrj::GetSetting method.
MethodDescription
SetAnalyzerSpeed Set analyzer speed.
GetAnalyzerSpeedGet analyzer speed.
SetExerciserLoopCounterSet exerciser loop counter.
GetExerciserLoopCounterGet exerciser loop counter.
SetExternalTriggerTypeSet external trigger type.
GetExternalTriggerTypeGet external trigger type.
EnableNonStdClockEnable non-standard clock.
IsEnableNonStdClockIs non standard clock enabled?
SetNonStdClockRateTypeSet non-standard clock rate type.
GetNonStdClockRateTypeGet non-standard clock rate type.
EnableSecondPortEnable second port.
IsEnableSecondPortIs second port enabled?
SetSecondPortStoreSet second port store type.
GetSecondPortStoreGet second port store type.
EnableHighSpeedTestModeEnable high-speed test mode.
IsEnableHighSpeedTestModeIs high-speed test mode enabled?
SetInfiniteExerciserLoopCounterSet exerciser loop counter to infinite.
IsInfiniteExerciserLoopCounterIs exerciser loop counter set to infinite?
29
ISetting
SetAnalyzerSpeed
Declaration:long SetAnalyzerSpeed(short sAnalyzerSpeed)
Input(s):sAnalyzerSpeed sets the speed of the analyzer.
Return Value: Zero if the SetAnalyzerSpeed was successful. Otherwise, non-zero.
Remark:This function sets the speed of the analyzer.
See Also:API Errors
GetAnalyzerSpeed
Declaration:short GetAnalyzerSpeed()
Input(s):None
Return Value: Speed type of the analyzer.
Valid analyzer speed types are defined in API Constants.
Each non-zero value indicates an error code.
Valid analyzer speed types are defined in API Constants.
Remark:This function returns the speed of the analyzer.
SetExerciserLoopCounter
Declaration:long SetExerciserLoopCounter(short sLoopCounter)
Input(s):sLoopCounter sets loop counter of exerciser. This value can be
between 2 and 255.
Return Value:
Remark:This function sets the loop counter of the exerciser.
See AlsoAPI Errors
Zero if the SetExerciserLoopCounter was successful.
Otherwise, non-zero. Each non-zero value indicates an error code.
Get ExerciserLoopCounter
Declaration:short GetExerciserLoopCounter ()
Input(s)None
Return Value: Loop counter of the exerciser
Remark:Returns the loop counter of the exerciser.
See Also:API Errors
Valid external trigger types are defined in API Constants.
Return Value: Zero if the SetExternalTriggerType was successful.
Otherwise, non-zero. Each non-zero value indicates an error code.
Remark:Sets the external trigger type.
See Also:API Errors
GetExternalTriggerType
Declaration:short GetExternalTriggerType()
Input(s):sTriggerType is external trigger type.
Return Value: External trigger type
Remark:This function returns external trigger type.
ISetting
See Also:API Errors
EnableNonStdClock
Declaration:void EnableNonStdClock(BOOL bEnable)
Input(s):bEnable sets status of non-standard clock flag.
Return Value: None
Remark:This function enables (disables) the non-standard clock.
IsEnableNonStdClock
Declaration:BOOL IsEnableNonStdClock()
Input(s):None
Return Value: Status of the non-standard clock flag
Remark:This function returns the non-standard clock status.
SetNonStdClockRateType
Declaration:long SetNonStdClockRateType(short sClockRateType)
Input(s):sClockRateType sets the non-standard clock rate.
Valid types are defined in API Constants.
Return Value: Zero if the SetNonStdClockRate was successful.
Otherwise, non-zero. Each non-zero value indicates an error code.
Remark:This function sets rate of the non-standard clock.
See Also:API Errors
Remark:This function returns the type of non-standard clock rate.
EnableSecondPort
Declaration:void EnableSecondPort(BOOL bEnable)
Input(s):bEnable set status of second port.
Return Value: None
Remark:This function enables (disables) second port.
IsEnableSecondPort
Declaration:BOOL IsEnableSecondPort()
Input(s):None
Return Value: TRUE if second port is enabled. Otherwise, returns FALSE.
Remark:This function returns status of second port.
SetSecondPortStore
Declaration:long SetSecondPortStore(short sStoreType)
Input(s):sStoreType sets the second port store type.
Valid types are defined in API Constants.
Return Value: Zero if the SetSecondPortStore was successful.
Otherwise, non-zero. Each non-zero value indicates an error code.
Remark:This function sets the second port store type.
See Also:API Errors
GetSecondPortStore
Declaration:short GetSecondPortStore()
Input(s):None
Return Value: Second port store type. Valid types are defined in API Constants.
Remark:This function returns the second port store type.
32
EnableHighSpeedTestMode
Declaration:void EnableHighSpeedTestMode(BOOL bEnable)
Input(s):bEnable sets status of the high-speed test mode flag.
Return Value: None
Remark:This function enables (disables) the high-speed test mode.
IsEnableHighSpeedTestMode
Declaration:BOOL IsEnableHighSpeedTestMode()
Input(s):None
Return Value: Status of high-speed test mode flag
Remark:This function returns the status of the high-speed test mode flag.
Input(s):bInfinite sets exerciser loop counter to infinite or finite value.
Return Value: None
Remark:This function sets the exerciser loop counter to infinite or finite count.
IsInfiniteExerciserLoopCounter
Declaration:BOOL IsInfiniteExerciserLoopCounter()
Input(s):None
Return Value: Status of exerciser loop counter
Remark:This function returns exerciser loop counter setting.
33
API Constants
API Constants
Pre-defined API constants are in the SBAEAPIConstants.h file The following constants are
used as parameters by some functions.
API_MAX_HUB_PORT_FEATURES9
API_HUB_FEATURE_CONNECTION0 // port connection
API_HUB_FEATURE_ENABLE1 // port enable
API_HUB_FEATURE_SUSPEND2 // port suspend
API_HUB_FEATURE_OVER_CURRENT3 // port over current
API_HUB_FEATURE_RESET4 // port reset
API_HUB_FEATURE_POWER5 // port power
API_HUB_FEATURE_LS6 // port low speed
API_HUB_FEATURE_TEST7 // port test
API_HUB_FEATURE_INDICATOR8 // port indicator
API_MAX_PROTOCOL_ERROR_TYPES13
API_PE_BIT_STUFF0
API_PE_PID_CHECK1
API_PE_PID_UNKNOWN2
API_PE_SYNCH3
API_PE_CRC54
API_PE_CRC165
API_PE_FRAME_LEN6
API_PE_BABBLE7
API_PE_DATA_TOGGLE8
API_PE_FALSE_EOP9
API_PE_ACT_LOSS10 // loss of activity
API_PE_TIME_OUT11
API_PE_BUS_ERR12 //bus error
External Trigger Type definitions
API_MAX_EXTERNAL_TRIGGER_TYPE5
API_EXT_TRG_MASK0 // No external trigger
API_EXT_TRG_LEVEL_11 // Trigger on level one of signal
API_EXT_TRG_LEVEL_02 // Trigger on level zero of signal
API_EXT_TRG_EDGE_P3 // Trigger on positive edge of signal
API_EXT_TRG_EDGE_N4 // Trigger on negative edge of signal
The following exerciser commands require no parameters. These commands do not use
vtParam1, vtParam2, and vtParam3.
•API_EXR_COMMAND_GET_CONFIGURATION
•API_EXR_COMMAND_GET_INTERFACE
•API_EXR_COMMAND_GET_HUB_CLASS_DESCRIPTOR
•API_EXR_COMMAND_GET_HUB_STATUS
•API_EXR_COMMAND_CLEAR_HUB_TT_BUFFER
•API_EXR_COMMAND_GET_HUB_TT_STATUS
•API_EXR_COMMAND_STOP_HUB_TT
40
Exerciser Command Parameters
The following exerciser commands use vtParam1:
API_EXR_COMMAND_GET_DESCRIPTOR - vtParam1 should be a short variable that
identifies descriptor type. Valid descriptor types are Device Descriptor and Configuration
Descriptor.
API_EXR_COMMAND_SET_ADDRESS - vtParam1 should be a short variable that identifies
new device address.
API_EXR_COMMAND_SET_CONFIGURATION - vtParam1 should be a short variable that
identifies configuration value.
API_EXR_COMMAND_CLEAR_HUB_FEATURE - vtParam1 should be a short variable that
identifies selector type. (Valid selectors are in API Constants.)
API_EXR_COMMAND_SET_HUB_ FEATURE - vtParam1 should be a short variable that
identifies selector type. (Valid selectors are in API Constants.)
API_EXR_COMMAND_CLEAR_HUB_PORT_FEATURE - vtParam1 should be a short
variable that identifues selector type. (V alid selectors are in API Constants.) vtParam2 should
be a short variable that identifies port number.
API_EXR_COMMAND_SET_HUB_ PORT_FEATURE - vtParam1 should be a short variable
that identifies selector type. (Valid selectors are in API Constants.)
vtParam2 should be a short variable that identifies port number.
API_EXR_COMMAND_DATA_OUT - vtParam1 should be a short variable that identifies
endpoint index of selected device index. vtParam2 should be a string variable that identifes
data to be output. This data is in hexadecimal base, and if it is a data block, should be the
data block name. vtParam3 should be a boolean variable that identifies whether data is a
data block item.
API_EXR_COMMAND_DATA_IN - vtParam1 should be a short variable that identifies
endpoint index of selected device index.
41
Exerciser Command Parameters
42
Loading...
+ 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.