[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] CBR Agent usage versus CBR traffic




Hi,

My question concerns the use of Agent/CBR versus Application/Traffic/CBR

When I use the bellow source code (Ex1 ) I have the following message :
"using backward compatible Agent/CBR; use Application/Traffic/CBR instead "

################# Ex1 source code ######################

set cbr0 [new Agent/CBR]
$ns attach-agent $n0 $cbr0
$cbr0 set packetSize_ 500
$cbr0 set interval_ 0.01

#Create a Null agent (a traffic sink) and attach it to node n3
set null0 [new Agent/Null]
$ns attach-agent $n3 $null0

#Connect the traffic sources with the traffic sink
$ns connect $cbr0 $null0  
################# End Ex1 source code ######################

But if I use the adviced "Application/Traffic/CBR" as in Ex2 source code I
have the following error message and nothing start after this  : 

    (_o82 cmd line 1)
    invoked from within
"_o82 cmd reset"
    invoked from within
"catch "$self cmd $args" ret"
    (procedure "_o82" line 2)
    (SplitObject unknown line 2)
    invoked from within
"$a reset"
    (procedure "_o10" line 4)
    (Node reset line 4)
    invoked from within
"$Node_($nn) reset"
    (procedure "_o3" line 10)
    (Simulator run line 10)
    invoked from within
"$ns run"
    (file "aa.tcl" line 127)


################# Ex2 source code ######################

set cbr0 [new Application/Traffic/CBR]
$ns attach-agent $n0 $cbr0
$cbr0 set packetSize_ 500
$cbr0 set interval_ 0.01

#Create a Null agent (a traffic sink) and attach it to node n3
set null0 [new Agent/Null]
$ns attach-agent $n3 $null0

#Connect the traffic sources with the traffic sink
$ns connect $cbr0 $null0  
################# End Ex2 source code ######################

How can I avoid the warning message and use the Application/Traffic/CBR ?
Am I obliged to use an Udp agent in order to use the
Application/Traffic/CBR  ? 

Thanks.



--------------------------------
Ahmad BADRAH

Performance Modeling Architect
e-mail : [email protected]
phone  : +33 (0)4 92 94 48 18
Tachys Technologies
Les Algorithmes, ABS BP 29
06901 Sophia-Antipolis Cedex

http://www.tachys.com