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),
72 .SetGroupName (
"Spectrum")
74 .AddAttribute (
"Period",
75 "the period (=1/frequency)",
80 .AddAttribute (
"DutyCycle",
81 "the duty cycle of the generator, i.e., the fraction of the period that is occupied by a signal",
85 MakeDoubleChecker<double> ())
86 .AddTraceSource (
"TxStart",
87 "Trace fired when a new transmission is started",
89 "ns3::Packet::TracedCallback")
90 .AddTraceSource (
"TxEnd",
91 "Trace fired when a previously started transmission is finished",
93 "ns3::Packet::TracedCallback")
205 txParams->txPhy = GetObject<SpectrumPhy> ();
223 NS_LOG_LOGIC (
"generator was not active, now starting");
This class can be used to hold variables of floating point type such as 'double' or 'float'.
bool IsRunning(void) const
This method is syntactic sugar for !IsExpired().
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::Cancel method.
static EventId Schedule(Time const &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(void) 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)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
#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(void)
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.
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.