A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
spectrum-model-ism2400MHz-res1MHz.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2009 CTTC
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Nicola Baldo <nbaldo@cttc.es>
7 */
8
10
11namespace ns3
12{
13
14/**
15 * @ingroup spectrum
16 * Spectrum model logger for frequencies in the 2.4 GHz ISM band
17 * with 1 MHz resolution.
18 */
19Ptr<SpectrumModel>
21{
22 std::vector<double> freqs(100);
23 for (int i = 0; i < 100; ++i)
24 {
25 freqs[i] = ((i + 2400) * 1e6);
26 }
27 static Ptr<SpectrumModel> model = Create<SpectrumModel>(freqs);
28 return model;
29}
30
31} // namespace ns3
Smart pointer class similar to boost::intrusive_ptr.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Definition ptr.h:436
Ptr< SpectrumModel > SpectrumModelIsm2400MhzRes1Mhz()
Spectrum model logger for frequencies in the 2.4 GHz ISM band with 1 MHz resolution.
Every class exported by the ns3 library is enclosed in the ns3 namespace.