2013-03-06 55 views
0

我試圖運行ns-2.34/tcl/ex/wpan目錄下的演示tcl文件。我將協議更改爲AOMDV。我收到以下錯誤。運行aomdv模擬代碼的ns2錯誤

 (_o14 cmd line 1) 
     invoked from within 
    "_o14 cmd addr" 
     invoked from within 
    "catch "$self cmd $args" ret" 
     invoked from within 
    "if [catch "$self cmd $args" ret] { 
    set cls [$self info class] 
    global errorInfo 
    set savedInfo $errorInfo 
    error "error when calling class $cls: $args" $..." 
     (procedure "_o14" line 2) 
     (SplitObject unknown line 2) 
     invoked from within 
    "_o14 addr" 
     ("eval" body line 1) 
     invoked from within 
    "eval $node addr $args" 
     ("default" arm line 2) 
     invoked from within 
    "switch -exact $routingAgent_ { 
    DSDV { 
    set ragent [$self create-dsdv-agent $node] 
    } 
    DSR { 
    $self at 0.0 "$node start-dsr" 
    } 
    AODV { 
    set ragent [$self cre..." 
     (procedure "_o3" line 11) 
     (Simulator create-wireless-node line 11) 
     invoked from within 
    "_o3 create-wireless-node" 
     ("eval" body line 1) 
     invoked from within 
    "eval $self create-wireless-node $args" 
     (procedure "_o3" line 23) 
     (Simulator node line 23) 
     invoked from within 
    "$ns_ node" 
     ("for" body line 2) 
     invoked from within 
    "for {set i 0} {$i < $val(nn) } {incr i} { 
     set node_($i) [$ns_ node] 
     $node_($i) random-motion 0  ;# disable random motion`enter code here` 
    }" 
     (file "wpan_demo1.tcl" line 109) 

當我選擇AOMDV作爲協議時,程序爲什麼運行AODV。

回答

0

必須爲協議設置Instproc。否則,ns無法找到新的協議。