21 #include "ns3/aloha-noack-net-device.h"
22 #include "ns3/antenna-model.h"
23 #include "ns3/config.h"
24 #include "ns3/half-duplex-ideal-phy.h"
26 #include "ns3/mac48-address.h"
27 #include "ns3/mobility-model.h"
28 #include "ns3/names.h"
29 #include "ns3/propagation-delay-model.h"
30 #include "ns3/simulator.h"
31 #include "ns3/spectrum-channel.h"
32 #include "ns3/spectrum-propagation-loss-model.h"
94 for (
auto i = c.
Begin(); i != c.
End(); ++i)
121 "you forgot to call AdhocAlohaNoackIdealPhyHelper::SetTxPowerSpectralDensity ()");
126 "you forgot to call AdhocAlohaNoackIdealPhyHelper::SetNoisePowerSpectralDensity ()");
134 phy->SetGenericPhyTxEndCallback(
136 phy->SetGenericPhyRxStartCallback(
138 phy->SetGenericPhyRxEndOkCallback(
143 NS_ASSERT_MSG(antenna,
"error in creating the AntennaModel object");
144 phy->SetAntenna(antenna);
161 Ptr<Node> node = Names::Find<Node>(nodeName);
void SetPhyAttribute(std::string name, const AttributeValue &v)
ObjectFactory m_queue
Object factory for the Queue objects.
void SetTxPowerSpectralDensity(Ptr< SpectrumValue > txPsd)
Ptr< SpectrumChannel > m_channel
Channel.
AdhocAlohaNoackIdealPhyHelper()
void SetDeviceAttribute(std::string n1, const AttributeValue &v1)
Ptr< SpectrumValue > m_noisePsd
Noise power spectral density.
Ptr< SpectrumValue > m_txPsd
Tx power spectral density.
void SetNoisePowerSpectralDensity(Ptr< SpectrumValue > noisePsd)
ObjectFactory m_phy
Object factory for the phy objects.
ObjectFactory m_antenna
Object factory for the Antenna objects.
ObjectFactory m_device
Object factory for the NetDevice objects.
void SetChannel(Ptr< SpectrumChannel > channel)
set the SpectrumChannel that will be used by SpectrumPhy instances created by this helper
~AdhocAlohaNoackIdealPhyHelper()
NetDeviceContainer Install(NodeContainer c) const
void NotifyReceptionStart()
Notify the MAC that the PHY has started a reception.
void NotifyTransmissionEnd(Ptr< const Packet >)
Notify the MAC that the PHY has finished a previously started transmission.
void NotifyReceptionEndOk(Ptr< Packet > p)
Notify the MAC that the PHY finished a reception successfully.
Hold a value for an Attribute.
bool StartTx(Ptr< Packet > p)
Start a transmission.
static Mac48Address Allocate()
Allocate a new Mac48Address.
Keep track of the current position and velocity of an object.
holds a vector of ns3::NetDevice pointers
keep track of a set of node pointers.
Iterator End() const
Get an iterator which indicates past-the-last Node in the container.
Iterator Begin() const
Get an iterator which refers to the first Node in the container.
uint32_t AddDevice(Ptr< NetDevice > device)
Associate a NetDevice to this node.
Ptr< Object > Create() const
Create an Object instance of the configured TypeId.
void Set(const std::string &name, const AttributeValue &value, Args &&... args)
Set an attribute to be set during construction.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
Ptr< T > GetObject() const
Get a pointer to the requested aggregated Object.
Smart pointer class similar to boost::intrusive_ptr.
Template class for packet Queues.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#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.
Callback< R, Args... > MakeCallback(R(T::*memPtr)(Args...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...