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");
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 an Object subclass with the TypeId system.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
static EventId Schedule(Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event to expire after delay.
AttributeValue implementation for Time.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static EventId ScheduleNow(MEM mem_ptr, OBJ obj)
Schedule an event to expire Now.
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
NS_LOG_LOGIC("Net device "<< nd<< " is not bridged")
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Time Seconds(double value)
Construct a Time in the indicated unit.
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.
Time Now(void)
create an ns3::Time instance which contains the current simulation time.
This class can be used to hold variables of floating point type such as 'double' or 'float'...
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
int64_t GetTimeStep(void) const
Get the raw time value, in the current resolution unit.