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>
41 m_txPowerSpectralDensity (0),
42 m_startTime (Seconds (0)),
69 .AddConstructor<WaveformGenerator> ()
70 .AddAttribute (
"Period",
71 "the period (=1/frequency)",
76 .AddAttribute (
"DutyCycle",
77 "the duty cycle of the generator, i.e., the fraction of the period that is occupied by a signal",
81 MakeDoubleChecker<double> ())
82 .AddTraceSource (
"TxStart",
83 "Trace fired when a new transmission is started",
85 .AddTraceSource (
"TxEnd",
86 "Trace fired when a previosuly started transmission is finished",
199 txParams->txPhy = GetObject<SpectrumPhy> ();
220 NS_LOG_LOGIC (
"generator was not active, now starting");
Simulation virtual time values and global simulation resolution.
smart pointer class similar to boost::intrusive_ptr
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
Abstract base class for Spectrum-aware PHY layers.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register the class in the ns-3 factory.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#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)
Use NS_LOG to output a message of level LOG_LOGIC.
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)