Can anyone tell me how should I fix this problem? I have a problem in attaching more than one applications to one agent. (I am running ns2.35 on Ubuntu12.10)
There are two nodes(Source and Destination) in my environment and here are some features:
I attached a loss-monitor agent on Destination node.
I attached an udp agent on Source node.
I attached 9 applications on the udp agent by following declaration:
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
I got errors "cant read agent address: no such variable.." when running my tcl file ( see [error message])
Did I use the wrong way to attach these applications to the agent? How can I fix that?
Thank you all in advance.
[error messages]
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)