Thank you Mubashir and Ahmad.
If you are not very busy i would have another question. I'm trying to
simulate an efficient flooding and i need the data about transmission power.
I'll try to be clear. I have a MANET with all the nodes moving around and,
supposing a constant signal strength, i want to know it to determine the
distance between the node. If a packet reaches the destination with a low
power i will suppose the node is farthest than another which packet arrives
with a greater power. How can i take this data?
Thank you very much
Maurizio
2008/9/17 Mubashir Rehmani <[EMAIL PROTECTED]>
> Hi Mauriwio Bellemo
>
>
>
> Here is the example of simple timer
> >
> >
> > *Declare this timer in the header fil***e**
> >
> >
> > class MyTimer : public TimerHandler {
>
> > public:
> >
> > MyTimer(AODV* ms) : TimerHandler() {ms_=ms;};
> >
> > protected:
> > virtual void expire(Event* e);
> > AODV* ms_;
> >
> >
> > };
> >
> >
> > MyTimer MS_*timer*_;
>
> >
> >
> > *Declare in the .cc file *
> >
> > void MyTimer::expire(Event*) {
> >
> >
> >
> > ms_->MS_*timer*_.resched(10); //delay of 10 seconds
> > cout<<"time is : "<<Scheduler::instance().clock()<<endl;
>
> > //call any function which you want to schedule....
> >
> > }
> >
>
>
> Now what you have to do is simply in the expire function, just write the
> logic for purging the entries (removal of entries) from the table. For
> instance, you can look at AODV.cc file in which they have clearly defined
> the logic of purging the routes from the routing table.
>
> I hope it helps.
>
> Mubashir Husain Rehmani
>
> Regards
>
>
> 2008/9/17 Maurizio Bellemo <[EMAIL PROTECTED]>
>
>
>> Hi,
>>
>> I'm writing a piece of code to create a routing table with the use of std
>> map. Does anyone know how I can implement lifetime?? I need to create a
>> timer which, at the expiration, causes the removal of the entry in the
>> table. Any suggestions?
>>
>> Thank you very much
>> Maurizio
>>
>
>
>
> --
> Mubashir Husain Rehmani
>
> Mobile : 00 33 (0)6 32 00 89 35
>
>