LeCroy Conquest Manual

Application program interface
Table of Contents

Advertisement

Quick Links

P
S
ROTOCOL
OLUTIONS
3385 S
B
COTT
LVD
S
C
, CA 95054
ANTA
LARA
Application Program Interface (API)
G
ROUP
Conquest
Manual
Version 7.40
For Software Version 7.40
September 2008

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Conquest and is the answer not in the manual?

Questions and answers

Summary of Contents for LeCroy Conquest

  • 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.
  • Page 3: Table Of Contents

    Contents Introduction - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 Using the Library - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 Object Hierarchy - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 IUsbGeneral Services Interface - - - - - - - - - - - - - - - - - - - - - - - - - - - 2...
  • Page 4 Contents CaptureAndTrigger - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 11 SetTriggerType - - - - - - - - - - - - - - - - - - - - - - - - - - 12 GetTriggerType - - - - - - - - - - - - - - - - - - - - - - - - - - 12 SetManualTrig - - - - - - - - - - - - - - - - - - - - - - - - - - - 12 IsSetManualTrig - - - - - - - - - - - - - - - - - - - - - - - - - - 12...
  • Page 5 Contents IsDeviceHub - - - - - - - - - - - - - - - - - - - - - - - - - - - -27 SetStartExerciserWith - - - - - - - - - - - - - - - - - - - - - - -28 ISetting - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 29 SetAnalyzerSpeed - - - - - - - - - - - - - - - - - - - - - - - - -30 GetAnalyzerSpeed - - - - - - - - - - - - - - - - - - - - - - - - -30...
  • Page 6 Contents Endpoint Direction Definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 38 Exerciser Start With event definition - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 38 API Errors - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 39 Exerciser Command Parameters - - - - - - - - - - - - - - - - - - - - - - - - - 40...
  • Page 7: 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.
  • Page 8: Iusbgeneral Services Interface

    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.
  • Page 9: Saveoutfiles

    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:...
  • Page 10: Attachtodevice

    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.
  • Page 11: Iusbeasydatacaptureprj Interface

    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.
  • Page 12: Getcaptureandtrigger

    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.
  • Page 13: Save

    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:...
  • Page 14: Getanalyzertype

    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.
  • Page 15: Setpretrigger

    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...
  • Page 16: Getsamplesno

    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.
  • Page 17: Captureandtrigger

    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.
  • Page 18: Settriggertype

    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.
  • Page 19: Settriggerdeviceaddress

    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.
  • Page 20: Settriggerdatapacket

    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.
  • Page 21: Setdatacapture1

    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.
  • Page 22: Setdatacapture2

    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.
  • Page 23: Setdatacapture3

    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.
  • Page 24: Isexcludenakedtransactions

    CaptureAndTrigger 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 ExcludeNYETedTransactions(BOOL bExclude) Input(s): bExclude sets exclude ’ed transactions flag. NYET Return Value None Remark:...
  • Page 25: Excludesofpackets

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

    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.
  • Page 27: Addcommand

    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.
  • Page 28: Adduserdefinecommand

    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.
  • Page 29: Insertcommand

    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.
  • Page 30: Insertuserdefinecommand

    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.
  • Page 31: Deleteallcommands

    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.
  • Page 32: Finddevice

    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.
  • Page 33: Getendpointdirection

    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...
  • Page 34: Setstartexerciserwith

    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...
  • Page 35: Isetting

    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.
  • Page 36: Setanalyzerspeed

    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.
  • Page 37: Setexternaltriggertype

    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...
  • Page 38: Getnonstdclockratetype

    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.
  • Page 39: Enablehighspeedtestmode

    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.
  • Page 40: Api Constants

    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...
  • Page 41: Data Packet Type Definitions

    API Constants Data Packet Type definitions API_MAX_TRIG_DATA_PACKET_TYPES API_DATA_PACKET_TYPE_ANY API_DATA_PACKET_TYPE_DATA0 API_DATA_PACKET_TYPE_DATA1 API_DATA_PACKET_TYPE_DATA2 API_DATA_PACKET_TYPE_MDATA Timing Analyzer Pattern Type definitions API_MAX_TA_PATTERN_TYPES API_TA_FLS_TRIG_PATTERN_DP 0 //Full/Low Speed D+ Pattern API_TA_FLS_TRIG_PATTERN_DM 1 //Full/Low Speed D- Pattern API_TA_FLS_TRIG_PATTERN_RCV 2 //Full/Low Speed RCV Pattern API_TA_HS_TRIG_PATTERN_DP 3 //High Speed D+ Pattern API_TA_HS_TRIG_PATTERN_DM 4 //High Speed D- Pattern Capturing Items definitions...
  • Page 42: Exerciser Command Type Definitions

    API Constants Exerciser Command Type definitions API_MAX_EXR_COMMAND_TYPES API_EXR_COMMAND_GET_CONFIGURATION API_EXR_COMMAND_GET_DESCRIPTO API_EXR_COMMAND_GET_INTERFACE API_EXR_COMMAND_GET_DEVICE_STATUS API_EXR_COMMAND_SET_ADDRESS API_EXR_COMMAND_SET_CONFIGURATION API_EXR_COMMAND_CLEAR_HUB_FEATURE API_EXR_COMMAND_CLEARE_HUB_PORT_EATURE API_EXR_COMMAND_GET_HUB_CLASS_DESCRIPTOR API_EXR_COMMAND_GET_HUB_STATUS API_EXR_COMMAND_SET_HUB_FEATURE API_EXR_COMMAND_SET_HUB_PORT_FEATURE API_EXR_COMMAND_CLEAR_HUB_TT_BUFFER API_EXR_COMMAND_REASET_HUB_TT API_EXR_COMMAND_GET_HUB_TT_STATUS API_EXR_COMMAND_STOP_HUB_TT API_EXR_COMMAND_DATA_IN API_EXR_COMMAND_DATA_OUT HUB Features definitions API_MAX_HUB_FEATURES API_HUB_FEATURE_LOCAL_POWER API_HUB_FEATURE_OVER_CURRENT HUB Port Features definitions API_MAX_HUB_PORT_FEATURES API_HUB_FEATURE_CONNECTION 0 // port connection API_HUB_FEATURE_ENABLE 1 // port enable API_HUB_FEATURE_SUSPEND...
  • Page 43: Protocol Error Type 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...
  • Page 44: Endpoint Type Definitions

    API Constants Endpoint Type definitions API_MAX_ENDPOINT_TYPES API_ENDPOINT_TYPE_CONTROL API_ENDPOINT_TYPE_ISO 1 // Isochronous API_ENDPOINT_TYPE_BULK API_ENDPOINT_TYPE_INT 3 // interrupt Endpoint Direction Definitions API_MAX_ENDPOINT_DIRECTIONS API_DATA_DIRECTION_NONE API_DATA_DIRECTION_IN API_DATA_DIRECTION_OUT Exerciser Start With event definition API_MAX_EXRCISER_START_WITH_EVENTS API_EXR_START_WITH_RESUME API_EXR_START_WITH_RESET...
  • 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 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...
  • Page 46: Exerciser Command Parameters

    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.
  • Page 48 Exerciser Command Parameters...

Table of Contents