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

Re: [ns] Error model in wireless simulation



Hi,

thanks for your help but unfortunately, your code does not work. The problem
(still) lies in connecting the error model to the (wireless) lan model. This
is exactly the problem I already had. I also tried the

$ns lossmodel $em $node0 $node1

command but it gives an error message. When I run ns with your code it gives
me this error:

ns: _o3 lossmodel _o61 _o15 _o37: invalid command name ""
    while executing
"$link errormodule $lossobj"
    (procedure "_o3" line 3)
    (Simulator lossmodel line 3)
    invoked from within
"_o3 lossmodel _o61 _o15 _o37"

Have you got any ideas how to work around this?

Greetings,
Lewie

-- Lewie Donckers
--
-- Computer Science student at the University of Twente, the Netherlands
-- [email protected]
-- http://www.cs.utwente.nl/~donckers/


> here is a sample which might help. say i have two nodes
> s1 and rout and i want to insert a multistate error model
> between there two nodes.
>
> set s1 [$ns node]
> set rout [$ns node]
>
> set tmp [new ErrorModel/Uniform 0.0 pkt]
> set tmp1 [new ErrorModel/Uniform 1.0 pkt]
>
> set m_states [list $tmp $tmp1 ]
>
> set m_periods [list 0.3 0.5 ]
> set m_transmx { {0.45 0.55} {0.55 0.45} }
> set m_trunit pkt
> set m_sttype time
> set m_nstates 2
> set m_nstart [lindex $m_states 0]
>
> set em [new ErrorModel/MultiState $m_states $m_periods $m_transmx
> $m_trunit $m_sttype $m_nstates $m_nstart]
> $em drop-target [new Agent/Null]
>
> $ns at 0.1 "$ns lossmodel $em $s1 $rout"
>
>
> at time 0.1 it will insert the lossmodel between nodes s1 and
> rout.