beautypg.com

Teledyne LeCroy IBTrainer - IBTrainer Users Manual User Manual

Page 63

background image

Extending the IBTrainer Software with Your Own TCL Scripts

Using Auxiliary Features

CATC IBTrainer InfiniBand Exerciser, August 2002

63

Extending the IBTrainer
Software with Your Own TCL
Scripts

Overview

This section describes how to extend the Exerciser GUI with your own

scripts and modules. There is a specific format that an extension script

has to follow. So help, toolbar and menu are created automatically in the

GUI.

If the script is structured this way, the software will provide:

• A menu entry in the Tools menu

• A toolbar button in the Tools toolbar (optional)

• A balloon help popup on the button (optional)

• Help text appearing in the status line if either button or menu entry are

selected (optional)

Script format

An extension script needs the following elements in order to load into

the software:

• A procedure that can be called whenever the corresponding toolbar

button or the menu entry in Tools is selected

• An image that will appear in the toolbar (optional)

• Names and help texts (optional)

• A procedure named _iginit. It has to take one argument,

which is a pointer to the currently connected generator object. The

procedure needs to return a list of information, that the GUI will use to

create the tool entries. It must be structured like this:

?help string? ?toolbar image?

?tooltip text?

where:

: text, as it should appear in the Tools menu

: TCL command to be called when the button or menu is

clicked.

– Help string: help string appearing in status line

– toolbar image: image for the button (should be 16x16 in size)

– tooltip text: text for the balloon help