- Home Page of ProjectGuideline.com ›
- Forums ›
- Get Help to do your B.E., and M.E., M.Tech., & M.S., Project in Ns2 ›
- timer implementation
aarthi
Participant
hi all,
i need to implement the timer concept in ns2. is it that the timer scripts that is available in the ns2 package has to be used as it is, just by including that i my algorithm or whether we can modify that timer that is present in the package?. kindly share ur ideas. waiting for reply..
CharlesPandian
Keymaster
I hope that you don’t need to implement a timer.
Refer the code of routing protocols such as DSR. There you may find the usage of a timer.
For example, in DSR, you will find this timer code in DSRAgent.h
class SendBufferTimer : public TimerHandler {
public:
SendBufferTimer(DSRAgent *a) : TimerHandler() { a_ = a;}
void expire(Event *e);
protected:
DSRAgent *a_;
};