Class to allow the Spectrum Analysis. More...
#include "spectrum-analyzer-helper.h"
Public Member Functions | |
SpectrumAnalyzerHelper () | |
~SpectrumAnalyzerHelper () | |
void | EnableAsciiAll (std::string prefix) |
Enable ASCII output. More... | |
NetDeviceContainer | Install (NodeContainer c) const |
NetDeviceContainer | Install (Ptr< Node > node) const |
NetDeviceContainer | Install (std::string nodeName) const |
template<typename... Ts> | |
void | SetAntenna (std::string type, Ts &&... args) |
void | SetChannel (Ptr< SpectrumChannel > channel) |
Set the SpectrumChannel that will be used by SpectrumPhy instances created by this helper. More... | |
void | SetChannel (std::string channelName) |
Set the SpectrumChannel that will be used by SpectrumPhy instances created by this helper. More... | |
void | SetDeviceAttribute (std::string n1, const AttributeValue &v1) |
void | SetPhyAttribute (std::string name, const AttributeValue &v) |
void | SetRxSpectrumModel (Ptr< SpectrumModel > m) |
Set the spectrum model used by the created SpectrumAnalyzer instances to represent incoming signals. More... | |
Private Attributes | |
ObjectFactory | m_antenna |
Object factory for the Antenna objects. More... | |
Ptr< SpectrumChannel > | m_channel |
Channel. More... | |
ObjectFactory | m_device |
Object factory for the NetDevice objects. More... | |
ObjectFactory | m_phy |
Object factory for the phy objects. More... | |
std::string | m_prefix |
Prefix for the output files. More... | |
Ptr< SpectrumModel > | m_rxSpectrumModel |
Spectrum model. More... | |
Class to allow the Spectrum Analysis.
Definition at line 42 of file spectrum-analyzer-helper.h.
ns3::SpectrumAnalyzerHelper::SpectrumAnalyzerHelper | ( | ) |
Definition at line 68 of file spectrum-analyzer-helper.cc.
References m_antenna, m_device, m_phy, NS_LOG_FUNCTION, and ns3::ObjectFactory::SetTypeId().
ns3::SpectrumAnalyzerHelper::~SpectrumAnalyzerHelper | ( | ) |
Definition at line 76 of file spectrum-analyzer-helper.cc.
References NS_LOG_FUNCTION.
void ns3::SpectrumAnalyzerHelper::EnableAsciiAll | ( | std::string | prefix | ) |
Enable ASCII output.
This will create one filename for every created SpectrumAnalyzer instance.
prefix | the prefix of the filename of the traces that will be created. |
Definition at line 118 of file spectrum-analyzer-helper.cc.
References m_prefix, and NS_LOG_FUNCTION.
NetDeviceContainer ns3::SpectrumAnalyzerHelper::Install | ( | NodeContainer | c | ) | const |
c | the set of nodes on which a device must be created |
Definition at line 125 of file spectrum-analyzer-helper.cc.
References ns3::Node::AddDevice(), ns3::NodeContainer::Begin(), ns3::Config::ConnectWithoutContext(), ns3::ObjectFactory::Create(), ns3::AsciiTraceHelper::CreateFileStream(), first::devices, ns3::NodeContainer::End(), ns3::AsciiTraceHelper::GetFilenameFromDevice(), ns3::Node::GetId(), ns3::Object::GetObject(), m_antenna, m_channel, m_device, m_phy, m_prefix, m_rxSpectrumModel, ns3::MakeBoundCallback(), NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_LOG_LOGIC, third::phy, and ns3::WriteAveragePowerSpectralDensityReport().
Referenced by Install().
NetDeviceContainer ns3::SpectrumAnalyzerHelper::Install | ( | Ptr< Node > | node | ) | const |
node | the node on which a device must be created |
Definition at line 190 of file spectrum-analyzer-helper.cc.
References Install(), and NS_LOG_FUNCTION.
NetDeviceContainer ns3::SpectrumAnalyzerHelper::Install | ( | std::string | nodeName | ) | const |
nodeName | the name of node on which a device must be created |
Definition at line 197 of file spectrum-analyzer-helper.cc.
References Install(), and NS_LOG_FUNCTION.
void ns3::SpectrumAnalyzerHelper::SetAntenna | ( | std::string | type, |
Ts &&... | args | ||
) |
Ts | [deduced] Argument types |
type | the type of the model to set | |
[in] | args | Name and AttributeValue pairs to set. |
Configure the AntennaModel instance for each new device to be created
Definition at line 136 of file spectrum-analyzer-helper.h.
References check-style-clang-format::args, m_antenna, and check-style-clang-format::type.
void ns3::SpectrumAnalyzerHelper::SetChannel | ( | Ptr< SpectrumChannel > | channel | ) |
Set the SpectrumChannel that will be used by SpectrumPhy instances created by this helper.
channel |
Definition at line 82 of file spectrum-analyzer-helper.cc.
References third::channel, m_channel, and NS_LOG_FUNCTION.
void ns3::SpectrumAnalyzerHelper::SetChannel | ( | std::string | channelName | ) |
Set the SpectrumChannel that will be used by SpectrumPhy instances created by this helper.
channelName |
Definition at line 89 of file spectrum-analyzer-helper.cc.
References third::channel, m_channel, and NS_LOG_FUNCTION.
void ns3::SpectrumAnalyzerHelper::SetDeviceAttribute | ( | std::string | n1, |
const AttributeValue & | v1 | ||
) |
n1 | the name of the attribute to set |
v1 | the value of the attribute to set |
Set these attributes on each AlohaNoackNetDevice created
Definition at line 104 of file spectrum-analyzer-helper.cc.
References m_device, NS_LOG_FUNCTION, and ns3::ObjectFactory::Set().
void ns3::SpectrumAnalyzerHelper::SetPhyAttribute | ( | std::string | name, |
const AttributeValue & | v | ||
) |
name | the name of the attribute to set |
v | the value of the attribute |
Set these attributes on each HdOfdmSpectrumPhy instance to be created
Definition at line 97 of file spectrum-analyzer-helper.cc.
References m_phy, NS_LOG_FUNCTION, and ns3::ObjectFactory::Set().
void ns3::SpectrumAnalyzerHelper::SetRxSpectrumModel | ( | Ptr< SpectrumModel > | m | ) |
Set the spectrum model used by the created SpectrumAnalyzer instances to represent incoming signals.
m |
Definition at line 111 of file spectrum-analyzer-helper.cc.
References two-ray-to-three-gpp-ch-calibration::m, m_rxSpectrumModel, and NS_LOG_FUNCTION.
|
private |
Object factory for the Antenna objects.
Definition at line 123 of file spectrum-analyzer-helper.h.
Referenced by SpectrumAnalyzerHelper(), Install(), and SetAntenna().
|
private |
Definition at line 125 of file spectrum-analyzer-helper.h.
Referenced by Install(), and SetChannel().
|
private |
Object factory for the NetDevice objects.
Definition at line 122 of file spectrum-analyzer-helper.h.
Referenced by SpectrumAnalyzerHelper(), Install(), and SetDeviceAttribute().
|
private |
Object factory for the phy objects.
Definition at line 121 of file spectrum-analyzer-helper.h.
Referenced by SpectrumAnalyzerHelper(), Install(), and SetPhyAttribute().
|
private |
Prefix for the output files.
Definition at line 127 of file spectrum-analyzer-helper.h.
Referenced by EnableAsciiAll(), and Install().
|
private |
Spectrum model.
Definition at line 126 of file spectrum-analyzer-helper.h.
Referenced by Install(), and SetRxSpectrumModel().