![]() |
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_POWERMEASUREMENT_HPP 00029 #define __RISE_POWERMEASUREMENT_HPP 00030 00031 #include <RISE/misc/pointer.hpp> 00032 #include <RISE/stations/station.hpp> 00033 #include <RISE/transceiver/transmitter.hpp> 00034 #include <WNS/service/phy/power/PowerMeasurement.hpp> 00035 #include <WNS/service/phy/phymode/PhyModeInterface.hpp> 00036 #include <WNS/PowerRatio.hpp> 00037 #include <WNS/Types.hpp> 00038 #include <WNS/pyconfig/View.hpp> 00039 00040 #include <vector> 00041 00042 namespace rise { namespace receiver { 00043 00045 class PowerMeasurement : 00046 public wns::service::phy::power::PowerMeasurementInterface, 00047 public wns::Cloneable<PowerMeasurement> // allow SmartPtr 00048 { 00049 public: 00050 00051 PowerMeasurement(rise::TransmissionObjectPtr t, 00052 wns::node::Interface* _sourceNode, 00053 wns::Power _rxPower, 00054 wns::Power _interference, 00055 wns::Ratio _iot, 00056 wns::Ratio _fading, 00057 wns::Ratio _omniAttenuation, 00058 double distance, 00059 std::vector<wns::Ratio> _postProcessingSINRFactor); 00060 00061 virtual ~PowerMeasurement(); 00062 00063 virtual const wns::Power 00064 getRxPower() const; 00065 00066 // interference contains noise here 00067 virtual const wns::Power 00068 getInterferencePower() const; 00069 00070 virtual const wns::Power 00071 getOmniInterferencePower() const; 00072 00076 virtual const wns::Ratio 00077 getIoT() const; 00078 00079 virtual const wns::Ratio 00080 getSINR() const; 00081 00082 virtual const std::vector<wns::Ratio> 00083 getPostProcessingSINRFactor() const; 00084 00085 // mutual information 00086 virtual const double 00087 getMI() const; 00088 00089 // mutual information per bit [0..1] 00090 virtual const double 00091 getMIB() const; 00092 00093 virtual const wns::Power 00094 getTxPower() const; 00095 00096 // not including dynamic fading 00097 virtual const wns::Ratio 00098 getPathLoss() const; 00099 00100 // total including dynamic fading 00101 virtual const wns::Ratio 00102 getLoss() const; 00103 00104 // dynamic fading 00105 virtual const wns::Ratio 00106 getFading() const; 00107 00108 // Link distance 00109 virtual const double 00110 getDistance() const; 00111 00112 // received signal strength (S+I) 00113 virtual const wns::Power 00114 getRSS() const; 00115 00116 virtual const wns::service::phy::phymode::PhyModeInterfacePtr 00117 getPhyMode() const; 00118 00119 // transmitter station 00120 virtual const rise::Station* 00121 getSourceStation() const; 00122 00123 // transmitter node (only available for OFDMAPhy) 00124 virtual wns::node::Interface* 00125 getSourceNode() const; 00126 00127 virtual std::string 00128 getString() const; 00129 00130 private: 00131 00132 wns::Power rxPower; 00133 wns::Power interference; 00134 wns::Ratio iot; 00135 wns::Ratio omniAttenuation; 00136 wns::Ratio fading; 00137 double distance; 00138 std::vector<wns::Ratio> postProcessingSINRFactor; 00139 00140 wns::service::phy::phymode::PhyModeInterfacePtr phyModePtr; 00141 00142 rise::TransmissionObjectPtr transmissionObjectPtr; 00143 rise::Station* transmitterStation; 00144 00145 wns::node::Interface* sourceNode; // transmitter node (id) 00146 }; 00148 inline std::ostream& 00149 operator<< (std::ostream& s, const rise::receiver::PowerMeasurement& p) { 00150 return s << p.getString(); 00151 } 00152 }} 00153 00154 #endif // NOT defined __RISE_POWERMEASUREMENT_HPP
1.5.5