0

我尝试在 ns-2.34/tcl/ex/wpan 目录中运行演示 tcl 文件。我将协议更改为 AOMDV。我收到以下错误。

       (_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)

为什么我选择AODV作为协议时程序运行的是AODV。

4

1 回答 1

0

必须为协议设置 Instproc。否则 ns 无法找到新协议。

于 2013-03-06T19:29:20.180 回答