20 #include "ns3/propagation-delay-model.h"
21 #include "ns3/spectrum-propagation-loss-model.h"
22 #include "ns3/mobility-model.h"
24 #include "ns3/config.h"
25 #include "ns3/simulator.h"
26 #include "ns3/names.h"
27 #include "ns3/antenna-model.h"
28 #include "ns3/spectrum-channel.h"
29 #include "ns3/waveform-generator.h"
30 #include "ns3/non-communicating-net-device.h"
31 #include "waveform-generator-helper.h"
41 WaveformGeneratorHelper::WaveformGeneratorHelper ()
43 m_phy.
SetTypeId (
"ns3::WaveformGenerator");
44 m_device.
SetTypeId (
"ns3::NonCommunicatingNetDevice");
45 m_antenna.
SetTypeId (
"ns3::IsotropicAntennaModel");
48 WaveformGeneratorHelper::~WaveformGeneratorHelper ()
83 m_device.
Set (name, v);
100 factory.
Set (n1, v1);
101 factory.
Set (n2, v2);
102 factory.
Set (n3, v3);
103 factory.
Set (n4, v4);
104 factory.
Set (n5, v5);
105 factory.
Set (n6, v6);
106 factory.
Set (n7, v7);
114 for (NodeContainer::Iterator i = c.
Begin (); i != c.
End (); ++i)
129 phy->SetDevice (dev);
131 NS_ASSERT_MSG (m_txPsd,
"you forgot to call WaveformGeneratorHelper::SetTxPowerSpectralDensity ()");
132 phy->SetTxPowerSpectralDensity (m_txPsd);
134 NS_ASSERT_MSG (m_channel,
"you forgot to call WaveformGeneratorHelper::SetChannel ()");
135 phy->SetChannel (m_channel);
136 dev->SetChannel (m_channel);
139 NS_ASSERT_MSG (antenna,
"error in creating the AntennaModel object");
140 phy->SetAntenna (antenna);
157 Ptr<Node> node = Names::Find<Node> (nodeName);
smart pointer class similar to boost::intrusive_ptr
#define NS_LOG_FUNCTION(parameters)
Hold a value for an Attribute.
#define NS_ASSERT(condition)
#define NS_LOG_COMPONENT_DEFINE(name)
void SetTypeId(TypeId tid)
Iterator End(void) const
Get an iterator which indicates past-the-last Node in the container.
Keep track of the current position and velocity of an object.
Ptr< Object > Create(void) const
void Add(NetDeviceContainer other)
Append the contents of another NetDeviceContainer to the end of this container.
holds a vector of ns3::NetDevice pointers
keep track of a set of node pointers.
Iterator Begin(void) const
Get an iterator which refers to the first Node in the container.
void Set(std::string name, const AttributeValue &value)
#define NS_ASSERT_MSG(condition, message)
instantiate subclasses of ns3::Object.
uint32_t AddDevice(Ptr< NetDevice > device)
Ptr< T > GetObject(void) const