LeCroy Conquest Manual

Manual is about: Application Program Interface

Summary of Conquest

  • Page 1

    For software version 7.40 september 2008 p rotocol s olutions g roup 3385 s cott b lvd s anta c lara , ca 95054 conquest application program interface (api) manual version 7.40

  • Page 2

    Document disclaimer 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. ...

  • Page 3

    Contents iii introduction - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 using the library - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 object hierarchy - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -...

  • Page 4

    Contents iv captureandtrigger - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 11 settriggertype - - - - - - - - - - - - - - - - - - - - - - - - - - 12 gettriggertype - - - - - - - - - - - - - - - - - - - - - - - - - - 12 setmanualtrig - - - - - - - - - - - - - - - - - - - - - -...

  • Page 5

    Contents v isdevicehub - - - - - - - - - - - - - - - - - - - - - - - - - - - -27 setstartexerciserwith - - - - - - - - - - - - - - - - - - - - - - -28 isetting - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 29 setanalyzerspeed - - - - - - - - - - - - - - - - ...

  • Page 6

    Contents vi endpoint direction definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 38 exerciser start with event definition - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 38 api errors - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ...

  • Page 7: Introduction

    Introduction 1 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 pr...

  • Page 8

    Iusbgeneral services interface 2 iusbgeneral services interface setport declaration: long setport(short sporttype) input(s): sporttypespecifies 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 v...

  • Page 9

    Iusbgeneral services interface 3 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 b...

  • Page 10

    Iusbgeneral services interface 4 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 m...

  • Page 11

    Iusbeasydatacaptureprj interface 5 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....

  • Page 12

    Iusbeasydatacaptureprj interface 6 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. Getexerci...

  • Page 13

    Iusbeasydatacaptureprj interface 7 save declaration: long save(lpctstr strfilepath) input(s): strfilepathpoints 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 ca...

  • Page 14

    Iusbeasydatacaptureprj interface 8 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 strpa...

  • Page 15

    Iusbeasydatacaptureprj interface 9 setpretrigger declaration: long setpretrigger(short spretigger) input(s): spretiggersets 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...

  • Page 16

    Iusbeasydatacaptureprj interface 10 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 fl...

  • Page 17: Captureandtrigger

    Captureandtrigger 11 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 ...

  • Page 18

    Captureandtrigger 12 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 type...

  • Page 19

    Captureandtrigger 13 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)....

  • Page 20

    Captureandtrigger 14 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. Bisdatab...

  • Page 21

    Captureandtrigger 15 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 ...

  • Page 22

    Captureandtrigger 16 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 ...

  • Page 23

    Captureandtrigger 17 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 ...

  • Page 24

    Captureandtrigger 18 isexcludenakedtransactions 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 ...

  • Page 25

    Captureandtrigger 19 excludesofpackets declaration: void excludesofpackets(bool bexclude) input(s): bexclude sets exclude sof packets flag. Return value: none remark: excludes sof packets if set to true. Includes sof packets when set to false. Isexcludesofpackets declaration: bool isexcludesofpacket...

  • Page 26: Iexerciser

    Iexerciser 20 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...

  • Page 27

    Iexerciser 21 addcommand declaration: long addcommand(short scommandtype, short sdeviceindex, const variant& vtparam1, const variant& vtparam2, const variant& vtparam3) input(s): scommandtypeselects the exerciser command type that you want to send to the device. Valid command types are in api consta...

  • Page 28

    Iexerciser 22 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 type...

  • Page 29

    Iexerciser 23 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 ty...

  • Page 30

    Iexerciser 24 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...

  • Page 31

    Iexerciser 25 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)...

  • Page 32

    Iexerciser 26 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: numb...

  • Page 33

    Iexerciser 27 getendpointdirection declaration: long getendpointdirection(short sdeviceindex, short sendpointindex, short* sdirection) input(s): sdeviceindexspecifies the index of found device. Sendpointindexspecifies the index of endpoint of a found device. Sdirectionspecifies direction of specifie...

  • Page 34

    Iexerciser 28 setstartexerciserwith declaration: long setstartexerciserwith(short seventtype) input(s): seventtypespecifies 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 st...

  • Page 35: Isetting

    Isetting 29 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...

  • Page 36

    Isetting 30 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 ...

  • Page 37

    Isetting 31 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...

  • Page 38

    Isetting 32 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(b...

  • Page 39

    Isetting 33 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 isenablehighsp...

  • Page 40: Api Constants

    Api constants 34 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 3 api_anlyzer_type_pa 0 //protocol analyzer api_anlyzer_type_ta 1 //timing analyzer api_anlyze...

  • Page 41: Capturing Items Definitions

    Api constants 35 data packet type definitions api_max_trig_data_packet_types 5 api_data_packet_type_any 0 api_data_packet_type_data0 1 api_data_packet_type_data1 2 api_data_packet_type_data2 3 api_data_packet_type_mdata 4 timing analyzer pattern type definitions api_max_ta_pattern_types 5 api_ta_fls...

  • Page 42: Hub Features Definitions

    Api constants 36 exerciser command type definitions api_max_exr_command_types 18 api_exr_command_get_configuration 0 api_exr_command_get_descripto 1 api_exr_command_get_interface 2 api_exr_command_get_device_status 3 api_exr_command_set_address 4 api_exr_command_set_configuration 5 api_exr_command_c...

  • Page 43

    Api constants 37 protocol error type definitions api_max_protocol_error_types 13 api_pe_bit_stuff 0 api_pe_pid_check 1 api_pe_pid_unknown 2 api_pe_synch 3 api_pe_crc5 4 api_pe_crc16 5 api_pe_frame_len 6 api_pe_babble 7 api_pe_data_toggle 8 api_pe_false_eop 9 api_pe_act_loss 10 // loss of activity ap...

  • Page 44: Endpoint Type Definitions

    Api constants 38 endpoint type definitions api_max_endpoint_types 4 api_endpoint_type_control 0 api_endpoint_type_iso 1 // isochronous api_endpoint_type_bulk 2 api_endpoint_type_int 3 // interrupt endpoint direction definitions api_max_endpoint_directions 3 api_data_direction_none 0 api_data_directi...

  • Page 45: Api Errors

    Api errors error codes are in the sbaeapierrors.H file. They are returned by some functions upon an error condition. Ide_no_error 0 ide_invalid_port_no 1 ide_error_in_detecting_hw 2 ide_error_hw_not_found 3 ide_can_not_open_file 4 ide_can_not_save_file 5 ide_ta_hs_trig_on_se1 6 ide_hw_is_busy 7 ide_...

  • Page 46: Exerciser Command Parameters

    Exerciser command parameters 40 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_co...

  • Page 47

    Exerciser command parameters 41 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 shoul...

  • Page 48

    Exerciser command parameters 42.