User Manual, Developers Guide and API Documentation

Component.hpp

Go to the documentation of this file.
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_COMPONENT_HPP
00014 #define GLUE_COMPONENT_HPP
00015 
00016 #include <WNS/node/component/Component.hpp>
00017 
00018 #include <WNS/service/dll/DataTransmission.hpp>
00019 #include <WNS/service/dll/Handler.hpp>
00020 
00021 #include <WNS/ldk/fun/Main.hpp>
00022 #include <WNS/ldk/CommandTypeSpecifierInterface.hpp>
00023 #include <WNS/ldk/CompoundHandlerInterface.hpp>
00024 #include <WNS/ldk/Layer.hpp>
00025 
00026 #include <WNS/logger/Logger.hpp>
00027 #include <WNS/pyconfig/View.hpp>
00028 #include <WNS/Enum.hpp>
00029 
00030 #include <vector>
00031 
00032 namespace glue { namespace convergence {
00033     class UnicastUpper;
00034     class BroadcastUpper;
00035     class Lower;
00036 } // convergence
00037 } // glue
00038 
00039 namespace glue {
00040 
00044     ENUM_BEGIN(StationTypes);
00045     ENUM(router,  1);
00046     ENUM(client, 2);
00047     ENUM_END();
00048 
00049     typedef int StationType;
00050 
00051 
00062     class Component :
00063         virtual public wns::ldk::Layer,
00064         public wns::node::component::Component
00065     {
00066     public:
00070         Component(
00071             wns::node::Interface* _node,
00072             const wns::pyconfig::View& _config);
00073 
00077         virtual
00078         ~Component();
00079 
00088         virtual void
00089         onNodeCreated();
00090 
00094         virtual void
00095         onWorldCreated();
00096 
00100         virtual void
00101         onShutdown();
00102 
00108         StationType getStationType() const
00109         {
00110             return stationType_;
00111         }
00112 
00114     protected:
00115 
00119         wns::ldk::fun::Main* fun;
00120 
00124         virtual void
00125         doStartup();
00126 
00127     private:
00131         Component(const Component&);
00132 
00136         Component& operator=(const Component&);
00137 
00141         wns::pyconfig::View config;
00142 
00146         convergence::UnicastUpper* unicastUpperConvergence;
00147 
00151         convergence::BroadcastUpper* broadcastUpperConvergence;
00152 
00156         convergence::Lower* lowerConvergence;
00157 
00161         wns::service::dll::UnicastAddress sourceMACAddress;
00162 
00166         StationType stationType_;
00167 
00171         wns::logger::Logger logger;
00172     }; // Component
00173 
00174 } // glue
00175 
00176 
00177 #endif // NOT defined GLUE_COMPONENT_HPP
00178 
00179 

Generated on Sun May 27 03:31:49 2012 for openWNS by  doxygen 1.5.5