-
Computer Access Technology Corporation 2403 Walsh Avenue, Santa Clara, CA 95051-1302 Tel: +1/408.727.6600 Fax: +1/408.727.6622 CATC IBTrainer InfiniBand Exerciser API Reference 16 August 2002 For IBTrainer Software Version 2.0 Manual Version 1.
-
Important Notice Warranty © Computer Access Technology Corporation 2002 Revision 1.0 Revision 1.0, August 2002 Printed in USA Computer Access Technology Corporation, 2403 Walsh Avenue Santa Clara, CA 95051-1302 USA The material contained in this document is provided “as is,” and is subject to being changed, without notice, in future editions.
-
Table of Contents Programming the IBTrainer Packet Handling Concept 1-1 1-1 Sending Packets 1-2 Receiving Packets Exception and Error Handling 1-3 1-5 Performance Measurement Link Packet Observer Control Command Language 1-7 1-8 1-9 TCL Interface Installed TCL Sample Scripts 1-9 1-11 Classes of the C++ Interface C++ Interface 2-1 2-1 Generator Class Packet Classes 2-2 2-2 Packet Handler Classes CallBack Classes 2-4 2-6 Property Value Class MAD Attribute Classes Subnet Management Attribute Cl
-
Print 2-14 Operator << 2-15 Methods of the IGCGenerator Class iv 2-16 AssertTriggerOut 2-19 Connect Disconnect 2-19 2-20 EnableMADHandling 2-20 GetInfo 2-21 GetSubnMgmtAttribute HardwareUpdate 2-21 2-22 IBLinkReset IsMADHandling IsConnected 2-22 2-23 2-23 IGCGenerator, Constructor 2-24 ~IGCGenerator, Destructor LaneSkewGet 2-24 2-25 LaneSkewSet 2-26 LinkPacketRecRun LinkPacketRecStop LinkStateWrite 2-27 2-27 2-28 LinkPacketStatusRead LinkTrainingStateWrite OperationalVLRead Operat
-
PatternActionWrite 2-34 PatternMaskWrite PatternOffsetWrite 2-35 2-36 PatternValueWrite 2-37 Ping 2-39 ProtocolObserverRead ProtocolObserverReset 2-39 2-39 RegisterCallBack 2-40 RegisterPacketHandler UnregisterCallBack 2-41 2-41 VLAllResourceRead 2-43 VLAllResourceWrite Reset 2-44 2-44 ResetPacketSend 2-45 SkipTestRun StatusRead TransmitInit 2-45 2-46 2-46 TransmitProg TransmitRun TransmitSet 2-47 2-47 2-48 TransmitStep TransmitStop 2-48 2-49 UnregisterPacketHandler VLResourceRead
-
Get 2-55 Operator[] Rescan 2-55 2-56 Methods of the IGCGeneratorInfo Class GetPort 2-57 GetSerial GetProductString 2-58 2-58 Print 2-59 Methods of the IGCPacket Class 2-60 AppendBuffer AppendPayloadBuffer 2-61 2-62 Clone DeletePacket GetActualLength 2-62 2-63 2-63 GetICRC GetType 2-63 2-64 GetPayload GetVCRC 2-64 2-65 HasPayload IGCPacket, Destructor NewPacket 2-65 2-66 2-66 SetPacketLength SetPayload SetPRBSPayloadSize 2-67 2-67 2-68 Methods of the IGCRawPacket Class IGCRawPacket, C
-
Methods of the IGCIBAPacket Class 2-75 Init 2-77 IGCIBAPacket, Default Constructor IGCIBAPacket, Constructor for the Class 2-77 2-78 ~IGCIBAPacket, Destructor 2-78 Methods of the IGCMADPacket Class 2-79 IGCMADPacket, Constructor 2-82 ~IGCMADPacket, Destructor 2-82 Methods of the IGCBuffer Class 2-83 IGCBuffer, Constructor IGCBuffer, Destructor 2-84 2-84 ReadFile WriteFile 2-84 2-85 SaveFile Cmp PeekData 2-85 2-85 2-86 Push Pop PopData 2-86 2-87 2-87 SetAt 2-88 Size GetAt Fill FillR
-
Type Conversions 2-93 Const Conversions Non Const Conversions 2-94 2-95 Assignments 2-96 Comparisons 2-97 Methods of the IGCObject Class Set 2-99 Get Default 2-99 2-100 CopyProps 2-100 Methods of the IGCStatus Class 2-101 IGCStatus, Constructor ~IGCStatus, Destructor 2-101 2-102 Print 2-102 Methods of the IGCPacketHandler Class 2-103 ~IGCPacketHandler, Destructor CheckPacket 2-104 2-104 HandlePacket GetGenerator 2-105 2-105 Methods of the IGCPacketHandlerTcl Class 2-106 IGCPacket
-
Methods of the Error Class 2-114 Clear 2-115 Error IGCError, Constructor 2-115 2-115 IGCError, Copy Constructor 2-116 IGCError, Destructor GetErrorText 2-116 2-116 Operator 2-117 Print 2-117 Methods of the IGCSMPPacket Class IGCSMPPacket, Constructor ~IGCSMPPacket, Destructor Enumeration Definitions 2-118 2-120 2-120 3-1 EErrtype IGCGenerator::IGEPropName 3-1 3-2 IGCPacket::IGEPropName IGCVal::Opcode 3-2 3-2 Properties and Programmatic Settings Generator Properties Status Properties IG
-
x Base Transport Header Properties 4-16 Extended Transport Header Fields 4-17 CATC IBTrainer InfiniBand Exerciser API Reference
-
Programming the IBTrainer This chapter briefly explains the basic ideas behind the programming model of the IBTrainer. The concept is explained for the C++ interface. The TCL interface is built in a similar way. The main programming interface to the IBTrainer is based on the C++ programming language. This C++ interface can also be accessed from a TCL shell to provide the capabilities of a script language. The TCL commands are completely based on the C++ calls.
-
Programming the IBTrainer Packet Handling Concept list of these properties refer to “Properties and Programmatic Settings” on page 4-1. Sending Packets In order to send out packets, you have to create objects of various packet classes and set the internal properties of these packet objects as desired. There are a number of different classes that derive from IGCPacket. These can be selected by yourself depending on the type of packet that should be sent.
-
Packet Handling Concept Programming the IBTrainer struct within the generator. The generator provides the method PacketInit() for that purpose. Having created an InfiniBand packet (or a raw packet), you can send it out in one of two ways: • Direct send Using the method PacketSend(), you can directly pass an object of the type IGCPacket (or derived from IGCPacket) to the generator class which then immediately sends out the packet.
-
Programming the IBTrainer Packet Handling Concept 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.
-
Packet Handling Concept Programming the IBTrainer Exception and Error Handling This section shows the error mechanisms implemented by the C++ and the TCL interfaces. Error Mechanisms for the C++ Interface The following code block shows an example of how to use the exception handling with the API. try { IGCGenerator myGenerator; myGenerator.Connect(0); myGenerator.Foo(); } catch (IGCError err) { // Error occurred in try block // Do error handling here, e.g.
-
Programming the IBTrainer Packet Handling Concept Error Mechanism for the TCL Interface The following example script shows how an IBTrainer gets connected using the TCL script language and shows the error mechanism in case the connect was not successful.
-
Performance Measurement Programming the IBTrainer Performance Measurement The performance measurement counts values such as the size of payload, the number of good and bad packets and the number of link packets received and transmitted by the exerciser. The two performance counters that hold the result of the performance measurement are implemented in the hardware of the exerciser and are accessed via the IGCPerformance class of the API (see “IGCPerformance Class” on page 2-10).
-
Programming the IBTrainer Link Packet Observer Link Packet Observer This is a proposal for a capability to observe link packets received by the generator. An implementation in the status information is not recommended for performance reasons. Instead a new class is introduced. In order to separate the protocol observer portion (i.e. the exceeding of timeout for LinkPackets) a new class is introduced. Other protocol observer values can be included into this class in future.
-
Control Command Language Programming the IBTrainer Control Command Language The basis for the control language is the C++ interface. TCL Interface The entire functionality of the InfiniBand Generator can also be accessed via a TCL interface. A part of the software installation is a subnet management agent (SMA) programmed as a TCL script. The SMA handles all incoming MAD packets and registers the generator correctly within the InfiniBand network.
-
Programming the IBTrainer Control Command Language What you intend What the SW does Tcl Syntax Get the value of a property. Assumes that val contains the value and var contains a class object. Set val [ IGCObject_Get $var $_ ] Create a buffer. Makes a new buffer to fill with packet bytes later on. set buf [new_IGCBuffer] Fill the buffer. This appends the packet to the buffer buf. Assumes that $pkt contains the packet and $buf contains the buffer.
-
Control Command Language Programming the IBTrainer Installed TCL Sample Scripts The following tables describes the scripts installed with the IBTrainer software. Table 2 Sample scripts installed with the IBTrainer software Script name Description GettingStarted Starts a rudimentary Subnet Management agent.
-
-
Classes of the C++ Interface The main programming interface to the IBTrainer is based on the C++ programming language. Included with the software is also a TCL representation of the C++ interface - a shell to provide you with the capabilities of a script language. Thus All C++ calls have a TCL equivalent. You therefore have a choice of using either the C++ interface or the TCL shell to program and configure the IBTrainer InfiniBand Generator.
-
Classes of the C++ Interface C++ Interface Generator Class The generator class IGCGenerator is the ‘main’ class needed to connect the software to a specific generator. There can be only one generator class for each physical IBTrainer 4x Exerciser for InfiniBand. However, you can handle several generator class objects simultaneously where each of these objects is connected to a different generator. A generator object can also be created with an offline connection.
-
C++ Interface Classes of the C++ Interface Figure 2 Hierarchy of the Packet Classes IGCPacket IGCRawPacket IGCRawIPPacket IGCIBAPacke t IGCMADPacket IGCS MPPacket IGCPacket Classes The IGCPacket class is the base class for all classes that hold InfiniBand architecture packets (InfiniBand packets and raw packets). For the methods relating to this class, refer to “Methods of the IGCPacket Class” on page 2-60.
-
Classes of the C++ Interface C++ Interface the packet or not (refer to the IBA Specification Section 5.2). For the methods relating to this class refer to “Methods of the IGCIBAPacket Class” on page 2-75. The following class is derived from the IGCIBAPacket class: – IGCMADPacket class Special class to hold InfiniBand MAD packets. This class allows convenient access to all MAD information. For the methods relating to this class refer to “Methods of the IGCMADPacket Class” on page 2-79.
-
C++ Interface Classes of the C++ Interface Figure 3 Hierarchy of the Packet Handler Classes IGCPacketHandler IGCPacketHandlerTcl IGCPacketHandler Class This is an abstract base class. It basically manages two functions, both implemented as purely virtual methods that check and handle incoming packets. The methods are CheckPacket() and HandlePacket(). For the methods relating to this class refer to “Methods of the IGCPacketHandler Class” on page 2-103.
-
Classes of the C++ Interface C++ Interface CallBack Classes The CallBack classes consist of the class IGCCallBack and the class IGCCallBackTcl, where the latter is derived from the former. The class IGCCallBackTcl provides the functionality for handling TCL scripts. This makes it easy for a TCL script to handle CallBacks (see programming guide for an example). IGCCallBack Overview Figure 4 The following figure shows the derivation hierarchy of the CallBack classes.
-
C++ Interface Classes of the C++ Interface The following class is derived from IGCCallBack: • IGCCallBackTcl class This class allows you to provide the generator class with TCL scripts to handle incoming packets. For the methods relating to this class refer to “Methods of the IGCCallBackTcl Class” on page 2-112. Property Value Class The class IGCVal is designed to take different kinds of property values into one type of variable.
-
Classes of the C++ Interface C++ Interface MAD Attribute Classes The InfiniBand Specification describes several attributes that can be carried by MAD packets. The attributes are realized as sub classes of the class IGCMADAttribute. In order to create a MAD Packet that contains one of the above attributes, create an instance of the desired attribute class, modify the properties and copy the data into the instance of a MAD Packet using the method ToPacket of the class IGCMADAttribute.
-
C++ Interface Classes of the C++ Interface • IGCDCommMgtAttribute class This class contains classes for the attributes of the Communication Management. Subnet Management Attribute Classes For each of the Subnet Management Attributes NodeDescription, NodeInfo, SwitchInfo, GUIDInfo, PortInfo and LinearForwardingTable there is one class within the generator that holds the relevant properties. They are IGCNodeDescription, IGCNodeInfo, IGCSwitchInfo, IGCGUIDInfo, IGCPortInfo and IGCLinearForwardingTable.
-
Classes of the C++ Interface C++ Interface “IGCGUIDInfo Properties” on page 4-7. IGCNodeDescription Class IGCSwitchInfo Class IGCLinearForwarding Table Class This class holds the properties for the InfiniBand NodeDescription struct. Each generator class has one NodeDescription class object. For the properties refer to “IGCNodeDescription Properties” on page 4-7. This class holds the properties for the InfiniBand SwitchInfo struct. Each generator class has one SwitchInfo class object.
-
C++ Interface Classes of the C++ Interface Property Name Range Default Access Description RcvePktLink 64bit 0 RW Number of Received Link Packets on all VL XmitPyldHdr 64bit 0 RW Xmitted Dwords from LRH to End of Pyld, followed by EGP XmitPyld 64bit 0 RW Xmitted Dwords from Start of Pyld to End of Pyld, followed by EGP XmitPkt 64bit 0 RW Number of Xmitted Packets followed by EGP XmitPktBad 64bit 0 RW Number of Xmitted Packets followed by EBP XmitPktLink 64bit 0 RW Number o
-
Classes of the C++ Interface C++ Interface IGCLinkPacketStatus Class The class IGCLinkPacketStatus is derived from IGCObject and represents a container for the result of the link packet observer that is controlled via methods in the generator class. It contains the following properties: Table 5 2-12 Properties of the IGCLinkPacketStatus class Property Name Rang e Default Access Description All_Normal_Packets 16bit 0 RW The LSB represents VL0, the MSB represents VL15.
-
C++ Interface Classes of the C++ Interface Error Class Error handling in the C++ as well as in the TCL interface is based on C++ exception handling. Errors are of the type IGCError. IGCError Class This class handles errors and gets thrown if an error occurs. Error handling takes place via exception handling (try and catch). You are responsible for catching potential errors. For the methods relating to this class refer to “Methods of the IGCPacketHandler Class” on page 2-103.
-
Classes of the C++ Interface Methods Common to All Classes Methods Common to All Classes Every class (or its base class) has the method Print() and supports the C++ stream operator for the user to be able to print the content of the class. The content can be either debug information or status information. Print Call Description Prints the content of the class as text representation of the specified ostream (in a form readable by humans).
-
Methods Common to All Classes Classes of the C++ Interface Operator << Call Description Return Value Input Parameters ostream & operator << (ostream & o, const & ); Similar to print but uses the C++ streaming operator. Returns a reference to an ostream object with the content of the class. o The specified ostream. var The class, the content of which is to be printed.
-
Classes of the C++ Interface Methods of the IGCGenerator Class Methods of the IGCGenerator Class There can only be one IGCGenerator class for each physical IBTrainer. The generator class also holds information on the InfiniBand port info struct and all associated data. Since there can only be one generator per real device the copy constructor leads to an assertion. IN, OUT and INOUT are markers that determine the parameter type (input or output).
-
Methods of the IGCGenerator Class Classes of the C++ Interface void LinkPacketRecStop(); void LinkPacketStatusRead(OUT IGCLinkPacketStatus &status); void LinkStateWrite ( IN ig_int8 linkstate ); void LinkTrainingStateWrite ( IN ig_int8 linkstate ); ig_int16 OperationalVLRead (void); void OperationalVLWrite (IN ig_int16 allVLState); ig_int16 PerformanceCtrMaskRead(IN ig_bool direction, IN ig_int8 ctrNum); void PerformanceCtrMaskWrite(IN ig_bool direction, IN ig_int8 ctrNum, IN ig_int16 ctrMa
-
Classes of the C++ Interface void TransmitSet ( IN const IGCPacket & packet ); void TransmitStep ( void ); void TransmitStop ( void ); void UnregisterPacketHandler ( IN IGCPacketHandler & handler ); ig_int32 VLAllResourceRead (void); void VLAllResourceWrite (IN ig_int32 regVal); ig_int8 VLResourceRead ( IN ig_int8 VL ); void VLResourceWrite ( IN ig_int8 VL, IN ig_int8 resource ); ig_int8 VLStateRead ( IN ig_int8 VL ); void VLStateWrite ( IN ig_int8 VL, IN ig_int8 state ); Inherited Memb
-
Methods of the IGCGenerator Class Classes of the C++ Interface AssertTriggerOut void AssertTriggerOut ( void ); Description Manually asserts the trigger out signal. Return Value None Parameters None See also None Connect void Connect ( IN ig_int32 portNum ); Description Return Value Input Parameters See also Connects the generator class to the physical generator at the USB port number portNum. This is the number returned by GetPort() (see “Methods of the IGCGeneratorInfo Class” on page 2-57).
-
Classes of the C++ Interface Methods of the IGCGenerator Class Disconnect void Disconnect ( void ); Description Disconnects the class from the physical generator. Without an active connection all calls directly accessing the generator result in an error. Return Value None Input Parameters None See also Connect above EnableMADHandling void EnableMADHandling ( IN ig_bool bEnable = true ); Description Return Value Input Parameters See also 2-20 This call enables or disables MAD handling.
-
Methods of the IGCGenerator Class Classes of the C++ Interface GetInfo const IGCGeneratorInfo & GetInfo ( void ) const; Description Return Value Returns a reference to an IGCGeneratorInfo object which contains information about the generator itself (USB port number, serial number, revision number, and so on). A reference to the appropriate IGCGeneratorInfo object.
-
Classes of the C++ Interface Methods of the IGCGenerator Class HardwareUpdate void HardwareUpdate(IN ig_int32 port, IN ig_bool force = false); Description Return Value Input Parameters Updates the hardware. The versions of the firmware and FPGA on the exerciser are compared to the versions required by the current IGAPI and updated if needed. If the files containing the data of the firmware and FPGA are not found in the current directory, HardwareUpdate searches in the path \HW.
-
Methods of the IGCGenerator Class Classes of the C++ Interface IsMADHandling Call Description Return Value ig_bool IsMADHandling(void) const; Returns whether MAD handling is running. 1 if handling is running,. 0 if not. Input Parameters None See also None IsConnected Call Description Return Value Input Parameters See also ig_bool IsConnected(void) const; Checks whether the generator class is connected to a physical generator at the USB port.
-
Classes of the C++ Interface Methods of the IGCGenerator Class IGCGenerator, Constructor Call Description IGCGenerator ( void ); Constructor. Without a call to the method Connect() the generator class is not able to process any direct accesses to hardware. By default, the generator is started in offline mode. Return Value None Input Parameters None See also IGCGenerator Destructor ~IGCGenerator, Destructor Call Description ~IGCGenerator ( void ); Destructor.
-
Methods of the IGCGenerator Class Classes of the C++ Interface LaneSkewGet Call Description ig_int8 LaneSkewGet(IN ig_int8 lane); Does not work with InfiniBand x1 ! Gets the skew of a lane of the transmitting side.
-
Classes of the C++ Interface Methods of the IGCGenerator Class LaneSkewSet Call Description void LaneSkewSet(IN ig_int8 lane, IN ig_int8 val); Does not work with InfiniBand x1! Sets the skew of a lane for the transmitter. By setting the delays for the four lanes to different values a lane to lane skew can be generated. This register can be written anytime even during link up state but the link is likely to go down afterwards and a retraining is typically performed.
-
Methods of the IGCGenerator Class Classes of the C++ Interface LinkPacketRecRun Call Description Return Value Input Parameters See also void LinkPacketRecRun(IN ig_int8 VL = 0x0); Starts monitoring link packets received by the generator. All virtual lanes are monitored for occurring “Normal Link Packets” and “Init Link Packets”. For the virtual lane set in the parameter VL the first occurring link packet will be captured. None VL The first link packet on the virual lane will be captured.
-
Classes of the C++ Interface Methods of the IGCGenerator Class LinkStateWrite Call Description Return Value Input Parameters void LinkStateWrite ( IN ig_int8 linkstate ); Sets the link state machine into one of the states listed in Input Parameters. This is normally performed by the Subnet Management software but if this is not present in the InfiniBand network you may need to do it manually. None linkstate The values taken by linkstate are: • LINKCMD_DOWN The link state machine is down.
-
Methods of the IGCGenerator Class Classes of the C++ Interface LinkTrainingStateWrite Call Description Return Value Input Parameters void LinkTrainingStateWrite ( IN ig_int8 linkstate ); You have to call this function to change the state of the link training state machine from disabled to sleep. Without this call the generator cannot begin establishing an InfiniBand link. None linkstate The values taken by linkstate are: • LINKTRAINCMD_DISABLED The link training state machine is disabled.
-
Classes of the C++ Interface Methods of the IGCGenerator Class OperationalVLWrite Call Description Return Value Input Parameters void OperationalVLWrite (IN ig_int16 allVLState); Enables the virtual lanes on the IBTrainer. None Each bit of the return value represents the enable bit of the corresponding VL. Bit0 holds the enable bit for VL0 and so forth. Set to 1 the virtual lane is enabled.
-
Methods of the IGCGenerator Class Classes of the C++ Interface See also PerformanceCtrMaskWrite PerformanceCtrMaskWrite Call Description Return Value Input Parameters void PerformanceCtrMaskWrite(IN ig_bool direction, IN ig_int8 ctrNum, IN ig_int16 ctrMask); Writes the mask on which VLs the performance counter counts. The performance measurement must not run when using this command.
-
Classes of the C++ Interface Methods of the IGCGenerator Class PerformanceRead Call Description Return Value Input Parameters void PerformanceRead(OUT IGCPerformance &performance, IN ig_int8 ctrNum); Reads out the values of the performance measurement. None Instance of the class IGCPerformance that in which the result will be copied and the counter number of the desired counter.
-
Methods of the IGCGenerator Class Classes of the C++ Interface PacketInit Call Description Return Value Input Parameters See also void PacketInit ( IN IGCPacket & packet ); This method initializes a packet with all the global properties available to the generator (source lid, source gid, and so on). If you do not use this method, you must set the packet header information by some other means.
-
Classes of the C++ Interface Methods of the IGCGenerator Class PatternActionWrite Call Description Return Value Input Parameters void PatternActionWrite ( IN ig_int8 pattern, IN ig_int8 action ); Determines which pattern matcher will be used to match the incoming pattern and the action that will take place when a pattern ‘hit’ occurs. None pattern Selects the pattern matcher that will be used to check for pattern ‘hits’.
-
Methods of the IGCGenerator Class Classes of the C++ Interface • ACTION_NEGATEPATTERN This negates the pattern that determines the pattern ‘hit’ . You can select any combination of these actions using OR. See also “PatternMaskWrite” below, “PatternOffsetWrite” on page 2-36 and “PatternValueWrite” on page 2-37 PatternMaskWrite Call Description Return Value Input Parameters void PatternMaskWrite ( IN ig_int8 pattern, IN const IGCVal & mask ); Writes the pattern mask in the selected pattern matcher.
-
Classes of the C++ Interface Methods of the IGCGenerator Class PatternOffsetWrite Call Description Figure 6 void PatternOffsetWrite ( IN ig_int8 pattern, IN ig_int32 offset ); Defines the offset within a packet where the pattern is applied.
-
Methods of the IGCGenerator Class Classes of the C++ Interface offset The offset value has to be DWORD aligned. See also “PatternActionWrite” on page 2-34, “PatternMaskWrite” on page 2-35 and “PatternValueWrite” below PatternValueWrite Call Description Return Value Input Parameters void PatternValueWrite ( IN ig_int8 pattern, IN const IGCVal & value ); Writes a 64-bit comparison pattern into the value register of the selected pattern matcher.
-
Classes of the C++ Interface Methods of the IGCGenerator Class “PatternActionWrite” on page 2-34, “PatternMaskWrite” on page 2-35 and “PatternOffsetWrite” on page 2-36 2-38 CATC IBTrainer InfiniBand Exerciser API Reference
-
Methods of the IGCGenerator Class Classes of the C++ Interface Ping Call Description void Ping (void); The Error LED on the connected generator starts to flash. Return Value None Input Parameters None See also None ProtocolObserverRead Call Description Return Value Input Parameters See also void ProtocolObserverRead(OUT IGCProtocolObserver &status); Reads out the protocol observer status from the generator. None Instance of the class IGCProtocolObserver into which the result will be copied.
-
Classes of the C++ Interface Methods of the IGCGenerator Class RegisterCallBack Call Description Return Value void RegisterCallBack (IN CBTypes cbType, IN IGCCallBack & pCB, IN ig_bool atEnd = true); Registers a call back. None c Input Parameters cbType Call back Type corresponding to: - CB_STATUS - CB_PROGRESS - CB_PACKETSEND pCB Call back.
-
Methods of the IGCGenerator Class Classes of the C++ Interface RegisterPacketHandler Call Description Return Value Input Parameters void RegisterPacketHandler ( IN IGCPacketHandler & handler ); Registers a packet handler with the generator. All registered packet handlers are served on the “first come (first registered) – first served” basis. None handler The packet handler that is to be registered. atEnd Position the handler is inserted in the handler queue.
-
Classes of the C++ Interface 2-42 Methods of the IGCGenerator Class CATC IBTrainer InfiniBand Exerciser API Reference
-
Methods of the IGCGenerator Class Classes of the C++ Interface VLAllResourceRead Call Description Return Value ig_int32 VLAllResourceRead (void); Reads out in which resource packets received on the virtual lane x will be stored. This register holds the two bit resource info per virtual lane: • 00 Æ Infinite sink • 01 Æ Receive Buffer • 10 Æ Lower Memory • 11 Æ Upper Memory The bits 1 and 0 hold the resource info for VL0 and the bits 3 and 2 for VL1 and so forth.
-
Classes of the C++ Interface Methods of the IGCGenerator Class VLAllResourceWrite Call Description Return Values Input Parameters void VLAllResourceWrite (IN ig_int32 regVal); Writes in which resource packets received on the virtual lane x will be stored. None This register holds the two bit resource info per virtual lane. • 00 Æ Infinite sink • 01 Æ Receive Buffer • 10 Æ Lower Memory • 11 Æ Upper Memory The bits 1 and 0 hold the resource info for VL0 and the bits 3 and 2 for VL1 and so forth.
-
Methods of the IGCGenerator Class Classes of the C++ Interface ResetPacketSend Call Description void ResetPacketSend ( void ); Clears the send buffer. This is of relevance when a packet cannot be sent out (the link is down or the cable is disconnected) and you wish to discard the packet rather than wait for it to be sent out.
-
Classes of the C++ Interface Methods of the IGCGenerator Class • SKIP_2 (DWORD that is inserted looks like this IDLE IDLE COM SKP) • SKIP_3 (DWORD that is inserted looks like this COM SKP SKP SKP) StatusRead Call Description Return Value Input Parameters See also void StatusRead ( IN IGCStatus & status ) const; Supplies the specified IGCStatus class with the latest status information. The status is a snapshot of the current hardware state. None status Hardware status information.
-
Methods of the IGCGenerator Class Classes of the C++ Interface TransmitProg Call Description void TransmitProg ( void ); Programs the generator memory with the data contained in the transmit memory buffer. Return Value None Parameters None See also None TransmitRun Call Description void TransmitRun ( void ); Starts sending packets out of the transmit memory.
-
Classes of the C++ Interface Methods of the IGCGenerator Class TransmitSet Call Description Return Value Input Parameters See also void TransmitSet ( IN const IGCPacket & packet ); Programs a packet into the transmit memory buffer. None packet Contents of the packet to be programmed into the transmit memory buffer. None TransmitStep Call Description void TransmitStep ( void ); Functions as continue if you have selected a certain packet to wait for a software strobe.
-
Methods of the IGCGenerator Class Classes of the C++ Interface TransmitStop Call Description void TransmitStop ( void ); Stops sending out packets from the transmit memory. Return Value None Parameters None See also None UnregisterPacketHandler Call Description Return Value void UnregisterPacketHandler ( IN IGCPacketHandler & handler ); Deletes a packet handler registration.
-
Classes of the C++ Interface Methods of the IGCGenerator Class VLResourceRead Call Description Return Value Input Parameters See also 2-50 ig_int8 VLResourceRead ( IN ig_int8 VL ); Reads back the resource for the specified virtual lane. The read resource for the virtual lane. For resource values refer to VLResourceWrite below. VL The virtual lane to be interrogated.
-
Methods of the IGCGenerator Class Classes of the C++ Interface VLResourceWrite Call Description Return Value Input Parameters void VLResourceWrite ( IN ig_int8 VL, IN ig_int8 resource ); Defines the resource for each of the enabled virtual lanes. None VL The virtual lane for which a resource is to be assigned.
-
Classes of the C++ Interface Methods of the IGCGenerator Class VLStateRead Call Description Return Value Input Parameters See also ig_int8 VLStateRead ( IN ig_int8 VL ); Reads the current state of the virtual lane (VL). Responses are 0 for disabled and 1 for enabled. Current state of the virtual lane. For states and return values refer to VLStateWrite below. VL The virtual lane to be interrogated.
-
Methods of the IGCGeneratorList Class Classes of the C++ Interface Methods of the IGCGeneratorList Class This class creates a list of all connected generators. When the class is created it scans the entire USB bus for all connected IBTrainer InfiniBand generators.
-
Classes of the C++ Interface Methods of the IGCGeneratorList Class ~IGCGeneratorList, Destructor Call Description ~IGCGeneratorList ( void ); Destructor of the class. Return Value None Parameters None See also None Count Call Description Return Value 2-54 int Count ( void ) const; Returns the number of generators found. The number of generators found.
-
Methods of the IGCGeneratorList Class Classes of the C++ Interface Get Call Description Return Value Input Parameters See also const IGCGeneratorInfo & Get ( IN int index ) const; Returns the IGCGeneratorInfo class with the index index. This call can be used from TCL. Reference to the IGCGeneratorInfo object. index Generator index.
-
Classes of the C++ Interface Methods of the IGCGeneratorList Class Rescan 2-56 Call void Rescan ( void ); Description Rescans the USB bus.
-
Methods of the IGCGeneratorInfo Class Classes of the C++ Interface Methods of the IGCGeneratorInfo Class This class provides ‘static’ information needed from a generator. You can use this information to connect a generator either via a USB port or by using its serial number.
-
Classes of the C++ Interface Methods of the IGCGeneratorInfo Class GetSerial Call Description Return Value const char * GetSerial ( void ) const; Returns the serial number of the generator. Pointer to the serial number. Parameters None See also None GetProductString Call Description Return Value 2-58 const char * GetProductString ( void ) const; Returns the product string of the generator. Pointer to the product string.
-
Methods of the IGCGeneratorInfo Class Classes of the C++ Interface Print Call ostream & Print (ostream & o) const; Description Prints a (human readable) list of the connected generators to the specified stream. Return Value Returns a reference to an ostream object with a list of connected generators. Input Parameters See also o The stream to print into. This provides you with the possibility to print to a file or to stdout.
-
Classes of the C++ Interface Methods of the IGCPacket Class Methods of the IGCPacket Class The class IGCPacket is not for direct use by the programmer. The classes IGCIBAPacket, IGCRawIPPacket, IGCRawPacket, IGCMADPacket and IGCSMPPacket are derived from this class and provide the user interface to programming the packets. The constructor is protected. Use constructors from derived classes for construction and DeletePacket() for deletion.
-
Methods of the IGCPacket Class Classes of the C++ Interface virtual void GetPayload (OUT IGCBuffer & bufPld) const; ig_int32 GetType ( void ) const; ig_int16 GetVCRC (void) const; virtual ig_bool HasPayload (void) const; virtual ~IGCPacket (); IGCPacket * NewPacket ( IN & IGCBuffer databuffer ); void SetPacketLength ( IN ig_int16 length ); void SetPayload ( IN const & IGCBuffer dataarray ); virtual void SetPRBSPayloadSize (IN ig_size size); Inherited Members The following table lists th
-
Classes of the C++ Interface Methods of the IGCPacket Class AppendPayloadBuffer Call Description Return Value Output Parameters See also void AppendPayloadBuffer ( OUT IGCBuffer & buffer ) const; Appends a packet's payload to a byte stream buffer. The payload of several packets can be packed together this way (for instance for the purpose of recombining a message). None buffer Reference to IGCBuffer object. A buffer containing the appended payload.
-
Methods of the IGCPacket Class Classes of the C++ Interface DeletePacket Call Description void DeletePacket ( void ); Calls the destructor. Return Value None Parameters None See also “IGCPacket, Destructor” on page 2-66 GetActualLength Call Description Return Value Parameters See also virtual ig_int16 GetActualLength ( void ) const; Returns actual packet length. The call SetPacketLenght ( GetActualLength() ); automatically sets the correct packet length.
-
Classes of the C++ Interface Methods of the IGCPacket Class GetType Call Description Return Value ig_int32 GetType ( void ) const; Returns the type of packet. Five predefined packet types can be returned. You can add your own definitions as required. The packet type.
-
Methods of the IGCPacket Class Classes of the C++ Interface GetVCRC Call Description Return Value ig_int16 GetVCRC (void) const; Returns the VCRC of the packet. The VCRC Parameters None See also None HasPayload Call Description Return Value virtual ig_bool HasPayload (void) const {return IGD_TRUE;} Returns if this type of packet has a payload The packet type.
-
Classes of the C++ Interface Methods of the IGCPacket Class IGCPacket, Destructor Call Description virtual ~IGCPacket (); Destructor. Return Value None Parameters None See also “DeletePacket” on page 2-63 NewPacket Call Description Return Value Input Parameters See also 2-66 IGCPacket * NewPacket ( IN & IGCBuffer databuffer ); Takes the byte stream buffer databuffer and creates a new packet out of it. This function is static and can be used without the need of a packet object.
-
Methods of the IGCPacket Class Classes of the C++ Interface SetPacketLength Call Description Return Value Input Parameters See also void SetPacketLength ( IN ig_int16 length ); Sets the packet length within the local routing header to the specified length. You can create falsified packets by specifying an incorrect length. None length A 16-bit integer specifying the packet length in bytes (see “Local Routing Header Properties” on page 4-14). The length must be a multiple of four bytes.
-
Classes of the C++ Interface Methods of the IGCPacket Class SetPRBSPayloadSize Call Description Return Value Input Parameters See also 2-68 virtual void SetPRBSPayloadSize (IN ig_size size); Sets the size of the PRBS payload. None Size Payload size in bytes. The size must be a multiple of 4 bytes.
-
Methods of the IGCRawPacket Class Classes of the C++ Interface Methods of the IGCRawPacket Class The class IGCRawPacket holds an InfiniBand raw packet. Only the local routing header is present in this type of packet. Note that the use of DeletePacket() is the recommended method of calling a destructor even though this class has its own destructor. DeletePacket() is defined in the base class IGCPacket (see “DeletePacket” on page 2-63).
-
Classes of the C++ Interface Inherited Members The following table lists the inherited members of the IGCPacket class that are recommended for direct use (see also “Methods of the IGCObject Class” on page 2-98): void AppendBuffer ( OUT IGCBuffer & buffer ) const; void AppendPayloadBuffer ( OUT IGCBuffer & buffer ) const; IGCPacket Clone ( void ) const; void DeletePacket ( void ); virtual ig_int16 GetActualLength ( void ) const; virtual ig_bool HasPayload (void) const; ig_int32 GetType ( void
-
Methods of the IGCRawPacket Class Classes of the C++ Interface IGCRawPacket, Constructor Call Description IGCRawPacket ( void ); Constructor. Return Value None Parameters None See also None IGCRawPacket, Destructor Call Description virtual ~IGCRawPacket ( void ); Destructor.
-
Classes of the C++ Interface Methods of the IGCRawIPPacket Class Methods of the IGCRawIPPacket Class This class holds raw IPv6 packets that pass through the InfiniBand network. Note that the use of DeletePacket() is the recommended method of calling a destructor even though this class has its own destructor. DeletePacket() is defined in the base class IGCPacket (see “DeletePacket” on page 2-63).
-
Methods of the IGCRawIPPacket Class Inherited Members Classes of the C++ Interface The following tables list all inherited members of the IGCPacket class that are recommended for direct use (see also “Methods of the IGCObject Class” on page 2-98): void AppendBuffer ( OUT IGCBuffer & buffer ) const; void AppendPayloadBuffer ( OUT IGCBuffer & buffer ) const; IGCPacket * Clone ( void ) const; void DeletePacket ( void ); virtual ig_int16 GetActualLength ( void ) const; virtual ig_int32 GetICRC (v
-
Classes of the C++ Interface Methods of the IGCRawIPPacket Class IGCRawIPPacket, Constructor Call Description IGCRawIPPacket (); Constructor. Return Value None Parameters None See also None IGCRawIPPacket, Destructor Call Description 2-74 virtual ~IGCRawIPPacket ( void ); Destructor.
-
Methods of the IGCIBAPacket Class Classes of the C++ Interface Methods of the IGCIBAPacket Class The class IGCIBAPacket is derived directly from the IGCPacket class. It holds a standard InfiniBand packet. The functions Set() and Get() necessary to manipulate packet properties are derived from the base class IGCObject. (This is true for all packet classes.) Note that the use of DeletePacket() is the recommended method of calling a destructor even though this class has its own destructor.
-
Classes of the C++ Interface Characteristic Members void Methods of the IGCIBAPacket Class The following table lists the characteristic members of the IGCIBAPacket class that are recommended for direct use: Init (IN Opcode code, IN ig_bool IsGlobal); IGCIBAPacket (IN Opcode code, IN ig_bool IsGlobal); IGCIBAPacket ( void ); virtual Inherited Members The following table lists the inherited members of the IGCPacket class (see also “Methods of the IGCObject Class” on page 2-98): void AppendBuffer ( OU
-
Methods of the IGCIBAPacket Class Classes of the C++ Interface Init Call Description Return Value Input Parameters void Init ( IN Opcode code, IN ig_bool IsGlobal ); Initializes the InfiniBand packet. None code For opcodes refer to “Enumeration Definitions” on page 3-1. IsGlobal Boolean value that determines whether the packet carries a global routing header. See also None IGCIBAPacket, Default Constructor Call Description IGCIBAPacket ( void ); Default constructor.
-
Classes of the C++ Interface Methods of the IGCIBAPacket Class IGCIBAPacket, Constructor for the Class Call Description Return Value Input Parameters IGCIBAPacket (IN Opcode code, IN ig_bool IsGlobal); Constructor for the class. None code For opcodes refer to “Enumeration Definitions” on page 3-1 IsGlobal Boolean value that determines whether the packet carries a global routing header.
-
Methods of the IGCMADPacket Class Classes of the C++ Interface Methods of the IGCMADPacket Class This class is intended for creating MADs (Management Datagrams). While a MAD packet can also be created using the IGCIBAPacket class, it is simpler to use the MAD packet class. The IGCMADPacket class is derived from the IGCIBAPacket class. Note that the use of DeletePacket() is the recommended method of calling a destructor even though this class has its own destructor.
-
Classes of the C++ Interface 2-80 Methods of the IGCMADPacket Class CATC IBTrainer InfiniBand Exerciser API Reference
-
Methods of the IGCMADPacket Class Inherited Members Classes of the C++ Interface The following tables list all inherited members of the IGCPacket class that are recommended for direct use (see also “Methods of the IGCObject Class” on page 2-98): void AppendBuffer ( OUT IGCBuffer & buffer ) const; void AppendPayloadBuffer ( OUT IGCBuffer & buffer ) const; IGCPacket * Clone ( void ) const; void DeletePacket ( void ); virtual ig_int16 GetActualLength ( void ) const; virtual ig_int32 GetICRC (voi
-
Classes of the C++ Interface Methods of the IGCMADPacket Class IGCMADPacket, Constructor Call Description Return Value Parameters See also IGCMADPacket ( ig_bool IsGlobal ); Constructor. None IsGlobal Boolean value that determines whether the packet carries a global routing header. None ~IGCMADPacket, Destructor Call Description 2-82 virtual ~IGCMADPacket ( void ); Destructor.
-
Methods of the IGCBuffer Class Classes of the C++ Interface Methods of the IGCBuffer Class The class IGCBuffer provides a buffer, which contains any number of bytes. The class can be used to represent packets as byte streams or to handle any byte arrays necessary. There are functions to convert packets to buffers and vice versa. The buffer class has also functions to save and load its content.
-
Classes of the C++ Interface Methods of the IGCBuffer Class IGCBuffer, Constructor Call Description IGCBuffer ( void ); Constructor for the class. Return Value None Parameters None See also None IGCBuffer, Destructor Call Description ~IGCBuffer ( void ); Destructor of the class. Return Value None Parameters None See also None ReadFile Call Description Return Value Input Parameters See also 2-84 void ReadFile ( const char * filename ); Reads a file into a buffer.
-
Methods of the IGCBuffer Class Classes of the C++ Interface WriteFile Call Description Return Value Input Parameters See also void WriteFile ( const char * filename ); Writes the content of a buffer to a file. This deletes the contents of the buffer. None filename The file to be written. None SaveFile Call Description Return Value Input Parameters See also void SaveFile ( const char * filename ); Saves the content of a buffer to a file without emptying the buffer. None filename The file to be saved.
-
Classes of the C++ Interface Methods of the IGCBuffer Class PeekData Call Description Return Value Input Parameters void PeekData (ig_size size, ig_int8ptr pRetData) const; Peeks data from the buffer without modifying its contents. None size The number of bytes. pRetData The result. See also None Push Call Description Return Value Input Parameters void Push ( ig_size nBits, const IGCUIntX & inVal ); Appends bits at the end of the buffer. None nBits The number of bits to be appended.
-
Methods of the IGCBuffer Class Classes of the C++ Interface Pop Call Description Return Value Input Parameters Output Parameters See also void Pop ( ig_size nBits, IGCUIntX & retVal ); Removes bits starting at the beginning of the buffer. None nBits The number of bits to be removed. retVal The bits are stored in retVal.
-
Classes of the C++ Interface Methods of the IGCBuffer Class SetAt Call Description Return Value Input Parameters void SetAt ( ig_size pos, ig_size nBits, const IGCUIntX & inVal ); Sets a certain number of bits to a specific value at the position pos. None pos The position in the buffer. nBits The number of bits to be modified. inVal The value to which the bits should be set.
-
Methods of the IGCBuffer Class Classes of the C++ Interface GetAt Call Description Return Value Input Parameters void GetAt ( ig_size pos, ig_size nBits, IGCUIntX & retVal ) const; Gets a certain number of bits starting at position pos. None pos The position in the buffer. nBits The number of bits to be read out. Output Parameters See also retVal The returned value.
-
Classes of the C++ Interface Methods of the IGCBuffer Class FillRandom Call Description Return Value Input Parameters See also void FillRandom ( ig_size size); Fills the entire buffer with random values. None size Size of the buffer. It is determined by the number of fill characters. None Init Call Description Return Value Input Parameters See also 2-90 void Init ( ig_size size = 0 ); Initializes the buffer with a certain size. Note that the buffer is still empty after the call to Init().
-
Methods of the IGCVal Class Classes of the C++ Interface Methods of the IGCVal Class The various header definitions use various data types for variables (from boolean up to 128 bits for the global route header). For this reason the IGCVal class has been created, which can hold all the different types of values. This avoids the need for a separate call for each data type when setting a property with Set().
-
Classes of the C++ Interface Methods of the IGCVal Class IGCVal, Destructor Call Description virtual ~IGCVal (); Destructor. Return Value None Parameters None See also None Constructor by Type Call Description Return Value Input Parameters See also 2-92 IGCVal ( IGEValType type ); Constructor by type.
-
Methods of the IGCVal Class Classes of the C++ Interface Copy Constructor Call Description Return Value Input Parameters See also IGCVal (const IGCVal & el); Copy constructor. A newly created IGCVal object. el Reference to the object that should be copied.
-
Classes of the C++ Interface Methods of the IGCVal Class Const Conversions Calls operator int ( void ) const; operator ig_int8 ( void ) const; operator ig_int16 ( void ) const; operator ig_int32 ( void ) const; operator IGCUIntX ( void ) const; operator ig_bool ( void ) const; operator IGCString ( void ) const; operator ig_charcptr ( void ) const; Description Return Value 2-94 Const conversions The new IGCVal class with the appropriate content.
-
Methods of the IGCVal Class Classes of the C++ Interface Non Const Conversions Calls operator int ( void ); operator ig_int8 ( void ); operator ig_int16 ( void ); operator ig_int32 ( void ); operator IGCUIntX & ( void ); operator ig_bool ( void ); operator IGCString & ( void ); operator ig_charcptr ( void ); operator ig_int8ptr ( void ); operator ig_charcptr ( void ) const; Description Return Value Non const conversions The new IGCVal class with the appropriate content.
-
Classes of the C++ Interface Methods of the IGCVal Class Assignments Calls IGCVal & operator = (const int val); IGCVal & operator = (const ig_int8 val); IGCVal & operator = (const ig_int16 val); IGCVal & operator = (const ig_int32 val); IGCVal & operator = (const IGCUIntX & val); IGCVal & operator = (const ig_bool val); IGCVal & operator = (const IGCString & val); IGCVal & operator = (ig_charcptr val); IGCVal & operator = (const IGCVal & el); Description Return Value Input Parameters Assignments IGCVa
-
Methods of the IGCVal Class Classes of the C++ Interface Comparisons Calls ig_bool operator == (const int val) const; ig_bool operator == (const ig_int8 val) const; ig_bool operator == (const ig_int16 val) const; ig_bool operator == (const ig_int32 val) const; ig_bool operator == (const IGCUIntX & val) const; ig_bool operator == (const ig_bool val) const; ig_bool operator == (const IGCString & val) const; ig_bool operator == (ig_charcptr pString) const; ig_bool operator == (const IGCVal & val) const; De
-
Classes of the C++ Interface Methods of the IGCObject Class Methods of the IGCObject Class This class is purely virtual and cannot be created by the user. It implements the Set() and Get() functions for all classes with properties. The constructor and destructor of this class are protected and not for public use.
-
Methods of the IGCObject Class Classes of the C++ Interface Set Call Description Return Value Input Parameters void Set ( IN ig_int32 prop, IN const IGCVal & val ); Sets a property to a certain value. None prop The property to be set. The list of properties is dependent on the derived class. For the appropriate list refer to “Properties and Programmatic Settings” on page 4-1. val The value assigned to the property.
-
Classes of the C++ Interface Methods of the IGCObject Class Default Call Description virtual void Default ( void ); Sets all properties to default values. Refer to “Properties and Programmatic Settings” on page 4-1.
-
Methods of the IGCStatus Class Classes of the C++ Interface Methods of the IGCStatus Class The IGCStatus class contains several information properties that reflect the current status of the connected generator. You pass a reference of an IGCStatus class to the generator and the generator fills the class with the appropriate data. The properties of this class are listed in “Properties and Programmatic Settings” on page 4-1.
-
Classes of the C++ Interface Methods of the IGCStatus Class ~IGCStatus, Destructor Call Description ~IGCStatus ( void ); Destructor of the class. Return Value None Parameters None See also None Print Call Description Prints the status as a text representation to the specified ostream. Return Value Returns a reference to an ostream object with the status information for the connected generator. Input Parameters o The stream to print into.
-
Methods of the IGCPacketHandler Class Classes of the C++ Interface Methods of the IGCPacketHandler Class The class IGCPacketHandler provides the methods for the packet handler to manage packets within the handler. You cannot use the class directly, it is purely virtual and has to be derived. You need to implement versions of the calls CheckPacket() and HandlePacket().
-
Classes of the C++ Interface Methods of the IGCPacketHandler Class ~IGCPacketHandler, Destructor Call Description virtual ~IGCPacketHandler (); Destructor of the class. Return Value None Parameters None See also None CheckPacket Call Description Return Value virtual IGEPacketStatus CheckPacket ( IGCPacket & packet ) = 0; Called from the generator to check if the packet handler wants to deal with the packet.
-
Methods of the IGCPacketHandler Class Classes of the C++ Interface HandlePacket Call virtual IGEPacketStatus HandlePacket ( IGCPacket & packet ) = 0; Description Called from the generator if the call to CheckPacket() (see above) returned ACCEPT. No other packet handler is called thereafter for this packet. Return Value The return value is the same as for CheckPacket. It is ignored in this release. Input Parameters See also packet The packet to be handled by the packet handler.
-
Classes of the C++ Interface Methods of the IGCPacketHandlerTcl Class Methods of the IGCPacketHandlerTcl Class The class IGCPacketHandlerTcl lets you register two TCL scripts that handle and check packets. This is a convenience function to help you work with TCL scripts. NOT E The SMA handler that manages MAD packets is also part of the software distribution. It is provided as a sample in the form of a TCL script.
-
Methods of the IGCPacketHandlerTcl Class Classes of the C++ Interface IGCPacketHandlerTcl Call Description Return Value Input Parameters IGCPacketHandlerTcl ( char *checkScript, char *handleScript ); Constructor for the class. None checkScript The check script is passed to the class as character pointer. handleScript The handle is passed to the class as character pointer. See also None ~IGCPacketHandlerTcl, Destructor Call Description virtual ~IGCPacketHandlerTcl (); Destructor of the class.
-
Classes of the C++ Interface Methods of the IGCCallBack Class Methods of the IGCCallBack Class The class IGCCallBack provides the methods to handle callbacks from the API. You cannot use the class directly, it is purely virtual and has to be derived. You need to implement method Notify() in your derived class. The generator uses this method to pass the callback data for handling. You are free to do whatever is necessary in this method.
-
Methods of the IGCCallBack Class Classes of the C++ Interface IGCCallBack, Constructor Call Description IGCCallBack (void); Default constructor. As IGCCallBack is pure virtual, you cannot use this directly. Instead, derive from IGCCallBack and implement Notify (see ~IGCCallBack, Destructor below). Return Value None Parameters None See also None ~IGCCallBack, Destructor Call Description virtual ~IGCCallBack (); Destructor of the class.
-
Classes of the C++ Interface Methods of the IGCCallBack Class Notify Call Description NOT E Return Value virtual IGECBReturn Notify (ig_int32 changeMask, IGCObject & obj, IGCGenerator & generator) = 0; Called from the generator with the callback data. Notify is declared protected and cannot be called directly from user programs! Valid values are: • REJECT (0) - Pass.
-
Methods of the IGCCallBack Class Classes of the C++ Interface SetNotifyMask Call Description void SetNotifyMask (ig_int32 mask) Sets the mask for this callback. Each bit represents a property in the data object (e.g. set mask to (1 << IGCStatus::LinkState) to see link state changes.) Return Value N/A Input Parameters mask See also QueryNotifyMask QueryNotifyMask Call Description Return Value Parameters ig_int32 QueryNotifyMask (void) const Query the current notification mask The mask.
-
Classes of the C++ Interface Methods of the IGCCallBackTcl Class Methods of the IGCCallBackTcl Class The class IGCCallBackTcl lets you register a TCL script that handles callback events. This is a convenience function to help you work with TCL scripts. NOT E See the example in the programming guide The following table lists the characteristic members of the IGCCallBackTcl class: (Constructor) Files 2-112 IGCCallBackTcl (ig_charcptr script); #include
-
Methods of the IGCCallBackTcl Class Classes of the C++ Interface IGCCallBackTcl Call Description Return Value Input Parameters IGCCallBackTcl (ig_charcptr script ); Constructor for the class. None script The script is passed to the class as character pointer. It must be the name of a TCL procedure. This must be of the form: proc myScript {pCallBack changeMask pObject pGenerator} {
} pCallBack is a pointer to the callback object, so you can call Set/QueryNotifyMask from within your script.
-
Classes of the C++ Interface Methods of the Error Class Methods of the Error Class As with all other classes within the generator, the error class IGCError can be printed using the C++ stream operator or the method Print() (see “Methods of the IGCGeneratorInfo Class” on page 2-57). This results in a textual error description readable by humans.
-
Methods of the Error Class Classes of the C++ Interface Clear Call Description void Clear( void ); Clears all errors. Return Value None Parameters None See also None Error Call Description Return Value EErrtype Error ( void ) const; Returns the error code. Eerrtype object. Holds the error code. See also “EErrtype” on page 3-1. Parameters None See also None IGCError, Constructor Call Description IGCError ( void ); Constructor.
-
Classes of the C++ Interface Methods of the Error Class IGCError, Copy Constructor Call Description Return Value Input Parameters See also IGCError ( IN const IGCError & err ); Copy constructor. None err Reference to an IGCError object. None IGCError, Destructor Call Description ~IGCError ( void ); Destructor. Return Value None Parameters None See also None GetErrorText Call Description Return Value 2-116 IGCString GetErrorText ( void ) const; Copy constructor. IGCString object.
-
Methods of the Error Class Classes of the C++ Interface Operator Call ostream & operator << ( ostream & o, const IGCError & theErr ); Description Returns the error to the specified stream in the form of a textual description. Return Value Reference to the ostream object that holds the error text.
-
Classes of the C++ Interface Methods of the IGCSMPPacket Class Methods of the IGCSMPPacket Class This class is intended for creating SMPs (Subnet Management Packets). While a SMP packet can also be created using the IGCMADPacket class, it is simpler to use the SMP packet class. The IGCSMPPacket class is derived from the IGCMADPacket class. Note that the use of DeletePacket() is the recommended method of calling a destructor even though this class has its own destructor.
-
Methods of the IGCSMPPacket Class Inherited Members Classes of the C++ Interface The following tables list all inherited members of the IGCPacket class that are recommended for direct use (see also “Methods of the IGCObject Class” on page 2-98): void AppendBuffer ( OUT IGCBuffer & buffer ) const; void AppendPayloadBuffer ( OUT IGCBuffer & buffer ) const; IGCPacket * Clone ( void ) const; void DeletePacket ( void ); virtual ig_int16 GetActualLength ( void ) const; virtual ig_int32 GetICRC (voi
-
Classes of the C++ Interface Methods of the IGCSMPPacket Class IGCSMPPacket, Constructor Call Description IGCSMPPacket ( void ); Constructor. Return Value None Parameters None See also None ~IGCSMPPacket, Destructor Call Description 2-120 virtual ~IGCSMPPacket ( void ); Destructor.
-
Enumeration Definitions EErrtype Description Enum over all different error codes. The following list of errors gives detailed descriptions: Error Description IGE_OK = 0 Everything is OK. IGE_FATAL Fatal error occurred. IGE_RANGE Range checking failed. IGE_ASSERT Assertion failed. Usually an unrecoverable error. IGE_OUTOFMEM The application has run out of memory. IGE_INVALIDHANDLE The handle you are using is invalid.
-
Enumeration Definitions Methods of the IGCSMPPacket Class IGCGenerator::IGEPropName Description Enumerated integer for all property values that can be set within the generator. For a description of the properties, see “Properties and Programmatic Settings” on page 4-1. IGCPacket::IGEPropName Description Enumerated integer for all property values that can be set within the base class IGCPacket (see also “Properties and Programmatic Settings” on page 4-1).
-
Methods of the IGCSMPPacket Class Reliable Connection Enumeration Definitions Unreliable Connection Reliable Datagram RC_RDMAREADresponseFirst RD_RDMAREADresponseFirst RC_RDMAREADresponseMiddle RD_RDMAREADresponseMiddle RC_RDMAREADresponseLast RD_RDMAREADresponseLast RC_RDMAREADresponseOnly RD_RDMAREADresponseOnly RC_Acknowledge RD_Acknowledge RC_AtomicAcknowledge RD_AtomicAcknowledge RC_CmpSwap RD_CmpSwap RC_FetchAdd RD_FetchAdd 0x15-0x1f Reserved for RC 0x55-0x5f Reserved for RD CAT
-
-
Properties and Programmatic Settings The following lists of properties are used to program the IBTrainer. You can set all properties directly. Some settings have a generic impact on the behavior of the generator; these are listed under Generator Properties below. Certain settings can be made with any packet; these are listed under “Status Properties” on page 4-3.
-
Properties and Programmatic Settings Table 6 Generator Property List (IGCGenerator::Prop) Property Name Range Default Description PRBSSeed 0 – 211 1 Starts a seed of the internal PRBS for data payload generation. A value of 0 results in all 0s for the payload. BADPacketDiscard 0–1 1 = discard Discards or keeps invalid packets on receive. Works for packets with bad ICRC (bad VCRC and EBP are discarded in HW).
-
Status Properties Properties and Programmatic Settings Status Properties The following list of properties determine the current state of the connected generator. They stem from the class IGCStatus. Table 7 IGCStatus Property List (IGCStatus::EPropName) Property Name Range Default Description (if = 1) TransmitRunning 0-1 0 The transmit memory is currently sending packets. TransmitFinished 0-1 0 The transmit memory has completed sending all packets.
-
Properties and Programmatic Settings Status Properties Property Name Range Default Description (if = 1) SendFinished 0–1 0 The send buffer has successfully sent out a packet. SendError 0–1 0 The link was down when sending packet or it was downed while sending packet from buffer. The send buffer automatically switches back to stop mode. SendWaitTriggerIn 0–1 0 The send buffer is waiting for an external trigger event.
-
Status Properties Properties and Programmatic Settings Property Name Range Default Description (if = 1) LinkState -- LINKSTATE_DOWN Current state of the link state machine. The following results are possible: LINKSTATE_DOWN LINKSTATE_ARM LINKSTATE_ACTIVE LINKSTATE_INIT LINKSTATE_ACTIVEDEFER LaneSkew CATC IBTrainer InfiniBand Exerciser API Reference -- 0 Receiver Lane Skew Status: Bit0-3: LaneA Bit4-7: LaneB Bit8-11: LaneC Bit12-15: LaneD The unit of the Skew is Symbol Times.
-
Properties and Programmatic Settings IGCNodeInfo Properties IGCNodeInfo Properties The IGCNodeInfo properties are determined by the list of values kept in the struct NodeInfo for each InfiniBand port. A complete description is available in the InfiniBand Specification, Section 14.2.5.3.
-
IGCNodeDescription Properties Properties and Programmatic Settings IGCNodeDescription Properties The IGCNodeDescription properties are determined by the list of values kept in the struct NodeDescription for each InfiniBand port. The complete description is listed in the InfiniBand Specification, Section 14.2.5.2.
-
Properties and Programmatic Settings IGCPortInfo Properties IGCPortInfo Properties The IGCPortInfo properties are determined by the list of values kept in the struct PortInfo for each InfiniBand port. The complete description is listed in the InfiniBand Specification, Section 14.2.5.6. Table 11 List of IGCPortInfo Properties Property Name 4-8 Range in bits Default Access Description M_Key 64 RW Management key. GidPrefix 64 RW GID Prefix for this port. LID 16 RW Base LID for this port.
-
IGCPortInfo Properties Properties and Programmatic Settings Property Name Range in bits Default Access Description LinkDownDefaultState 4 RW Link Down State. Only valid transitions are valid if writing this field. M_KeyProtectBits 2 RW Defines the level of protection. Reserved274 3 RO Reserved, shall be zero. LMC 3 RW LID mask for multipath support. LinkSpeedActive 4 RO Current active link speed. LinkSpeedEnabled 4 RW Enabled Link Speed. NeighborMTU 4 RW Active Maximum MTU.
-
Properties and Programmatic Settings Property Name 4-10 IGCPortInfo Properties Range in bits Default Access Description PartitionEnformcementOutbound 1 RW Support for optional partition enforcement (transmitting packets). FilterRawPacketInbound 1 RW Support for optional raw packet enforcement (receiving packets). FilterRawPacketOutbound 1 RW Support for optional raw packet enforcement (transmitting packets). M_KeyViolations 16 RW Number of SMP packets with invalid M_Keys.
-
Packet Properties Properties and Programmatic Settings Packet Properties The following lists of properties are used to set up a single packet. The packet can then be passed to an object of type generator and can either be sent immediately, or it can be programmed into the transmit memory. The following lists of properties are part of IGCPacket::IGEPropName or IGCIGAPacket::IGEPropName.
-
Properties and Programmatic Settings Packet Properties Generic Packet Properties Packet properties consist of pure packet properties as well as header and payload settings necessary to make up an InfiniBand packet. Table 12 4-12 Property List (Generic Portion) Property Name Range Default Description IGP_InterPacketDelayOffset 0-3 0 Inter Packet Delay (before this packet).
-
Packet Properties Properties and Programmatic Settings Error insertion using an error code is done at the end of a packet. The worst test case for the receiving decoder occurs when any of the symbols listed in the following table are received, with the exception of EGP (end of good packet). Sending four running disparity errors within 16 symbol clocks amounts to a check whether the InfiniBand link automatically reinitializes (see the table below).
-
Properties and Programmatic Settings Packet Properties Local Routing Header Properties These are also part of the IGCPacket::IGEPropName property values. The following lists of properties give an overview of what can be set within an InfiniBand packet. The lists follow very much the specification for InfiniBand headers. Table 14 Part of IGCPacket::IGEPropName: Local Routing Header Props Property Name Range Default Description LRH_VL 0 - 15 0 Virtual Lane. LRH_LVer 0 - 15 0 Link Version.
-
Packet Properties Properties and Programmatic Settings Global Routing Header Properties This list of properties shows what you can set in the global routing header (if present). Table 15 IGCIBAPacket::IGEPropName: Global Routing Header Props Property Name Range Default Description GRH_IPVer 0 - 15 6 IP Version. GRH_TClass 0 - 255 0 Traffic Class. GRH_FlowLabel 0 – 220 0 Flow Label. GRH_PayLen 0 – 65535 0 Payload Length. GRH_NxtHdr 0 - 255 Pre-calculated Next Header.
-
Properties and Programmatic Settings Packet Properties Base Transport Header Properties This header is present in all packets. Table 16 4-16 IGCIBAPacket::Prop: Base Transport Header Properties Property Name Range Default Description BTH_OpCode IGCVal::Opcode 0 Opcode. To use a reserved opcode specify the value as ig_int32. BTH_SE 0-1 0 Solicited Event. BTH_M 0-1 User Migration State. BTH_PadCnt 0-4 Pre-calculated Pad Count. BTH_TVer 0 - 16 0 Transport Header Version.
-
Packet Properties Properties and Programmatic Settings Extended Transport Header Fields Depending on the opcode, different types of extended header fields are present. These fields and the appropriate property values are listed below. The Reliable Datagram Extended Transport Header (RDETH) is always present if the packet is part of a reliable datagram message. Table 17 Reliable Datagram Extended Transport Header (RDETH) Property Name Range Default Description RDETH_Reserved0 0 - 255 0 Reserved.
-
Properties and Programmatic Settings Packet Properties Table 19 RDMA Extended Transport Header Property List Property Name Range Default Description RETH_VA 0 – 264 0 Virtual Address. RETH_R_Key 0 – 232 0 Remote Key. RETH_DMALen 0 – 232 0 DMA Length. The Atomic Extended Transport Header is present in atomic request messages. Table 20 Atomic Extended Transport Header (AtomicTEH) Property List Property Name Range Default Description AtomicETH_VA 0 – 264 0 Virtual Address.
-
Packet Properties Properties and Programmatic Settings The Atomic ACK Extended Transport Header is present in all Atomic ACK packets. Table 22 Atomic ACK Extended Transport Header Property List Property Name Range Default Description AtomicAckETH_OrigRemDt 0 – 264 0 Original Remote Data. The Immediate Data Extended Transport Header is present in the last packet of a request with immediate data.
-
-
Index E error handling 1-5 B base transport header properties 4-16 C classes of the c++ interface control command language 2-1 1-9 D data classes 2-8 E exception handling 1-5 extended transport header fields 4-17 F fields extended transport header 4-17 G generator classes 2-2 generator properties 4-1 generic packet properties 4-12 global routing header properties 4-15 L local routing header properties 4-14 M methods common to all classes 2-14 methods igcgenerator class 2-16 igcgeneratorlist clas