next up previous contents index
Next: 9.4.2 Default Values Up: 9.4 OTcl Linkage Previous: 9.4 OTcl Linkage

9.4.1 Creating and Manipulating Agents

The following example illustrates the creation and modification of an Agent in OTcl:

        set newtcp [new Agent/TCP] # create new object (and C++ shadow object);
        $newtcp set window_ 20 # sets the tcp agent's window to 20;
        $newtcp target $dest # target is implemented in Connector class;
        $newtcp set portID_ 1 # exists only in OTcl, not in C++;