[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: no target for slot #



Hi, all,

Thank you all very much for giving me suggestions.

First of all, I want to clarify my simulation. It is not related to
multicasting, so I didn't define any group. But I do use $ns
set-address-format expanded when the node number exceeds some number. I
don't know if that affects the simulation. Right now, I am using only small
number of nodes.

Second, I did carefully check the topology of the network and the source,
but I didn't find anything wrong. The strange thing is like this. My source
code structure:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proc build_topology {} {
....
....
}

proc build_source {} {
.....
.....
}

proc record {} {
.....
.....
}

proc finish {} {
....
....
}

set ns [new Simulator]
#open all the files for recording
......

$ns at 0.0 "build_topology"
$ns at 0.0 "build_source"
$ns at 0.1 "record"
$ns at 30.0 "finish"

$ns run
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It looks very simple and clear. When I first used $ns at 0.0 "record", it
gave me error:

ns: record: wrong # args: should be {record message ?args...?}
	while executing "record"

I don't know if this is schedule problem. So I changed it to $ns at 0.1
"record". Then it gave me error:

_012: no target for slot 2

When I used "build_topology" instead of $ns at 0.0 "build_topology", and
"build_source" instead of $ns at 0.0 "build_source", it gave me the first
error again.

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?

By the way, Christian, where is the patch you mentioned?

Thank you all for your time and help. I sincerely hope to have your
suggestions.

Huiwen