[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bugs in errmodel.cc
Hi!
You do not have to run install again. Just go to the directory
ns-2 (i.e CURPATH/ns-allinone/ns-2) and type make. It will recompile only
what was changed.
On Fri, 6 Mar 1998, Gang Xu wrote:
> Hi,
>
> I fixed these two bugs as you told us. Thanks. However, after I make
> change to the source code, do I need to recompile the whole NS stuff? I am
> a new user and I really don't know what to do next. Your help is highly
> appreciated.
>
> (I installed the ns-allinone package.)
>
> > Hi!
> >
> > I found two bugs in errormodel.cc :
> >
> > 1) The variables errPkt_, errByte_ and errTime must be initialized
> > to 0. Otherwise, they can start with very high values. Therefore,
> > many simulations will not experience any loss. That is what I observed on
> > many simulations. Despite a high error rate, no loss happened. I suggest
> > to add the initialization in errmodel.cc (marked with ^^^)
> >
> > ErrorModel::ErrorModel() : Connector(), unit_(EU_PKT), ranvar_(0),
> > onlink_(0), enable_(1), firstTime_(1),
> > errPkt_(0), errByte_(0),errTime_(0) // Bug 1 : omission
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > {
> > bind("rate_", &rate_);
> > bind("errPkt_", &errByte_); // Bug 2 : typo
> > ^^^^^^^^^^^^^^^^^^^
> > bind("errByte_", &errByte_);
> > bind("errTime_", &errTime_);
> > bind("onlink_", &onlink_);
> > bind("enable_", &onlink_);
> > bind("off_mac_", &off_mac_);
> > }
> >
> > 2) There is a typo, we should have : bind("errPkt_", &errPkt_);
> >
> >
> > ___________________________________________________________________
> > Saad Biaz Abou Youssef
> > Graduate Research Assistant Office : (409) 845 50 07
> > Department of Computer Science Home : (409) 862 91 35
> > College Station, TX, 77843-3112
> > ___________________________________________________________________
> >
>
> ----------------------------------
> Gang Xu
> Department of CS
> University of Alabama, Tuscaloosa
> Tel: (205)348-0996(O)
> http://www.eng.ua.edu/~gxu
> ----------------------------------
>
>
___________________________________________________________________
Saad Biaz Abou Youssef
Graduate Research Assistant Office : (409) 845 50 07
Department of Computer Science Home : (409) 862 91 35
College Station, TX, 77843-3112
___________________________________________________________________