|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
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");
a unique identifier for an interface.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static EventId Schedule(Time const &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
int64_t GetTimeStep(void) const
Get the raw time value, in the current resolution unit.
bool IsRunning(void) const
This method is syntactic sugar for !IsExpired().
Time Now(void)
create an ns3::Time instance which contains the current simulation time.
Abstract base class for Spectrum-aware PHY layers.
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::Cancel method.
Simulation virtual time values and global simulation resolution.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
Time Seconds(double value)
Construct a Time in the indicated unit.
AttributeValue implementation for Time.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
static EventId ScheduleNow(FUNC f, Ts &&... args)
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.