|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
30 #include "ns3/core-module.h"
31 #include "ns3/stats-module.h"
66 .SetGroupName (
"Stats")
68 .AddTraceSource (
"Counter",
71 "ns3::TracedValueCallback::Double")
80 m_var = CreateObject<ExponentialRandomVariable> ();
99 int main (
int argc,
char *argv[])
102 cmd.Parse (argc, argv);
123 "Emitter Count vs. Time",
131 plotHelper.
PlotProbe (
"ns3::Uinteger32Probe",
132 "/Names/Emitter/Counter",
a unique identifier for an interface.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Parse command-line arguments.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
static Time Now(void)
Return the current simulation virtual time.
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.
void PlotProbe(const std::string &typeId, const std::string &path, const std::string &probeTraceSource, const std::string &title, enum GnuplotAggregator::KeyLocation keyLocation=GnuplotAggregator::KEY_INSIDE)
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
void DoInitialize(void)
Initialize() implementation.
static void Stop(void)
Tell the Simulator the calling event should be the last one executed.
A base class which provides memory management and object aggregation.
static void Run(void)
Run the simulation.
Helper class used to make gnuplot plots.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
void ConfigurePlot(const std::string &outputFileNameWithoutExtension, const std::string &title, const std::string &xLegend, const std::string &yLegend, const std::string &terminalType="png")
Time Seconds(double value)
Construct a Time in the indicated unit.
static void Destroy(void)
Execute the events scheduled with ScheduleDestroy().
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
TracedValue< double > m_counter
void Initialize(void)
Invoke DoInitialize on all Objects aggregated to this one.
static TypeId GetTypeId(void)
Register this type.
static void Add(std::string name, Ptr< Object > object)
Add the association between the string "name" and the Ptr<Object> obj.
static TypeId GetTypeId(void)
Register this type.