A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
spectrum-wifi-helper.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 INRIA
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
18 */
19
20#ifndef SPECTRUM_WIFI_HELPER_H
21#define SPECTRUM_WIFI_HELPER_H
22
23#include "wifi-helper.h"
24
25namespace ns3
26{
27
28class SpectrumChannel;
29
41{
42 public:
48 SpectrumWifiPhyHelper(uint8_t nLinks = 1);
49
55 void SetChannel(const Ptr<SpectrumChannel> channel);
61 void SetChannel(const std::string& channelName);
62
71 void AddChannel(const Ptr<SpectrumChannel> channel,
72 const FrequencyRange& freqRange = WHOLE_WIFI_SPECTRUM);
81 void AddChannel(const std::string& channelName,
82 const FrequencyRange& freqRange = WHOLE_WIFI_SPECTRUM);
83
84 private:
92 std::vector<Ptr<WifiPhy>> Create(Ptr<Node> node, Ptr<WifiNetDevice> device) const override;
100
101 std::map<FrequencyRange, Ptr<SpectrumChannel>> m_channels;
102};
103
104} // namespace ns3
105
106#endif /* SPECTRUM_WIFI_HELPER_H */
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
Make it easy to create and manage PHY objects for the spectrum model.
std::vector< Ptr< WifiPhy > > Create(Ptr< Node > node, Ptr< WifiNetDevice > device) const override
void AddChannel(const Ptr< SpectrumChannel > channel, const FrequencyRange &freqRange=WHOLE_WIFI_SPECTRUM)
void SetChannel(const Ptr< SpectrumChannel > channel)
void AddWifiBandwidthFilter(Ptr< SpectrumChannel > channel)
std::map< FrequencyRange, Ptr< SpectrumChannel > > m_channels
the spectrum channels
create PHY objects
Definition: wifi-helper.h:49
Every class exported by the ns3 library is enclosed in the ns3 namespace.
constexpr FrequencyRange WHOLE_WIFI_SPECTRUM
Identifier for the frequency range covering the whole wifi spectrum.
Struct defining a frequency range between minFrequency (MHz) and maxFrequency (MHz).