A Discrete-Event Network Simulator
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
11
12#include "wifi-ppdu.h"
13
14#include "ns3/log.h"
15
16namespace ns3
17{
18
19NS_LOG_COMPONENT_DEFINE("WifiSpectrumSignalParameters");
20
27
34
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
46 return wssp;
47}
48
49} // namespace ns3
Smart pointer class similar to boost::intrusive_ptr.
Definition ptr.h:66
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition log.h:191
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< const WifiPpdu > ppdu
The PPDU being transmitted.
Ptr< SpectrumSignalParameters > Copy() const override
make a "virtual" copy of this class, where "virtual" refers to the fact that if the actual object is ...
Declaration of ns3::WifiPpdu class and ns3::WifiConstPsduMap.