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

Programming the IBTrainer
Control Command Language
1-10
CATC IBTrainer InfiniBand Exerciser API Reference
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.
IGCPacket_AppendBuffer $pkt $buf
Pop a few bits out of a buffer
into a tcl variable.
Assumes that
$buf
contains the
buffer.
set var [IGCBuffer_Pop $buf
Get a few bits out of a buffer at
a certain position
Assumes that
$buf
contains the
buffer.
set var [IGCBuffer_GetAt $buf
Push a few bits into a buffer.
Assumes that
$buf
contains the
buffer.
IGCBuffer_Push $buf
Set a few bits into a buffer at a
certain position.
Assumes that
$buf
contains the
buffer.
IGCBuffer_SetAt $buf
Print the status on the screen.
NOTE: All
Print()
functions are
mapped into Tcl to return the
printed string. No input parameter
has to be specified!
set stat [new_IGCStatus]
IGCGenerator_UpdateStatus $gen $stat
set str [IGCStatus_Print $stat]
puts "Result: $str"
Packets ready and waiting in a buffer may not contain CRC values!
Using the functions above you can also access the buffer bitwise. The
class IGCBuffer can also be saved to file and restored from file.
NOTE