User Manual, Developers Guide and API Documentation

ReceiverBF.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 __RECEIVERBF_HPP
00029 #define __RECEIVERBF_HPP
00030 
00031 #include <RISE/transceiver/receiver.hpp>
00032 #include <RISE/antenna/Beamforming.hpp>
00033 
00034 namespace rise
00035 {
00036     class ReceiverBF
00037         : public ReceiverBase
00038     {
00042         ReceiverBF(Station* s,
00043                antenna::Beamforming* a,
00044                Demodulator *demodulator,
00045                Decoder *decoder,
00046                wns::Ratio rnf);
00047 
00051         virtual ~ReceiverBF();
00052 
00054 
00057         virtual wns::Power getInterference(const TransmissionObjectPtr& t);
00058 
00060         //  when using the beam for the other TransmissionObject
00061         virtual wns::Power getRxPower(const TransmissionObjectPtr& t,
00062                           const TransmissionObjectPtr& whenListeningToTO);
00063 
00065         //  Receiver is listening to, using the receive beam for
00066         //  the given TransmissionObject
00071         virtual wns::Power getTotalRxPower(const TransmissionObjectPtr& whenListeningToTO);
00072         virtual void writeCacheEntry(PropCacheEntry& cacheEntry,
00073                          Transmitter* t,
00074                          double freq);
00075         virtual antenna::Beamforming* getAntenna() const
00076         {
00077             return antenna;
00078         }
00079 
00080         // from BFManager
00081         virtual std::map<rise::Station*, wns::Ratio> calculateSINRsRx(const std::vector<Station*>& stations,
00082                                                           wns::Power& IinterPlusNoise)
00083         {
00084             return antenna->calculateSINRsRx(stations, IinterPlusNoise);
00085         }
00086 
00087         // from BFManager
00088         virtual std::map<rise::Station*, wns::Ratio> calculateSINRsTx(std::map<Station*, wns::Power>& Station2NoisePlusIintercell,
00089                                                          wns::Power& x_safe,
00090                                                          wns::Power txPower)
00091             {
00092             return antenna->calculateSINRsTx(Station2NoisePlusIintercell, x_safe, txPower);
00093         }
00094 
00095         // from BFManager
00096         virtual antenna::PatternId calculateAndSetBeam(Station* id,
00097                                    const std::vector<Station*>& undesired,
00098                                    wns::Power& IinterPlusNoise)
00099         {
00100             return antenna->calculateAndSetBeam(id, undesired, IinterPlusNoise);
00101         }
00102         // from BFManager
00103         virtual void removeBeam(antenna::PatternId id)
00104         {
00105             antenna->removeBeam(id);
00106         }
00107         // from BFManager
00108         virtual void setPowerReceivedForStation(Station* const id,
00109                         wns::Power power)
00110         {
00111             antenna->setPowerReceivedForStation(id, power);
00112         }
00113         // from BFManager
00114         virtual void startReceiving(TransmissionObjectPtr& TO,
00115                         antenna::PatternId patternId)
00116         {
00117             antenna->startReceiving(TO, patternId);
00118         }
00119         // from BFManager
00120         virtual void stopReceiving(TransmissionObjectPtr& TO)
00121         {
00122             antenna->stopReceiving(TO);
00123         }
00124 
00125     protected:
00126         antenna::Beamforming* antenna;
00127     };
00128 }
00129 #endif

Generated on Fri May 25 03:31:59 2012 for openWNS by  doxygen 1.5.5