首页 > 解决方案 > ns2.35 ,从内部调用

问题描述

我想在 ns2.35 中添加新代理,它安装在 ubuntu 14.04 上。我的 ubuntu 安装在新驱动器上,我的笔记本电脑是 dell vostro 1520。我尝试添加一些新的代理代码,如 wfrp 等。但我有一个错误:你能帮帮我吗?

提前致谢。

ubuntu@ubuntu-Vostro-1520:~/ns-allinone-2.35/ns-2.35/wfrp$ ns wfrp_802_15_4.tclnum_nodes is set 100

    (_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 14)
    (Simulator create-wireless-node line 14)
    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 mnode_($i) [$ns node]
}"
    (file "wfrp_802_15_4.tcl" line 74)

标签: ns2

解决方案


WFRP_XFXVanes_imp-protocol_ns235.patch https://drive.google.com/file/d/0B7S255p3kFXNTmRDNC15R3prSTA/view?usp=sharing

wfrp-examples.tar.gz https://drive.google.com/file/d/0B7S255p3kFXNT1F3enFHd1RqZFU/view?usp=sharing

我的测试: $ ns235-XFX.Vanet-wfrp-64 wfrp_802_15_4.tcl ...好的,文件 nam-wfrp-802-15-4.nam 3.4MB,trace-wfrp-802-15-4.tr 7.6MB 已创建。

WFRP (Ubuntu 14.04)

tar xvf ns-allinone-2.35_gcc5.tar.gz

https://drive.google.com/file/d/0B7S255p3kFXNVVlxR0ZNRGVORjQ/view?usp=sharing

cd ns-allinone-2.35/
patch -p0 < WFRP_XFXVanets_imp-protocol_ns235.patch
./install
cd ns-2.35/
cp ns ns235-wfrp
sudo cp ns235-wfrp /usr/local/bin/

ns235-wfrp wfrp_802_15_4.tcl → https://www.dropbox.com/s/7xdvofuw239rt7m/wfrp_802_15_4.tcl-output.txt?dl=0


推荐阅读