Hi

You have not configured the notes yet

have a look at wireless examples in the below link


http://www.grc.upv.es/manets/local/docs/ns-tutorial/nsscript5.html

regards

Qasim Iqbal



> hi,
>
> i'm tried to run the follow script:
>
>
> set ns [new Simulator]
>
> set tracefd [open simple.tr w]
> $ns trace-all $tracefd
>
> set n 2
>
> set nf [open out.nam w]
> $ns namtrace-all-wireless $nf 50 50
>
> proc finish {} {
>         global ns nf tracefd
>         $ns flush-trace
>
>         close $nf
>       close $tracefd
>
>         exec nam out.nam &
>         exit 0
> }
>
> set topo [new Topography]
>
> $topo load_flatgrid 50 50
>
> create-god $n
>
> set nodo(0) [$ns node]
> set nodo(1) [$ns node]
>
> $nodo(0) set X_ 37.0
> $nodo(0) set Y_ 36.0
> $nodo(0) set Z_ 0.0
>
> $nodo(1) set X_ 39.0
> $nodo(1) set Y_ 38.0
> $nodo(1) set Z_ 0.0
>
>
> set tcp [new Agent/TCP]
> $tcp set class_ 2
> set sink [new Agent/TCPSink]
> $ns attach-agent $nodo(0) $sink
> $ns attach-agent $nodo(1) $tcp
> $ns connect $tcp $sink
> set ftp [new Application/FTP]
> $ftp attach-agent $tcp
> $ns at 10.0 "$ftp start"
>
>
>
> $ns at 150.0 "$nodo(0) reset"
> $ns at 150.0 "$nodo(1) reset"
>
>
> $ns at 150.00001 "finish"
>
> $ns run
>
>
> But the follow error shows up:
>
> num_nodes is set 2
> routes not yet computed
> routes not yet computed
> --- Classfier:: no-slot() default handler (tcl/lib/ns-lib.tcl) ---
>       _o17: no target for slot -1
>       _o17 type: Classifier/Hash/Dest
> content dump:
> classifier _o17
>       0 offset
>       0 shift
>       2147483647 mask
>       1 slots
>                 slot s: _o21 (Classifier/Port)
>       -1 default
> ---------------- Finished standard no-slot() default handler ------------
> child process exited abnormally
>
> i don't understand what the error is...
>
> i wait for your help
>
>


Reply via email to