[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] Class parameter setup problem
Hi,
As the constructor of class CBR_Traffic below,
-----
CBR_Traffic::CBR_Traffic() : seqno_(0)
{
bind_bw("rate_", &rate_);
bind("random_", &random_);
bind("packetSize_", &size_); // *attention this line* //
bind("maxpkts_", &maxpkts_);
}
-----
I wonder you should use the followig command.
------
Application/Traffic/CBR set packetSize_ 1000
------
Danaus
> Hi, the following scenario illustrates a problem that I have been having
> throughout my scripts:
>
> Application/Traffic/CBR set packet_size 1000
>
> set cbr0 [new Application/Traffic/CBR]
>
> puts "CBR packet size = [$cbr0 set packet_size_]"
>
> My understanding is that line one should modify the CBR class parameters
> so that all subsequent instances are created with a packet size of
> 1000. This is not the case and both line 3 as well as the nam scripts
> suggest that line one has no efect.
>
> Any ideas as to the cause of this?
>
> Regards
> Joshua Mentz
>
>