2403 Walsh Avenue, Santa Clara, CA 95051-1302 Tel: +1/408.727.6600 Fax: +1/408.727.6622 Automation API for CATC Bluetooth Exercisers Reference Manual Manual Version 1.
CATC Automation API for CATC Bluetooth Exercisers Manual Version 1.01 Document Disclaimer The information contained 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. CATC reserves the right to revise the information presented in this document without notice or penalty.
CATC Automation API for CATC Bluetooth Exercisers Manual Version 1.01 TABLE OF CONTENTS 1 INTRODUCTION ............................................................................................1 1.1 System Requirements ............................................................................................... 1 1.2 Support Resources .................................................................................................... 1 1.3 Setting Up Automation for Local Use ..................
CATC Automation API for CATC Bluetooth Exercisers Version 1.0 1 Introduction The Automation API for CATC Bluetooth Exercisers allows users to control the exerciser application (BTTrainer or Merlin's Wand) from a local or remote client. Through this control the client application can load and run scripts and retrieve information about their success or failure. The name Automation is derived from the goal of allowing engineers to automate test procedures.
CATC 1.3 Automation API for CATC Bluetooth Exercisers Manual Version 1.01 Setting Up Automation for Local Use If you intend to run Automation on the Exerciser's Host Controller (i.e., the PC attached to the exerciser) you do not need to perform any special configuration. You can simply execute the scripts or programs you have created and they will run the exerciser. 1.
CATC Automation API for CATC Bluetooth Exercisers Manual Version 1.01 2.1.2 Termination When the application is started in automation mode, the last client to disconnect will automatically cause the application to terminate.
CATC Automation API for CATC Bluetooth Exercisers Manual Version 1.01 VT_R4: Converted (truncated) to an integer CValue. VT_R8: Converted (truncated) to an integer CValue. VT_BOOL: Converted to an integer CValue. VT_BSTR: Converted to a string CValue. VT_ARRAY | VT_VARIANT | VT_BYREF: If it is a 1 dimensional array, it will be converted into a list/array CValue. If it is not a one-dimensional array it will be converted into a null CValue. All other VARIANT types will convert into a null CValue.
CATC Automation API for CATC Bluetooth Exercisers REQUIREMENTS: BTTRAINER 2.01 2.2.2 GetLog Method HRESULT GetLog( EBTLogType type, BSTR * log ) Retrieves the specified log. EBTLogType type [in]: The type of log to retrieve. Valid values are BTLOG_TYPE_SCRIPT, BTLOG_TYPE_SYSTEM, and BTLOG_TYPE_ALL. 5 Manual Version 1.
CATC Automation API for CATC Bluetooth Exercisers Manual Version 1.01 BSTR log [out]: Contains the system log. Errors: BTEXERCISER_ERROR_BUSY: The application status is busy. REQUIREMENTS: BTTrainer 2.01 2.2.3 SaveLog Method HRESULT SaveLog( EBTLogType type, BSTR file_name ) Saves the specified log. Returns an failure if there is a problem saving the file. EBTLogType type [in]: The type of log to save. Valid values are BTLOG_TYPE_SCRIPT, BTLOG_TYPE_SYSTEM, and BTLOG_TYPE_ALL.
CATC Automation API for CATC Bluetooth Exercisers Manual Version 1.01 BTTrainer 2.01 2.2.5 CreateTransmitPipeData Method HRESULT CreateTransmitPipeData( BSTR pipe_name, VARIANT data ) Adds a transmit pipe to the data transfer manager. Initializes it with the data that is passed in. Returns failure if a transmit pipe of the same name already exists. BSTR pipe_name [in]: Name of the pipe to add. VARIANT data [in]: Raw data to transmit. Currently only VT_BSTR is supported.
CATC Automation API for CATC Bluetooth Exercisers Manual Version 1.01 2.2.7 DeleteTransmitPipe Method HRESULT DeleteTransmitPipe( BSTR pipe_name ) Removes a transmit pipe to the data transfer manager. Returns failure if the transmit pipe does not exist. BSTR pipe_name [in]: Name of the pipe to remove. Errors: BTEXERCISER_ERROR_PIPE_NOT_FOUND: No transmit pipe with this name can be found. BTEXERCISER_ERROR_BUSY: The application status not ready. Requirements: BTTrainer 2.01 2.2.
CATC Automation API for CATC Bluetooth Exercisers Manual Version 1.01 BSTR pipe_name [in]: Name of the receive pipe. Errors: BTEXERCISER_ERROR_PIPE_NOT_FOUND: No receive pipe with this name can be found. BTEXERCISER_ERROR_BUSY: The application status not ready. Requirements: BTTrainer 2.01 2.2.10 DeleteReceivePipe Method HRESULT DeleteReceivePipe ( BSTR pipe_name ) Deletes a receive pipe. Returns failure if the receive pipe does not exist. BSTR pipe_name [in]: Name of the receive pipe.
CATC Automation API for CATC Bluetooth Exercisers Manual Version 1.01 The application is running in GUI mode or there is another automation client accessing the tools. BTAPP_STATUS_HARDWARE_ERROR The hardware is missing or failed to initialize. BTAPP_STATUS_NEEDS_BTTRACER BTTrainer was invoked without first running BTTracer. Requirements: BTTrainer 2.01 2.2.
CATC Automation API for CATC Bluetooth Exercisers Manual Version 1.01 2.3.1 LoadScriptFile Method HRESULT LoadScriptFile( BSTR file_name ) Loads a text script on the server and compiles it. Returns failure if there is a problem with the file or compilation. BSTR file_name [in]: The path of the file on the server to load. Errors: SCRIPTMANAGER_ERROR_SCRIPT_RUNNING: The operation cannot be performed because a script is running. SCRIPTMANAGER_ERROR_SCRIPT_COMPILER: The script failed to load or compile.
CATC Automation API for CATC Bluetooth Exercisers Manual Version 1.01 Value to be translated into a script argument. See section 2.14 VARIANTs and CSL CValues. Errors: SCRIPTMANAGER_ERROR_SCRIPT_RUNNING: The operation cannot be performed because a script is running. SCRIPTMANAGER_ERROR_NO_SCRIPT: No script object (either text or module) had been loaded. Requirements: BTTrainer 2.01 2.3.4 Stop Method HRESULT Stop( LONG timeout ) Attempt to stop the script that is currently running.
CATC Automation API for CATC Bluetooth Exercisers Manual Version 1.01 The operation cannot be performed because a script is running. SCRIPTMANAGER_ERROR_NO_SCRIPT: No script object (either text or module) had been loaded. Requirements: BTTrainer 2.01 2.3.6 IsRunning Property BOOL IsRunning The running property will be TRUE if a script is currently running, and FALSE otherwise. This is a read-only property. 2.
CATC Automation API for CATC Bluetooth Exercisers Manual Version 1.01 Appendix A How to Contact CATC TYPE OF SERVICE Call for technical support… Fax your questions… Write a letter … Send e-mail… Visit CATC’s web site… CONTRACT US and Canada: 1 (800) 909-2282 Worldwide: 1 (408) 727-6600 Worldwide: 1 (408) 727-6622 Computer Access Technology Corporation Customer Support 2403 Walsh Avenue Santa Clara, CA 95051-1302 support@CATC.com http://www.CATC.