22#include <ns3/antenna-model.h>
23#include <ns3/double.h>
25#include <ns3/object-factory.h>
26#include <ns3/packet-burst.h>
27#include <ns3/simulator.h>
37 : m_mobility(nullptr),
40 m_txPowerSpectralDensity(nullptr),
66 TypeId(
"ns3::WaveformGenerator")
68 .SetGroupName(
"Spectrum")
72 "the period (=1/frequency)",
76 .AddAttribute(
"DutyCycle",
77 "the duty cycle of the generator, i.e., the fraction of the period that "
78 "is occupied by a signal",
82 MakeDoubleChecker<double>())
83 .AddTraceSource(
"TxStart",
84 "Trace fired when a new transmission is started",
86 "ns3::Packet::TracedCallback")
87 .AddTraceSource(
"TxEnd",
88 "Trace fired when a previously started transmission is finished",
90 "ns3::Packet::TracedCallback");
190 txParams->txPhy = GetObject<SpectrumPhy>();
This class can be used to hold variables of floating point type such as 'double' or 'float'.
void Cancel()
This method is syntactic sugar for the ns3::Simulator::Cancel method.
bool IsRunning() const
This method is syntactic sugar for !IsExpired().
Smart pointer class similar to boost::intrusive_ptr.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static EventId ScheduleNow(FUNC f, Ts &&... args)
Schedule an event to expire Now.
Abstract base class for Spectrum-aware PHY layers.
Simulation virtual time values and global simulation resolution.
int64_t GetTimeStep() const
Get the raw time value, in the current resolution unit.
AttributeValue implementation for Time.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Ptr< const AttributeChecker > MakeTimeChecker()
Helper to make an unbounded Time checker.
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Time Now()
create an ns3::Time instance which contains the current simulation time.
Time Seconds(double value)
Construct a Time in the indicated unit.
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
Every class exported by the ns3 library is enclosed in the ns3 namespace.