User Manual, Developers Guide and API Documentation

FrameHeadCollector.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-2009
00006  * Chair of Communication Networks (ComNets)
00007  * Kopernikusstr. 5, D-52074 Aachen, Germany
00008  * email: info@openwns.org
00009  * www: http://www.openwns.org
00010  * _____________________________________________________________________________
00011  *
00012  * openWNS is free software; you can redistribute it and/or modify it under the
00013  * terms of the GNU Lesser General Public License version 2 as published by the
00014  * Free Software Foundation;
00015  *
00016  * openWNS is distributed in the hope that it will be useful, but WITHOUT ANY
00017  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
00018  * A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00019  * details.
00020  *
00021  * You should have received a copy of the GNU Lesser General Public License
00022  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00023  *
00024  ******************************************************************************/
00025 
00026 #ifndef WIMAC_FRAME_FRAMEHEADCOLLECTOR_H
00027 #define WIMAC_FRAME_FRAMEHEADCOLLECTOR_H
00028 
00029 #include <WIMAC/services/IChannelQualityObserver.hpp>
00030 
00031 #include <WNS/scheduler/MapInfoProviderInterface.hpp>
00032 
00033 #include <WNS/ldk/ldk.hpp>
00034 #include <WNS/ldk/fcf/CompoundCollector.hpp>
00035 #include <WNS/ldk/tools/UpUnconnectable.hpp>
00036 
00037 namespace wimac {
00038     class Component;
00039     class PhyUser;
00040 
00041     namespace service {
00042         class ConnectionManager;
00043     }
00044 }
00045 
00046 namespace wimac { namespace frame {
00047 
00051         class FrameHeadCommand :
00052             public wns::ldk::Command
00053         {
00054         public:
00055             struct {
00056                 wns::simulator::Time duration;
00057             } local;
00058             struct {
00059                 //MapInfoType mapInfo;
00060                 int baseStationID;
00061             } peer;
00062             struct {
00063             } magic;
00064         };
00065 
00069         class FrameHeadCollector :
00070             public wns::ldk::fcf::CompoundCollector,
00071             public wns::ldk::CommandTypeSpecifier<FrameHeadCommand>,
00072             public wns::ldk::HasConnector<>,
00073             public wns::ldk::HasReceptor<>,
00074             public wns::ldk::tools::UpUnconnectable,
00075             public wns::Cloneable<FrameHeadCollector>,
00076             public wns::events::CanTimeout
00077         {
00078         public:
00079             FrameHeadCollector( wns::ldk::fun::FUN* fun,
00080                                 const wns::pyconfig::View& config );
00081 
00082             void onFUNCreated();
00083 
00084             void doOnData( const wns::ldk::CompoundPtr& );
00085 
00086             void doStart(int);
00087             void doStartCollection(int){}
00088             void finishCollection(){}
00089 
00090             virtual wns::simulator::Time getCurrentDuration() const
00091             {
00092                 return getMaximumDuration();
00093             }
00094 
00095             void onTimeout();
00096 
00097         private:
00098             wimac::Component* layer_;
00099             wimac::PhyUser* phyUser_;
00100             wimac::service::ConnectionManager* connectionManager_;
00101             wimac::service::IChannelQualityObserver* channelQualityObserver_;
00102             wns::SmartPtr<const wns::service::phy::phymode::PhyModeInterface> phyMode_;
00103         };
00104     }
00105 }
00106 #endif
00107 

Generated on Thu May 24 03:32:12 2012 for openWNS by  doxygen 1.5.5