A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
spectrum-model-300kHz-300GHz-log.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 between 300 KHz 300 GHz
17 */
18Ptr<SpectrumModel>
20{
21 std::vector<double> freqs;
22 for (double f = 3e5; f < 3e11; f = f * 2)
23 {
24 freqs.push_back(f);
25 }
26 static Ptr<SpectrumModel> model = Create<SpectrumModel>(freqs);
27 return model;
28}
29
30} // 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 > SpectrumModel300Khz300GhzLog()
Spectrum model logger for frequencies between 300 KHz 300 GHz.
Every class exported by the ns3 library is enclosed in the ns3 namespace.