IBR-DTNSuite  0.8
daemon/src/routing/flooding/FloodRoutingExtension.h
Go to the documentation of this file.
00001 /*
00002  * EpidemicRoutingExtension.h
00003  *
00004  *  Created on: 18.02.2010
00005  *      Author: morgenro
00006  */
00007 
00008 #ifndef FLOODROUTINGEXTENSION_H_
00009 #define FLOODROUTINGEXTENSION_H_
00010 
00011 #include "core/Node.h"
00012 
00013 #include "routing/SummaryVector.h"
00014 #include "routing/BaseRouter.h"
00015 #include "routing/NeighborDatabase.h"
00016 
00017 #include <ibrdtn/data/Block.h>
00018 #include <ibrdtn/data/SDNV.h>
00019 #include <ibrdtn/data/BundleString.h>
00020 
00021 #include <ibrcommon/thread/Queue.h>
00022 
00023 #include <list>
00024 #include <queue>
00025 
00026 namespace dtn
00027 {
00028         namespace routing
00029         {
00030                 class FloodRoutingExtension : public BaseRouter::ThreadedExtension
00031                 {
00032                 public:
00033                         FloodRoutingExtension();
00034                         virtual ~FloodRoutingExtension();
00035 
00036                         void notify(const dtn::core::Event *evt);
00037 
00038                 protected:
00039                         void run();
00040                         void __cancellation();
00041 
00042                 private:
00043                         class Task
00044                         {
00045                         public:
00046                                 virtual ~Task() {};
00047                                 virtual std::string toString() = 0;
00048                         };
00049 
00050                         class SearchNextBundleTask : public Task
00051                         {
00052                         public:
00053                                 SearchNextBundleTask(const dtn::data::EID &eid);
00054                                 virtual ~SearchNextBundleTask();
00055 
00056                                 virtual std::string toString();
00057 
00058                                 const dtn::data::EID eid;
00059                         };
00060 
00064                         ibrcommon::Queue<FloodRoutingExtension::Task* > _taskqueue;
00065                 };
00066         }
00067 }
00068 
00069 #endif /* EPIDEMICROUTINGEXTENSION_H_ */