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

Re: nam problem with node



You have to use Simulator::node{} to create new nodes so that it appears
in nam trace file. If you want your own node class, also see
Simulator::node-config{} and how you can change these methods to include
your new node types. See ns manual chapter 17 for detail. 

I assume you were using 2.1b6 or current snapshot. If an earlier version,
you probably want to study how Simulator::node{} is written.

- Haobo

On Fri, 18 Feb 2000, Tan Su Wei wrote:

> Dear all,
> First, thank to those answer my questions on ns command line arguments
> questions.
> Here I an other problem :
> 
>     I'd create a new classifier based on label forwarding mechanism. And
> added a new node class inherited from Node class in otcl.
> 
>     The classifier seem work correctly (from the result of the trace
> file). But when I tried to display the animation with nam, there are
> errors:
> The follow is the error when i test a two node network using the new
> node I create.
> n0 is define first.
> 
>     n0-----n1
> Error message:
> 
> Failed to start animator:
> class Animator: constructor failed: class NetworkModel/Auto: constructor
> failed: error when calling class NetworkModel/Auto: link 1 0 10000000
> 0.0050000000000000001 0 1.0
> node 1 is not defined...
>     (_o6 cmd line 1)
>     invoked from within
> "_o6 cmd link 1 0 10000000 0.0050000000000000001 0 1.0"
>     invoked from within
> "catch "$self cmd $args" ret"
>     (procedure "_o6" line 2)
>     (SplitObject unknown line 2)
>     invoked from within
> "$self link $dst $src [bw2real $rate] [time2real $delay] $length $rev"
>     (procedure "_o6" line 46)
>     (NetworkModel layout_link line 46)
>         ...
>         ...
> 
> 
> Is there any thing I need to add to get nam running correctly.
> 
> 
>