1
/*******************************************************************************
2
* This file is part of openWNS (open Wireless Network Simulator)
3
* _____________________________________________________________________________
5
* Copyright (C) 2004-2007
6
* Chair of Communication Networks (ComNets)
7
* Kopernikusstr. 5, D-52074 Aachen, Germany
8
* phone: ++49-241-80-27910,
9
* fax: ++49-241-80-22242
10
* email: info@openwns.org
11
* www: http://www.openwns.org
12
* _____________________________________________________________________________
14
* openWNS is free software; you can redistribute it and/or modify it under the
15
* terms of the GNU Lesser General Public License version 2 as published by the
16
* Free Software Foundation;
18
* openWNS is distributed in the hope that it will be useful, but WITHOUT ANY
19
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
20
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
23
* You should have received a copy of the GNU Lesser General Public License
24
* along with this program. If not, see <http://www.gnu.org/licenses/>.
26
******************************************************************************/
28
#ifndef _RISE_SCENARIO_FREQ2SUBCHANNELCACHE_HPP
29
#define _RISE_SCENARIO_FREQ2SUBCHANNELCACHE_HPP
31
#include <WNS/container/Registry.hpp>
32
#include <WNS/Types.hpp>
33
#include <WNS/logger/Logger.hpp>
35
namespace rise { namespace scenario { namespace fastfading {
37
class Freq2SubchannelCache
40
Freq2SubchannelCache(unsigned int numberOfSubchannels);
41
~Freq2SubchannelCache();
44
getSubchannelIndex(const wns::Frequency& frequency) const;
47
/* Using double as key is dangerous, but should work */
48
mutable wns::container::Registry<double, unsigned int> frequencyToSubchannel_;
50
unsigned int numberOfSubchannels_;
52
wns::logger::Logger logger_;
59
#endif // NOT defined _RISE_SCENARIO_FREQ2SUBCHANNELCACHE_HPP