next up previous contents index
Next: 9.6.1 Example: A ``ping'' Up: 9. Agents Previous: 9.5.5 Implementing Timers

   
9.6 Creating a New Agent

To create a new agent, one has to do the following:

1.
sep0pt
2.
decide its inheritance structureSectionsec:pingexample, and create the appropriate class definitions,
3.
define the []recv and []timeout methods Sectionsec:agents:exmethods,
4.
define any necessary timer classes,
5.
define OTcl linkage functionsSectionsec:agents:exlinkage,
6.
write the necessary OTcl code to access the agentSectionsec:agents:exotclcode.

The action required to create and agent can be illustrated by means of a very simple example. Suppose we wish to construct an agent which performs the ICMP ECHO REQUEST/REPLY (or ``ping'') operations.



 


2000-08-24