この問題を解決するにはどうすればよいですか?複数のアプリケーションを 1 つのエージェントに接続する際に問題があります。(Ubuntu12.10 で ns2.35 を実行しています)
私の環境には 2 つのノード (ソースと宛先) があり、ここにいくつかの機能があります。
宛先ノードにロス モニター エージェントをアタッチしました。
ソース ノードに udp エージェントをアタッチしました。
次の宣言により、udp エージェントに 9 つのアプリケーションをアタッチしました。
set nExpGen 9 for {set i 1} {$i <= $nExpGen} {incr i} { set eee($i) [new Application/Traffic/Exponential] $eee($i) attach-agent $udp $ns connect $eee($i) $lmt #nExpGen= number of exponential generators #eee = exponential application #lmt = loss-monitor agent
Tcl ファイルを実行すると、「cant read agent address: no such variable..」というエラーが表示されます ([エラー メッセージ] を参照)。
これらのアプリケーションをエージェントに接続する方法が間違っていませんか? どうすれば修正できますか?
よろしくお願いします。
【エラーメッセージ】
can't read "agent_addr_": no such variable
while executing
"subst $[subst $var]"
(procedure "_o40" line 5)
(Object next line 5)
invoked from within
"_o40 next agent_addr_"
("eval" body line 1)
invoked from within
"eval $self next $args"
(procedure "_o40" line 11)
(Application/Traffic set line 11)
invoked from within
"$dst set agent_addr_"
(procedure "_o3" line 2)
(Simulator simplex-connect line 2)
invoked from within
"$self simplex-connect $dst $src"
(procedure "_o3" line 10)
(Simulator connect line 10)
invoked from within
"$ns connect $eee($i) $lmt"
("for" body line 4)
invoked from within
"for {set i 1} {$i <= $nExpGen} {incr i} {
set eee($i) [new Application/Traffic/Exponential]
$eee($i) attach-agent $udp
$ns con..."
(file "myTest3.tcl" line 47)