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

coloured nodes in nams again



Ingela Anderton wrote:

> Judith Mathewson wrote:
>
> > > >   Hi everyone,
> > > >
> > > > I have tried all the hints that you have given me without any success.
> > > > I am
> > > > working with PIM-SM.  I would like to be able to have colored nodes in
> > > > my
> > > > nam.  I have tried writing
> > > >
> > > > set node(0) [$ns node]
> > > > $node(0) color "blue"
> > > >
> > > > in my script to run PIM-SM but it doesn't work.  I get an error message
> > > > saying:
> > > >
> > > > _o76: unable to dispatch method color
> > > >     while executing
> > > > "$n14 color "blue""
> This sounds very strange! I know this works. Here is a simple script
> that uses this and that I just succecfully have run on my computer.
>
>   ------------------------------------------------------------------------
>
>                          Name: ftp_test.tcl
>    ftp_test.tcl          Type: TCL Program (application/x-tcl)
>                      Encoding: base64
>                   Description: ns simulation script
>
>   ------------------------------------------------------------------------
>
> This script will create the following senario:
>         ____                      ____
>        /    \                    /    \
>       /      \                  /      \
>       |  0   | ---------------- |   1  |
>       \      /                  \      /
>        \____/                    \____/
>
>      red circle                 blue circle
>
> (With some imagnination you can see the my ASCCII drawing portray two
> circles (nodes) with a line (link) between them ;-) )
>
> However the link is black even though I used
> $ns duplex-link-op $node(0) $node(1) color "yellow" as suggested by Haobo.
>
> If you can't run my script without problems maybe your version of ns/nam is
> and older and buggier one!
>
> Hope this helps.
>
> --
> /m.v.h. Ingela
>
> //The highway of life is always under construction. //
>
>                 |\      _,,,--,,_  ,)
>                 /,`.-'`'   -,  ;-;;'
>                |,4-  ) )-,_ ) /\
>               '---''(_/--' (_/-'

  Hi,

I have tried running this script without any success unfortunately.  I have
updated the version of ns that I am running to the 2.1b3 version and the error
message that I get is that it cannot find/open the out.tcl file.

Could you explain to me how the nams now work without having to create a
separate nam script file?

Thanks for any help that you can offer,

Judith Mathewson