![]() |
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 #include <RISE/transceiver/cache/propcacheentry.hpp> 00029 00030 using namespace rise; 00031 using namespace wns; 00032 00033 PropCacheEntry::PropCacheEntry() 00034 :totalLoss(wns::Ratio()), 00035 pathloss(wns::Ratio()), 00036 shadowing(wns::Ratio()), 00037 antennaGain(wns::Ratio()), 00038 valid(false) 00039 { 00040 } 00041 00042 PropCacheEntry::~PropCacheEntry() 00043 { 00044 } 00045 00046 wns::Ratio PropCacheEntry::getTotalLoss() const 00047 { 00048 return totalLoss; 00049 } 00050 00051 wns::Ratio PropCacheEntry::getPathloss() const 00052 { 00053 return pathloss; 00054 } 00055 00056 wns::Ratio PropCacheEntry::getShadowing() const 00057 { 00058 return shadowing; 00059 } 00060 00061 wns::Ratio PropCacheEntry::getAntennaGain() const 00062 { 00063 return antennaGain; 00064 } 00065 00066 bool PropCacheEntry::isValid() const 00067 { 00068 return valid; 00069 } 00070 00071 00072 void PropCacheEntry::setPathloss(wns::Ratio loss) 00073 { 00074 pathloss = loss; 00075 recomputeTotalLoss(); 00076 } 00077 00078 void PropCacheEntry::setShadowing(wns::Ratio shadow) 00079 { 00080 shadowing = shadow; 00081 recomputeTotalLoss(); 00082 } 00083 00084 void PropCacheEntry::setAntennaGain(wns::Ratio gain) 00085 { 00086 antennaGain = gain; 00087 recomputeTotalLoss(); 00088 } 00089 00090 void PropCacheEntry::setValid(bool v) 00091 { 00092 valid = v; 00093 } 00094 00095
1.5.5