[ns] Rate of CBR Traffic ?

2007-03-06 Thread leticia bela

 Hi aditya,

when an event arrives suddenly for example the load of network is important, I 
will need to reduce the rate. at the beginning I do not have idea of the time 
of arrival of this event.

thanks a lot 





Aditya [EMAIL PROTECTED] a écrit : Hii


$ns at 1.0 $cbr set interval_ 0.05

This will change the rate at 1.0 time instance. You can change it any
number of times.

Bye.




On 3/6/07, leticia bela  wrote:
 yes that  fix it statically. but how to dynamically change this rate during
 simulation  (dynamiquely).
 Thanks a lot

 Aditya  a écrit :
  Hii

 $cbr set interval_ 0.05

 This is how u can specify interval between 2 packets.

 I hope this wll solve ur problem.

 Regards
 -- Aditya



 On 3/6/07, leticia bela wrote:
 
  Hi All,
  Could anyone please tell me how to change dynamiquely the rate of cbr
 trafic under NS2
 
 
  your help is highly appreciated,
 
  Regards



  
  Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions
 ! Profitez des connaissances, des opinions et des expériences des
 internautes sur Yahoo! Questions/Réponses.





-
 Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur 
Yahoo! Questions/Réponses.


Re: [ns] Rate of CBR Traffic ?

2007-03-06 Thread ?e Olbert

Hi leticia,

My knowledge of ns2 is very limited so you need to specify abit more...
where is your code that checks the load of the network for example. When
it reaches a set threshold, can't you just call $cbr set interval_ 0.05?

If you need to set the rate from cc code then you could do like this:

char out[100];
sprintf(out, $cbr set interval_ 0.05);
Tcl tcl = Tcl::instance();
tcl.eval(out);

$cbr set interval_ 0.05 is sent as a tcl commando to the interpreter and
the interval is changed.

This is very similar to the ns2 Tutorial for creating a Ping agent:
http://www.isi.edu/nsnam/ns/tutorial/nsnew.html#fourth


  Hi aditya,

 when an event arrives suddenly for example the load of network is
 important, I will need to reduce the rate. at the beginning I do not have
 idea of the time of arrival of this event.

 thanks a lot





 Aditya [EMAIL PROTECTED] a ??rit : Hii


 $ns at 1.0 $cbr set interval_ 0.05

 This will change the rate at 1.0 time instance. You can change it any
 number of times.

 Bye.






Re: [ns] Rate of CBR Traffic ?

2007-03-06 Thread Farrag, Osama


Two suggestions: 

Call/invoke TCL from C, read the user manual and it provides examples of how to 
do that. Then you can use this command to change the rate.

Alternatively, look for command method for CBR class and the associated C code 
for that class that handles set interval; then you should invoke similar code 
from the C code that determines when the network load is high or low.

Best Regards
Osama Farrag

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of leticia bela
Sent: Tuesday, March 06, 2007 4:17 AM
To: Aditya; ns-users@ISI.EDU
Subject: [ns] Rate of CBR Traffic ?


 Hi aditya,

when an event arrives suddenly for example the load of network is important, I 
will need to reduce the rate. at the beginning I do not have idea of the time 
of arrival of this event.

thanks a lot 





Aditya [EMAIL PROTECTED] a écrit : Hii


$ns at 1.0 $cbr set interval_ 0.05

This will change the rate at 1.0 time instance. You can change it any
number of times.

Bye.




On 3/6/07, leticia bela  wrote:
 yes that  fix it statically. but how to dynamically change this rate during
 simulation  (dynamiquely).
 Thanks a lot

 Aditya  a écrit :
  Hii

 $cbr set interval_ 0.05

 This is how u can specify interval between 2 packets.

 I hope this wll solve ur problem.

 Regards
 -- Aditya



 On 3/6/07, leticia bela wrote:
 
  Hi All,
  Could anyone please tell me how to change dynamiquely the rate of cbr
 trafic under NS2
 
 
  your help is highly appreciated,
 
  Regards



  
  Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions
 ! Profitez des connaissances, des opinions et des expériences des
 internautes sur Yahoo! Questions/Réponses.





-
 Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur 
Yahoo! Questions/Réponses.