![]() |
User Manual, Developers Guide and API Documentation |
![]() |
00001 /****************************************************************************** 00002 * Glue * 00003 * __________________________________________________________________________ * 00004 * * 00005 * Copyright (C) 2005-2006 * 00006 * Lehrstuhl fuer Kommunikationsnetze (ComNets) * 00007 * Kopernikusstr. 16, D-52074 Aachen, Germany * 00008 * phone: ++49-241-80-27910 (phone), fax: ++49-241-80-22242 * 00009 * email: wns@comnets.rwth-aachen.de * 00010 * www: http://wns.comnets.rwth-aachen.de * 00011 ******************************************************************************/ 00012 00013 #ifndef GLUE_ROUTING_HPP 00014 #define GLUE_ROUTING_HPP 00015 00016 #include <WNS/ldk/FunctionalUnit.hpp> 00017 #include <WNS/ldk/CommandTypeSpecifier.hpp> 00018 #include <WNS/ldk/HasConnector.hpp> 00019 #include <WNS/ldk/HasReceptor.hpp> 00020 #include <WNS/ldk/HasDeliverer.hpp> 00021 #include <WNS/ldk/Command.hpp> 00022 #include <WNS/ldk/Classifier.hpp> 00023 00024 #include <WNS/service/dll/DataTransmission.hpp> 00025 #include <WNS/pyconfig/View.hpp> 00026 #include <WNS/logger/Logger.hpp> 00027 00028 namespace glue { 00029 00030 namespace convergence { 00031 class UnicastUpper; 00032 } // convergence 00033 00034 class RoutingCommand : 00035 public wns::ldk::Command 00036 { 00037 public: 00038 struct {} local; 00039 struct {} peer; 00040 struct {} magic; 00041 }; 00042 00055 class Routing : 00056 virtual public wns::ldk::FunctionalUnit, 00057 public wns::ldk::CommandTypeSpecifier<RoutingCommand>, 00058 public wns::ldk::HasReceptor<>, 00059 public wns::ldk::HasConnector<>, 00060 public wns::ldk::HasDeliverer<>, 00061 public wns::Cloneable<Routing> 00062 { 00063 public: 00064 Routing(wns::ldk::fun::FUN* fun, const wns::pyconfig::View& _config); 00065 00066 virtual 00067 ~Routing(); 00068 00069 private: 00070 virtual void 00071 doSendData(const wns::ldk::CompoundPtr& compound); 00072 00073 virtual void 00074 doOnData(const wns::ldk::CompoundPtr& compound); 00075 00076 virtual void 00077 onFUNCreated(); 00078 00079 virtual bool 00080 doIsAccepting(const wns::ldk::CompoundPtr& compound) const; 00081 00082 virtual void 00083 doWakeup() 00084 { 00085 getReceptor()->wakeup(); 00086 } // doWakeup 00087 00088 bool allowRouteChange; 00089 00090 wns::ldk::CommandPool* routingCommandPool; 00091 00092 struct Friends 00093 { 00094 wns::ldk::FunctionalUnit* addressProviderFU; 00095 } friends; 00096 00097 wns::pyconfig::View config; 00098 wns::logger::Logger logger; 00099 }; 00100 } // glue 00101 00102 #endif // NOT defined GLUE_ROUTING_HPP 00103 00104
1.5.5