User Manual, Developers Guide and API Documentation

PhyCommand.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 LTE_MACR_PHYCOMMAND_HPP
00029 #define LTE_MACR_PHYCOMMAND_HPP
00030 
00031 #include <LTE/helper/MIProviderInterface.hpp>
00032 
00033 #include <WNS/service/phy/phymode/PhyModeInterface.hpp>
00034 #include <WNS/service/phy/power/PowerMeasurement.hpp>
00035 #include <WNS/node/Node.hpp>
00036 #include <WNS/service/phy/ofdma/Pattern.hpp>
00037 #include <WNS/ldk/Command.hpp>
00038 #include <WNS/CandI.hpp>
00039 
00040 #include <boost/function.hpp>
00041 
00042 namespace dll {
00043     class ILayer2;
00044     namespace services {
00045         namespace management {
00046             class InterferenceCache;
00047         }
00048     }
00049 }
00050 
00051 namespace lte {
00052     namespace macr {
00053 
00056         class PhyCommand :
00057             public wns::ldk::Command,
00058             public lte::helper::MIProviderInterface
00059         {
00060         public:
00069             typedef enum { Tx, Rx } ModeRxTx;
00070 
00071             PhyCommand(){
00072                 // initialize with meaningless default values
00073                 local.subBand = -1;
00074                 local.beamforming = false;
00075                 local.beam = 0;
00076                 local.pattern = wns::service::phy::ofdma::PatternPtr();
00077                 local.start = 0.0;
00078                 local.stop = 0.0;
00079                 local.modeRxTx = Rx;
00080 
00081                 magic.source = NULL;
00082                 magic.destination = NULL;
00083                 magic.remoteCache = NULL;
00084                 magic.txp = wns::Power();
00085                 magic.estimatedSINR = wns::CandI();
00086                 magic.isRetransmission = false;
00087             };
00089             virtual double
00090             getMutualInformation() const { return local.rxPowerMeasurementPtr->getMIB(); };
00091 
00100             struct Local {
00104                 int subBand;
00106                 bool beamforming;
00108                 int beam;
00110                 wns::service::phy::ofdma::PatternPtr pattern;
00112                 simTimeType start;
00114                 simTimeType stop;
00116                 ModeRxTx modeRxTx;
00118 
00122                 wns::service::phy::phymode::PhyModeInterfacePtr phyModePtr;
00123                 //wns::service::phy::phymode::PhyModeInterfacePtr phyModePtr;
00125 
00129                 wns::service::phy::power::PowerMeasurementPtr rxPowerMeasurementPtr;
00130 
00132                     boost::function<void()> onAirCallback;
00133             } local;
00135             struct Peer {} peer;
00138             struct Magic {
00139                 wns::node::Interface* source;
00140                 wns::node::Interface* destination;
00141                 dll::services::management::InterferenceCache* remoteCache;
00142                 //wns::PositionableInterface* mobility; // can calculate distances
00144                 wns::Power txp;
00147                 wns::CandI estimatedSINR;
00148                 bool isRetransmission;
00149             } magic;
00150 
00151         };
00152     } // macr
00153 } // lte
00154 
00155 #endif // NOT defined LTE_MACR_PHYCOMMAND_HPP
00156 
00157 

Generated on Fri May 25 03:32:05 2012 for openWNS by  doxygen 1.5.5