Dear ns-users,

Actually, I implement Mr. Jianping Pan contribution in ns2 regard the mutlistate
error model as it is; I use the following code:
$ns_ node-config -IncomingErrProc UniformErrProc
proc UniformErrProc {} {
        set tmp [new ErrorModel/Uniform 0 pkt]
        set tmp1 [new ErrorModel/Uniform .9 pkt]
        set tmp2 [new ErrorModel/Uniform .5 pkt]

        # Array of states (error models)
        set m_states [list $tmp $tmp1 $tmp2]
        # Durations for each of the states, tmp, tmp1 and tmp2, respectively
        set m_periods [list 0 .0075 .00375]
        # Transition state model matrix
        set m_transmx { {0.95 0.05 0}
          {0   0   1}
          {1   0   0} }
        set m_trunit pkt
        # Use time-based transition
        set m_sttype time
        set m_nstates 3
        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]
}

And I got the Following Errors:
[EMAIL PROTECTED] ~
$ ns multistateerrort.tcl
num_nodes is set 2
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
wrong # args: should be "_o62 self class proc states periods trans transunit stt
ype nstates start"
    (ErrorModel/MultiState init line 1)
    invoked from within
"_o62 init {_o59 _o60 _o61} {0 .0075 .00375} { {0.95 0.05 0}
          {0   0   1}
          {1   0   0} } \\"
    (Class create line 1)
    invoked from within
"ErrorModel/MultiState create _o62 {_o59 _o60 _o61} {0 .0075 .00375} { {0.95 0.0
5 0}
          {0   0   1}
          {1   0   0} } \\"
    invoked from within
"catch "$className create $o $args" msg"
    invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
    (procedure "new" line 3)
    invoked from within
"new ErrorModel/MultiState $m_states $m_periods $m_transmx \\"
    invoked from within
"set em [new ErrorModel/MultiState $m_states $m_periods $m_transmx \\
                $m_trunit $m_sttype $m_nstates $m_nstart]"
    (file "multistateerrort.tcl" line 137)


I?m beginners in ns2 so please forgive me for annoying you.
Would you please send me the detailed steps to implement this error model?
Thank you in advance

Kind Regards






----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

Reply via email to