AdaptiveProbabilisticBroadcast.h

00001 /*
00002  * ProbabilisticBroadcast.h
00003  *
00004  *  Created on: Nov 26, 2008
00005  *      Author: Damien Piguet, Dimitris Kotsakos, Jérôme Rousselot
00006  */
00007 
00008 #ifndef ADAPTIVEPROBABILISTICBROADCAST_H_
00009 #define ADAPTIVEPROBABILISTICBROADCAST_H_
00010 
00011 #include "ProbabilisticBroadcast.h"
00012 
00013 using namespace std;
00014 
00015 
00024 class AdaptiveProbabilisticBroadcast : public ProbabilisticBroadcast
00025 {
00026 public:
00027 
00028 
00030     virtual void initialize(int);
00031 
00032 protected:
00033   typedef map<int, cMessage*> NeighborMap;
00034 
00036   virtual void handleLowerMsg(cMessage* msg);
00037 
00039     virtual void handleSelfMsg(cMessage* msg);
00040 
00041     void updateNeighMap(ProbabilisticBroadcastPkt* m);
00042 
00043     void updateBeta();
00044 
00045     //read from omnetpp.ini
00046     simtime_t timeInNeighboursTable; //Default ttl for NeighborTable entries in seconds
00047 
00048 
00049     cOutVector bvec;
00050 
00051 
00052     NeighborMap neighMap;
00053 
00054 };
00055 
00056 #endif /* ADAPTIVEPROBABILISTICBROADCAST_H_ */