22 #include <ns3/object-factory.h>
24 #include <ns3/simulator.h>
25 #include <ns3/double.h>
26 #include <ns3/packet-burst.h>
27 #include <ns3/antenna-model.h>
42 m_txPowerSpectralDensity (0),
43 m_startTime (Seconds (0)),
70 .AddConstructor<WaveformGenerator> ()
71 .AddAttribute (
"Period",
72 "the period (=1/frequency)",
77 .AddAttribute (
"DutyCycle",
78 "the duty cycle of the generator, i.e., the fraction of the period that is occupied by a signal",
82 MakeDoubleChecker<double> ())
83 .AddTraceSource (
"TxStart",
84 "Trace fired when a new transmission is started",
86 .AddTraceSource (
"TxEnd",
87 "Trace fired when a previosuly started transmission is finished",
200 txParams->txPhy = GetObject<SpectrumPhy> ();
221 NS_LOG_LOGIC (
"generator was not active, now starting");
keep track of time values and allow control of global simulation resolution
smart pointer class similar to boost::intrusive_ptr
#define NS_LOG_FUNCTION(parameters)
Abstract base class for Spectrum-aware PHY layers.
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
static EventId Schedule(Time const &time, MEM mem_ptr, OBJ obj)
Schedule an event to expire at the relative time "time" is reached.
hold objects of type ns3::Time
#define NS_LOG_LOGIC(msg)
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
static EventId ScheduleNow(MEM mem_ptr, OBJ obj)
Schedule an event to expire Now.
Time Now(void)
create an ns3::Time instance which contains the current simulation time.
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
Hold a floating point type.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)