A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
wifi-spectrum-signal-parameters.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2011 CTTC
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Nicola Baldo <nbaldo@cttc.es>
7
* Modified by Marco Miozzo <mmiozzo@cttc.es> (add data and ctrl diversity)
8
*/
9
10
#include "
wifi-spectrum-signal-parameters.h
"
11
12
#include "
wifi-ppdu.h
"
13
14
#include "ns3/log.h"
15
16
namespace
ns3
17
{
18
19
NS_LOG_COMPONENT_DEFINE
(
"WifiSpectrumSignalParameters"
);
20
21
WifiSpectrumSignalParameters::WifiSpectrumSignalParameters
()
22
:
SpectrumSignalParameters
(),
23
ppdu(nullptr)
24
{
25
NS_LOG_FUNCTION
(
this
);
26
}
27
28
WifiSpectrumSignalParameters::WifiSpectrumSignalParameters
(
const
WifiSpectrumSignalParameters
& p)
29
:
SpectrumSignalParameters
(p),
30
ppdu(p.ppdu)
31
{
32
NS_LOG_FUNCTION
(
this
<< &p);
33
}
34
35
Ptr<SpectrumSignalParameters>
36
WifiSpectrumSignalParameters::Copy
()
const
37
{
38
NS_LOG_FUNCTION
(
this
);
39
// Ideally we would use:
40
// return Copy<WifiSpectrumSignalParameters> (*this);
41
// but for some reason it doesn't work. Another alternative is
42
// return Copy<WifiSpectrumSignalParameters> (this);
43
// but it causes a double creation of the object, hence it is less efficient.
44
// The solution below is copied from the implementation of Copy<> (Ptr<>) in ptr.h
45
Ptr<WifiSpectrumSignalParameters>
wssp(
new
WifiSpectrumSignalParameters
(*
this
),
false
);
46
return
wssp;
47
}
48
49
}
// namespace ns3
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition
log.h:191
NS_LOG_FUNCTION
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Definition
log-macros-enabled.h:229
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::SpectrumSignalParameters
This struct provides the generic signal representation to be used by all wireless technologies.
Definition
spectrum-signal-parameters.h:42
ns3::WifiSpectrumSignalParameters
Signal parameters for wifi.
Definition
wifi-spectrum-signal-parameters.h:28
ns3::WifiSpectrumSignalParameters::WifiSpectrumSignalParameters
WifiSpectrumSignalParameters()
default constructor
Definition
wifi-spectrum-signal-parameters.cc:21
ns3::WifiSpectrumSignalParameters::Copy
Ptr< SpectrumSignalParameters > Copy() const override
make a "virtual" copy of this class, where "virtual" refers to the fact that if the actual object is ...
Definition
wifi-spectrum-signal-parameters.cc:36
wifi-ppdu.h
Declaration of ns3::WifiPpdu class and ns3::WifiConstPsduMap.
wifi-spectrum-signal-parameters.h
src
wifi
model
wifi-spectrum-signal-parameters.cc
Generated on Fri Nov 8 2024 13:59:08 for ns-3 by
1.11.0