Hi All,
I tried to use the network dynamic command
$ns rtmodel-at 1.0 down $n(1) $n(2)
$ns rtmodel-at 2.0 up $n(1) $n(2)
to fail and recover a link. But when i ran the tcl script, i got the
following message:
Nam syntax has changed: v -t 2 link-up 2 2 1
Please use this format in the future.
v -t <time> -e <tcl expression>
I then changed the syntax to
v 1.0 link-down 1 2
v 2.0 link-up 1 2.
The result i got was this:
$ ns new3.tcl
invalid command name "v"
while executing
"v 1.0 link-down 1 2"
(file "new3.tcl" line 50)
Please can someome tell me what I am doing wrong?
Regards.
Onyekachi.
It does not have to do with the command that you give in the
tcl script, but with the "generated" command produced by the
$ns namtrace-all $filedesc tcl command, which gets written to a
file pointed by $filedesc.
The syntax of this command in the "NAM" file) is what has changed in later
versions
of NAM and as NAM reads the file while displays the simulation on the
screen, it notifies of the obsolete syntax. However, this is only a warning
and not an error, since it still "interprets" the command.
On the other hand, such a command does not exist for the NS interpreter,
and this is why the script crashes when you use it. It is merely a NAM
issue,
for which I wouldn't worry too much.



