Teledyne LeCroy Automation API for IBTrainer Software Ver.2.0 User Manual

Page 14

Advertising
background image

Programming the IBTrainer

Packet Handling Concept

1-4

CATC IBTrainer InfiniBand Exerciser API Reference

In order to handle packets you need to register a packet handler with
the generator class. This involves deriving a class from the class
IGCPacketHandler

and writing the two methods CheckPacket() and

HandlePacket()

. These exist as purely virtual methods in

IGCPacketHandler

. CheckPacket() gets called to determine whether the

packet handler should deal with the packet. Having done this, the
function returns. Subsequently, the base class IGCPacketHandler
manages the call to HandlePacket().

An additional class derived from IGCPacketHandler is included with the
product:

• IGCPacketHandlerTcl provides a class that can handle tcl scripts. This

allows a tcl script to handle incoming packets, simplifying this task.

Subnet management is implemented as an SMA (subnet management
agent), programmed as a tcl script (refer to

“TCL Interface” on page 1-9

).

NOTE

Advertising