Page 1
ROTOCOL OLUTIONS ROUP 3385 S COTT , CA 95054 ANTA LARA Conquest Application Program Interface (API) Manual Version 7.40 For Software Version 7.40 September 2008...
Page 2
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.
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.
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.
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:...
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.
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.
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.
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 Declaration:...
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.
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...
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.
CaptureAndTrigger CaptureAndTrigger This interface sets the Easy Capture Project parameters (for example, Trigger point and capture data). (This is equivalent to Data Capture And Trigger page in Easy capture project in the software). When you instantiate the IEsbEasyDataCapturePrj interface, the ICaptureAndTrigger interface instantiates automatically in IEsbEasyDataCapturePrj.
CaptureAndTrigger ExcludeSOFPackets Exclude SOF packets from capturing. IsExcludeSOFPackets Are Keep SOF packets excluded from capturing? SetTimmingPattern Set timing analyzer pattern. GetTimmingPattern Get timing analyzer pattern. SetTriggerType Declaration: long SetTriggerType(short sTriggerType) Input(s): sTriggerType specifies type of USB object on which to trigger the hardware.
CaptureAndTrigger 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.
CaptureAndTrigger SetTriggerDataPacket Declaration: long SetTriggerDataPacket(short sDataPacketType, LPCTSTR strData, BOOL bIsDataBlock) Input(s): sDataPacketType sets data packet type. Valid data packet 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.
CaptureAndTrigger SetDataCapture1 Declaration: long SetDataCapture1(short sCaptureType, LPCTSTR strDeviceAddress, LPCTSTR strEndPoint) Input(s): sCaptureType specifies type of capture item 1. 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.
CaptureAndTrigger SetDataCapture2 Declaration: long SetDataCapture2(short sCaptureType, LPCTSTR strDeviceAddress, LPCTSTR strEndPoint) Input(s): sCaptureType specifies type of capture item 2. 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.
CaptureAndTrigger SetDataCapture3 Declaration: long SetDataCapture3(short sCaptureType, LPCTSTR strDeviceAddress, LPCTSTR strEndPoint) Input(s): sCaptureType specifies type of capture item 3. 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.
CaptureAndTrigger ExcludeSOFPackets Declaration: void ExcludeSOFPackets(BOOL bExclude) Input(s): bExclude sets exclude flag. SOF packets Return Value: None Remark: Excludes SOF packets if set to TRUE. Includes SOF packets when set to FALSE. IsExcludeSOFPackets Declaration: BOOL IsExcludeSOFPackets() Input(s): None Return Value: Status of exclude SOF Packets flag Remark: TRUE if exclude SOF Packets flag is set.
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.
IExerciser 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.
IExerciser AddUserDefineCommand Declaration: long AddUserDefineCommand(short sSpeed, 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.
IExerciser InsertCommand Declaration: long InsertCommand(short sInsertAt, short sCommandType, short sDeviceIndex, const VARIANT& vtParam1, const VARIANT& vtParam2, const VARIANT& vtParam3) 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.
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.
IExerciser DeleteAllCommands Declaration: long DeleteAllCommands() Input(s): None Return Value: Error code or zero (no error) Remark: Deletes all exerciser commands from exerciser program. See Also API 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.
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.
IExerciser GetEndPointDirection Declaration: long GetEndPointDirection(short sDeviceIndex, short sEndPointIndex, short* sDirection) 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...
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...
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.
ISetting SetAnalyzerSpeed Declaration: long SetAnalyzerSpeed(short sAnalyzerSpeed) Input(s): sAnalyzerSpeed sets the speed of the analyzer. Valid analyzer speed types are defined in API Constants. Return Value: Zero if the SetAnalyzerSpeed was successful. Otherwise, non-zero. Each non-zero value indicates an error code. Remark: This function sets the speed of the analyzer.
ISetting SetExternalTriggerType Declaration: long SetExternalTriggerType(short sTriggerType) Input(s): sTriggerType sets external trigger type. 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...
ISetting GetNonStdClockRateType Declaration: short GetNonStdClockRateType() Input(s): None Return Value: Non-standard clock rate type. Valid types are defined in API Constants. 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.
ISetting 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.
API Constants API Constants Pre-defined API constants are in the SBAEAPIConstants.h file The following constants are used as parameters by some functions. Analyzer Type definitions API_MAX_ANLYZER_TYPES API_ANLYZER_TYPE_PA 0 //Protocol Analyzer API_ANLYZER_TYPE_TA 1 //Timing Analyzer API_ANLYZER_TYPE_BOTH Analyzer Speed definitions API_MAX_ANLYZER_SPEEDS API_ANLYZER_SPEED_HIGH API_ANLYZER_TYPE_FULL_LOW API_ANLYZER_TYPE_AUTO Trigger Items definitions...
API Constants Protocol Error Type definitions API_MAX_PROTOCOL_ERROR_TYPES API_PE_BIT_STUFF API_PE_PID_CHECK API_PE_PID_UNKNOWN API_PE_SYNCH API_PE_CRC5 API_PE_CRC16 API_PE_FRAME_LEN API_PE_BABBLE API_PE_DATA_TOGGLE API_PE_FALSE_EOP API_PE_ACT_LOSS 10 // loss of activity API_PE_TIME_OUT API_PE_BUS_ERR 12 //bus error External Trigger Type definitions API_MAX_EXTERNAL_TRIGGER_TYPE API_EXT_TRG_MASK 0 // No external trigger API_EXT_TRG_LEVEL_1 1 // Trigger on level one of signal API_EXT_TRG_LEVEL_0 2 // Trigger on level zero of signal...
API Errors Error codes are in the SBAEAPIErrors.h file. They are returned by some functions upon an error condition. IDE_NO_ERROR IDE_INVALID_PORT_NO IDE_ERROR_IN_DETECTING_HW IDE_ERROR_HW_NOT_FOUND IDE_CAN_NOT_OPEN_FILE IDE_CAN_NOT_SAVE_FILE IDE_TA_HS_TRIG_ON_SE1 IDE_HW_IS_BUSY IDE_EXERCISER_PROGRAM_ERROR IDE_SYSTEM_DATA_IS_CORRUPTED IDE_CANNOT_RUN_PROJECT IDE_NOT_AUTHORIZED_TA_SPEED IDE_IS_NOT_ABLE_TO_SAVE IDE_HW_IS_NOT_STOPPED IDE_BAD_DATA_ENTRY IDE_HIGH_SPEED_TEST_MODE_IN_FULL_LOW IDE_NON_STD_CLOCK_IN_NO_FULL_LOW_SPEED IDE_TIMMING_TRIG_WHEN_TA_ISNOT_ENABLE IDE_NO_MATCH_TRIG_ITEM_WITH_ANALYZER_SPEED IDE_NO_MATCH_CAP_ITEM_WITH_ANALYZER_SPEED IDE_NO_MATCH_TRIG_CAPTURE_ITEMS_SPEED IDE_NO_MATCH_EXCLUDE_NYET_WITH_ANALYZER_SPEED IDE_NO_MATCH_EXCLUDE_KEEPALIVE_WITH_ANALYZER_SPEED DE_NO_MATCH_EXCLUDE_KEEPALIVE_WITH_TRIG_OR_CAP_ITEMS_SPEED...
Exerciser Command Parameters Exerciser Command Parameters 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...
Page 47
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.
Need help?
Do you have a question about the Conquest and is the answer not in the manual?
Questions and answers