User Manual, Developers Guide and API Documentation

DataTransmission.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 WNS_SERVICE_PHY_OFDMA_DATATRANSMISSION_HPP
00029 #define WNS_SERVICE_PHY_OFDMA_DATATRANSMISSION_HPP
00030 
00031 #include <WNS/node/Interface.hpp>
00032 #include <WNS/CandI.hpp>
00033 #include <WNS/service/Service.hpp>
00034 #include <WNS/service/phy/ofdma/Pattern.hpp>
00035 #include <WNS/service/phy/phymode/PhyModeInterface.hpp>
00036 #include <WNS/osi/PDU.hpp>
00037 #include <WNS/SmartPtr.hpp>
00038 #include <WNS/PowerRatio.hpp>
00039 #include <map>
00040 
00041 namespace wns { namespace service { namespace phy { namespace ofdma {
00042 
00046     struct Tune
00047     {
00048         double frequency;
00049         double bandwidth;
00050         int numberOfSubCarrier;
00051 
00052         bool operator==(const wns::service::phy::ofdma::Tune& other) const{
00053             return ( (frequency == other.frequency) &&
00054                      (bandwidth == other.bandwidth) &&
00055                      (numberOfSubCarrier == other.numberOfSubCarrier));
00056         }
00057 
00058         Tune& operator=(const wns::service::phy::ofdma::Tune& other){
00059             this->frequency = other.frequency;
00060             this->bandwidth = other.bandwidth;
00061             this->numberOfSubCarrier = other.numberOfSubCarrier;
00062             return (*this);
00063         }
00064     };
00065 
00066     struct BFIdu
00067     {
00068         osi::PDUPtr pdu;
00069         node::Interface* recipient;
00070         int subBand;
00071         PatternPtr pattern;
00072     };
00073 
00075     class TransmissionBase :
00076         public virtual service::Service
00077     {
00078     public:
00079         virtual
00080         ~TransmissionBase(){}
00081 
00085         virtual void
00086         stopTransmission(osi::PDUPtr pdu, int subBand) = 0;
00087 
00091         virtual bool
00092         isReceiving() const = 0;
00093 
00097         virtual std::string
00098         printActiveTransmissions() const = 0;
00099     };
00100 
00102     class NonBFTransmission :
00103         public virtual TransmissionBase
00104     {
00105     public:
00106         virtual
00107         ~NonBFTransmission(){}
00108 
00112         virtual void
00113         startUnicast(osi::PDUPtr pdu,
00114                      wns::node::Interface* recipient,
00115                      int subBand,
00116                      wns::Power requestedTxPower,
00117                      int numberOfSpatialStreams) = 0;
00118 
00122         virtual void
00123         startUnicast(osi::PDUPtr pdu,
00124                      wns::node::Interface* recipient,
00125                      int subBand,
00126                      wns::Power requestedTxPower,
00127                      wns::service::phy::phymode::PhyModeInterfacePtr phyModePtr) = 0;
00128 
00132         virtual void
00133         startBroadcast(osi::PDUPtr pdu,
00134                        int subBand,
00135                        wns::Power requestedTxPower,
00136                        int numberOfSpatialStreams) = 0;
00140         virtual void
00141         startBroadcast(osi::PDUPtr pdu,
00142                        int subBand,
00143                        wns::Power requestedTxPower,
00144                        wns::service::phy::phymode::PhyModeInterfacePtr phyModePtr) = 0;
00145     };
00146 
00148     class BFTransmission :
00149         public virtual  TransmissionBase
00150     {
00151     public:
00152         virtual
00153         ~BFTransmission(){}
00154 
00155         virtual void
00156         startTransmission(wns::osi::PDUPtr pdu,
00157                           wns::node::Interface* recipient,
00158                           int subBand,
00159                           PatternPtr pattern,
00160                           wns::Power requestedTxPower,
00161                           int numberOfSpatialStreams) = 0;
00162 
00163         virtual void
00164         startTransmission(wns::osi::PDUPtr pdu,
00165                           wns::node::Interface* recipient,
00166                           int subBand,
00167                           PatternPtr pattern,
00168                           wns::Power requestedTxPower,
00169                           wns::service::phy::phymode::PhyModeInterfacePtr phyModePtr) = 0;
00170 
00171     };
00172 
00174     class RFSettings :
00175         public virtual service::Service
00176     {
00177     public:
00178         virtual
00179         ~RFSettings(){}
00180 
00182         virtual void
00183         setTxTune(const Tune& txTune) = 0;
00184 
00186         virtual void
00187         setRxTune(const Tune& rxTune) = 0;
00188 
00190         virtual Tune
00191         getRxTune() const = 0;
00192 
00194         virtual Tune
00195         getTxTune() const = 0;
00196 
00198         virtual wns::Power
00199         getMaxPowerPerSubband() const = 0;
00200 
00203         virtual wns::Power
00204         getMaxOutputPower() const = 0;
00205 
00207         virtual bool
00208         isEIRPLimited() const = 0;
00209 
00211         virtual void
00212         setTxRxSwap(bool reverse) = 0;
00213     };
00214 
00216     class SINREstimation :
00217         public virtual service::Service
00218     {
00219     public:
00220         virtual
00221         ~SINREstimation(){}
00222 
00224         virtual std::map<wns::node::Interface*, wns::Ratio>
00225         calculateSINRsRx(const std::vector<node::Interface*>& combination,
00226                  wns::Power Iinter) = 0;
00227 
00229         virtual std::map<wns::node::Interface*, wns::Ratio>
00230         calculateSINRsTx(const std::map<wns::node::Interface*, wns::Power>& Station2NoisePlusIintercell,
00231                  wns::Power x_friendlyness,
00232                  wns::Power txPower) = 0;
00233 
00235         virtual std::map<wns::node::Interface*, wns::CandI>
00236         calculateCandIsRx(const std::vector<node::Interface*>& /* combination */,
00237                   wns::Power /* Iinter */) = 0;
00238 
00240         virtual std::map<wns::node::Interface*, wns::CandI>
00241         calculateCandIsTx(const std::map<wns::node::Interface*, wns::Power>& /* Station2NoisePlusIintercell */,
00242                   wns::Power /* x_friendlyness */,
00243                   wns::Power /* txPower */) = 0;
00244 
00245         virtual void
00246         setPowerReceivedForStation(wns::node::Interface* stack, wns::Power _rxPower) = 0;
00247 
00248         virtual void
00249         setTxPowerForStation(wns::node::Interface* stack, wns::Power _txPower) = 0;
00250     };
00251 
00253     class BeamForming :
00254         public virtual service::Service
00255     {
00256     public:
00257         virtual
00258         ~BeamForming(){}
00259 
00260         virtual PatternPtr
00261         calculateAndSetBeam(wns::node::Interface *id,
00262                     const std::vector<node::Interface*>& undesired,
00263                     wns::Power IinterPlusNoise) = 0;
00264         virtual double
00265         estimateDoA(wns::node::Interface *id) = 0;
00266 
00267         virtual void
00268         setCurrentReceivePatterns(std::map<wns::node::Interface*, PatternPtr>) = 0;
00269 
00270         virtual void
00271         insertReceivePattern(wns::node::Interface*, PatternPtr) = 0;
00272 
00273         virtual void
00274         removeReceivePattern(wns::node::Interface*) = 0;
00275     };
00276 
00278     class BFInterface :
00279         public virtual BFTransmission,
00280         public virtual SINREstimation,
00281         public virtual BeamForming,
00282         public virtual RFSettings
00283     {
00284     public:
00285         virtual
00286         ~BFInterface(){}
00287         //
00288     };
00289 
00291     class NonBFInterface :
00292         public virtual NonBFTransmission,
00293         public virtual RFSettings
00294     {
00295     public:
00296         virtual
00297         ~NonBFInterface(){}
00298         //
00299     };
00300 
00304     class DataTransmission :
00305         public virtual BFInterface,
00306         public virtual NonBFInterface
00307     {
00308     public:
00309         virtual
00310         ~DataTransmission(){}
00311     };
00312 
00313 } // ofdma
00314 } // phy
00315 } // service
00316 } // wns
00317 
00318 
00319 #endif // WNS_SERVICE_PHY_OFDMA_DATATRANSMISSION
00320 
00321 
00322 

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