ns2.35,从内部调用

时间:2018-07-26 14:16:30

标签: ns2

我想在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)

1 个答案:

答案 0 :(得分:0)

WFRP_XFXVanets_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