![]() |
User Manual, Developers Guide and API Documentation |
![]() |
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_ANTENNA_ANTENNA_HPP 00029 #define RISE_ANTENNA_ANTENNA_HPP 00030 00031 #include <RISE/misc/RISELogger.hpp> 00032 #include <WNS/SmartPtr.hpp> 00033 #include <WNS/Position.hpp> 00034 #include <WNS/PositionObserver.hpp> 00035 #include <WNS/PowerRatio.hpp> 00036 #include <WNS/service/phy/ofdma/Pattern.hpp> 00037 #include <WNS/Observer.hpp> 00038 #include <set> 00039 00040 namespace rise { 00041 class Station; 00042 } 00043 00044 namespace rise { namespace antenna { 00045 00046 class Beamforming; 00047 00053 typedef wns::service::phy::ofdma::PatternPtr PatternPtr; 00054 typedef wns::service::phy::ofdma::Pattern Pattern; 00055 00056 00061 class Antenna : 00062 public wns::Observer<wns::PositionObserver> 00063 { 00064 public: 00065 00073 Antenna(); 00074 00079 Antenna(const wns::pyconfig::View& pyConfigView, 00080 Station* const station); 00081 00082 virtual ~Antenna(); 00083 00084 virtual wns::Ratio getGain(const wns::Position& pos, 00085 const PatternPtr pattern) const = 0; 00086 00087 // inlined for performance 00088 const wns::Position& getPosition() const 00089 { 00090 return position; 00091 } 00092 00093 Station* getStation() const; 00094 00095 void positionWillChange() 00096 {}; 00097 00098 void positionChanged(); 00099 00100 protected: 00101 00105 RISELogger log; 00106 00107 double radius; 00108 00110 bool drawPattern; 00111 00113 virtual void drawRadiationPattern() const; 00114 00118 std::string patternOutputFile; 00119 private: 00120 00124 void preparePatternOutputFile(); 00125 00129 Station* pd_station; 00130 00134 wns::PositionOffset pd_positionOffset; 00135 00141 wns::Position position; 00142 00146 unsigned long int id; 00147 00151 static unsigned long int counter; 00152 00153 static std::set<std::string> patternOutputFilePrepared; 00154 }; 00155 } 00156 } 00157 #endif // _ANTENNA_HPP 00158 00159
1.5.5