User Manual, Developers Guide and API Documentation

Component.hpp

Go to the documentation of this file.
00001 /*******************************************************************************
00002  * This file is part of openWNS (open Wireless Network Simulator)
00003  * _____________________________________________________________________________
00004  *
00005  * Copyright (C) 2004-2007
00006  * Chair of Communication Networks (ComNets)
00007  * Kopernikusstr. 5, D-52074 Aachen, Germany
00008  * phone: ++49-241-80-27910,
00009  * fax: ++49-241-80-22242
00010  * email: info@openwns.org
00011  * www: http://www.openwns.org
00012  * _____________________________________________________________________________
00013  *
00014  * openWNS is free software; you can redistribute it and/or modify it under the
00015  * terms of the GNU Lesser General Public License version 2 as published by the
00016  * Free Software Foundation;
00017  *
00018  * openWNS is distributed in the hope that it will be useful, but WITHOUT ANY
00019  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
00020  * A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00021  * details.
00022  *
00023  * You should have received a copy of the GNU Lesser General Public License
00024  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00025  *
00026  ******************************************************************************/
00027 
00028 #ifndef RISE_MOBILITY_COMPONENT_HPP
00029 #define RISE_MOBILITY_COMPONENT_HPP
00030 
00031 #include <WNS/node/component/Component.hpp>
00032 #include <WNS/PositionObserver.hpp>
00033 #include <WNS/logger/Logger.hpp>
00034 #include <WNS/Observer.hpp>
00035 #include <WNS/probe/bus/ContextCollector.hpp>
00036 
00037 namespace rise { namespace scenario { namespace mobility {
00038 
00039     class MobilityInterface;
00040 
00051     class Component :
00052         public wns::node::component::Component,
00053         public wns::Observer<wns::PositionObserver>
00054     {
00055     public:
00056         Component(
00057             wns::node::Interface* node,
00058             const wns::pyconfig::View& pyConfigView);
00059 
00060         virtual
00061         ~Component();
00062 
00063         // Component interface
00064         virtual void
00065         onNodeCreated();
00066 
00067         virtual void
00068         onWorldCreated();
00069 
00070         virtual void
00071         onShutdown();
00072 
00073         // PositionObserver interface
00074         virtual void
00075         positionWillChange();
00076 
00077         virtual void
00078         positionChanged();
00079 
00080         int
00081         getX();
00082 
00083         int
00084         getY();
00085 
00086         int
00087         getZ();
00088 
00089     private:
00090         virtual void
00091         doStartup();
00092 
00096         MobilityInterface* mobility;
00097 
00101         wns::logger::Logger logger;
00102 
00106         wns::probe::bus::ContextCollectorPtr positionContextCollectorX;
00107 
00111         wns::probe::bus::ContextCollectorPtr positionContextCollectorY;
00112 
00116         wns::probe::bus::ContextCollectorPtr positionContextCollectorZ;
00117     };
00118 } // mobility
00119 } // scenario
00120 } // rise
00121 
00122 #endif // NOT defined RISE_MOBILITY_COMPONENT_HPP
00123 
00124 

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