[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: new agent
Hi Lamzouki,
One mistake that seems to be common is that when someone
writes a command method for their new agent, they miss
calling the parent class' command methods, so the last
line of your HelloAgent::command() method should be
``return Agent::command(argc, argv);''.
You might check if you have this problem.
Kannan
> From: lamzouki <[email protected]>
> Date: Wed, 10 Jun 1998 08:40:13 +0200
> I would like to create a new agent and attach it to a node.
> In particular:
>
> set n1 [$ns node]
> set a1 [new Agent/HELLO]
> $n1 attach $a1
>
> results in
>
> _o13
> _o17
> error when calling class Agent/HELLO: target _o14
>
> I create the agent as it is described in chapter "Agents". How do I fix
> the problem?
>
> Thanks very much.
>
> --LAMZOUKI
>
>
--
[email protected]
http://www.isi.edu/~kannan