>
> Yes - go into your NS src then open Tools/CBR_Traffic.cc
> Create a timer (see NS2 Manual / follow the tcp.cc/tcp.h code as an
> example) that triggers every x seconds, and use a random variable function
> to set the rate variable. You may need to create a header file for
> CBR_Traffic.cc -> .h and define the class in there w/ your timer.
>
> You can also use a random vairable to change the timer interval each time.
>
> Remember to rm CBR_Traffic.o / make clean, before compiling running Make
> again within the NS src directory.
>
> To collect that rate value for use elsewhere in the system, a quick hack
> would be to create a global variable and store that info there.
>
> Hope that helps!
> Best,
> Scott
>
>
>
> On Tue, Jun 23, 2009 at 2:20 AM, El hadi Cherkaoui
> <[email protected]>wrote:
>
>>
>>
>>
>> --- En date de : Lun 22.6.09, El hadi Cherkaoui <[email protected]> a
>> écrit :
>>
>> De: El hadi Cherkaoui <[email protected]>
>> Objet: TCL VAR bind C++ linking
>> À: "NS user" <[email protected]>
>> Date: Lundi 22 Juin 2009, 19h04
>>
>> hi every one,
>>
>> I have a CBR source and i set rate_ at 160 kbps.
>>
>> is it possible to change the value of rate_ during the simulation every
>> several seconds (randomly) ?
>> for exemple : 0s to 50s rate_ = 160 kbps
>> 50s and 100s rate_= 140kbps
>> 100s and 150s rate_= 200kbps ....
>>
>> please note that the values in the exemple are static, i want to get this
>> value from an other C++ class.
>>
>> If it's possible thanks to tell me how can i do
>> !
>>
>> Best reagrds.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>