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.
>



Reply via email to