beautypg.com

How to write your own handler, Managing handlers, 53 how to write your own handler – Teledyne LeCroy IBTrainer - IBTrainer Users Manual User Manual

Page 53

background image

Viewing the Results

Testing with the User Interface

CATC IBTrainer InfiniBand Exerciser, August 2002

53

How to Write Your Own Handler

In the software, a default handler is used as template for creating new

handlers. This default handler performs the following verification: If the

incoming packet is an InfiniBand packet containing the same DLID value

as the IBTrainer, the handler opens the console and displays “hello”.

To write a new handler:

1 Select Tools>Packet handlers.

The Packet handlers dialog box opens.

2 Click New handler.

3 If necessary, change the code of the Check handler and Packet handler

to meet your requirements.

The Check handler contains the code describing the conditions set on

the incoming packet, the Packet handler contains the code that is

executed if the packet fulfills the set conditions.

The following figure shows a new packet created from this default

handler.

Managing Handlers

You can daisy-chain several packet handlers to perform different tasks.

They will be called in the order of the Available handlers list. If Enable

global MAD handling

is selected, the internal MAD handler will be called

first, effectively handling all MAD (and SMP) Set and Get requests.