The coloring options has to be at an Agent level with the fid_ variable.

Example:

$ns color 1 red
set tcp [new Agent/Tcp]
$tcp set fid_ 1

in this way, the flow color in nam will be red for that Agent.

regards

2009/10/25 preeti nimonkar <[email protected]>

>
> hello all ,
> I am using commands
> $ns  color 1 Red
> $tcp0 set class_ 1  with this their is no change of packet flow color
>
> and
> $node4 color blue
> $ns at 0.0 "$node0 color red" gives the following error---
>
> av...@localhost ~/NS_WORKS/ns2program> ns routingex.tcl
> num_nodes is set 6
> INITIALIZE THE LIST xListHead
> Starting Simulation...
> ns: _o14 color red: can't read "attr_(COLOR)": no such element in array
>    while executing
> "eval list "n -t [format "%.15g" [$ns now]] -s $id_ -S COLOR -c $color -o
> $attr_(COLOR) -i $color -I $attr_(LCOLOR)""
>    invoked from within
> "if [$ns is-started] {
>
> $ns puts-nam-config  [eval list "n -t [format "%.15g" [$ns now]] -s $id_ -S
> COLOR -c $color -o $attr_(COLOR) -i $color -I $attr..."
>    (procedure "_o14" line 6)
>    (Node color line 6)
>    invoked from within
> "_o14 color red"
>
>
>
> Can someone point to the exact problem and solution.
> preeti  khanwalkar
>



-- 
Atte.
Daniel Anguita O.
Austral Technologies Ltda.
_______________________
Skype: daniel.anguita
Phone: +56 2 779 2425
[email protected]
_______________________
Noticia: La información contenida en este mensaje e-mail y/o archivos
adjuntos pueden contener información confidencial, privada o privilegiada.
Si usted no es el destinario, cualquier difusión, uso, revisión,
distribución, impresión o copia de la información, contenida en este mensaje
de correo electrónico y/o archivos adjuntos, están estrictamente prohibidas.
Si ha recibido esta comunicación por error, por favor avísenos respondiente
por e-mail o teléfono e inmediatamente y permanentemente elimine este
mensaje y cualquier archivo adjunto. Gracias.

Reply via email to