30 #include "ns3/core-module.h"
31 #include "ns3/stats-module.h"
44 static TypeId GetTypeId (
void);
47 void DoInitialize (
void);
65 .AddTraceSource (
"Counter",
76 m_var = CreateObject<ExponentialRandomVariable> ();
104 int main (
int argc,
char *argv[])
107 cmd.
Parse (argc, argv);
139 "Emitter Counts vs. Time",
146 plotHelper.
PlotProbe (
"ns3::DoubleProbe",
147 "/Names/Probe/Output",
#define NS_LOG_FUNCTION(parameters)
TypeId AddConstructor(void)
NS_LOG_COMPONENT_DEFINE("GrantedTimeWindowMpiInterface")
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)
static void Run(void)
Run the simulation until one of:
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
static EventId Schedule(Time const &time, MEM mem_ptr, OBJ obj)
Schedule an event to expire at the relative time "time" is reached.
static TypeId GetTypeId(void)
static void Add(std::string name, Ptr< Object > object)
Add the association between the string "name" and the Ptr<Object> obj.
virtual void ConnectByPath(std::string path)
connect to a trace source provided by a config path
void ConfigurePlot(const std::string &outputFileNameWithoutExtension, const std::string &title, const std::string &xLegend, const std::string &yLegend, const std::string &terminalType="png")
Parse command-line arguments.
static void Destroy(void)
Every event scheduled by the Simulator::insertAtDestroy method is invoked.
void DoInitialize(void)
This method is called only once by Object::Initialize.
TracedValue< double > m_counter
Helper class used to make gnuplot plots.
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
static Time Now(void)
Return the "current simulation time".
int main(int argc, char *argv[])
static void Stop(void)
If an event invokes this method, it will be the last event scheduled by the Simulator::run method bef...
void SetName(std::string name)
Set the object's name. All spaces are replaced by underscores.
#define NS_LOG_DEBUG(msg)
void Initialize(void)
This method calls the virtual DoInitialize method on all the objects aggregated to this object...
void Parse(int argc, char *argv[])
Parse the program arguments.
a base class which provides memory management and object aggregation
a unique identifier for an interface.