[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: no target for slot #
> $ns at 0.0 "build_topology"
> $ns at 0.0 "build_source"
> $ns at 0.1 "record"
> $ns at 30.0 "finish"
>
> $ns run
I think that you should use
build_topology
build_source
$ns at 0.1 "record"
$ns at 30.0 "finish"
$ns run
because this way you ensure that the build_topolgy is called first. If
they are inserted into the scheduler, I don't think you can be sure that
build_topology gets called before build_source.
> I feel this is very very strange and also very very interesting, but I have
> no idea what is happening. I am also confused between setting ns as global
> and getting ns as an instance of the simulator. I think if there is only one
> ns in the simulation, then they are the same, right?
When you use
set ns [new Simulator]
you instantiate a new simulator object. When you use "global ns" in a
procedure you are saying that you want to reference the variable called ns
with global scope. Of course, the variable must exist to do anything.
Sean.
-----
Sean Murphy, Email: [email protected]
Teltec Ireland, Phone: +353-1-7045080
DCU, Dublin 9, Fax: +353-1-7045092
Ireland.