|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
22 #include "ns3/default-simulator-impl.h"
24 #include "ns3/packet-metadata.h"
50 .SetGroupName (
"Visualizer")
52 .AddAttribute (
"SimulatorImplFactory",
53 "Factory for the underlying simulator implementation used by the visualizer.",
117 if (!Py_IsInitialized ())
119 #if PY_MAJOR_VERSION >= 3
120 const wchar_t *argv[] = { L
"python", NULL};
122 PySys_SetArgv (1, (
wchar_t**) argv);
124 const char *argv[] = {
"python", NULL};
126 PySys_SetArgv (1, (
char**) argv);
129 "import visualizer\n"
130 "visualizer.start();\n"
135 PyGILState_STATE __py_gil_state = PyGILState_Ensure ();
138 "import visualizer\n"
139 "visualizer.start();\n"
142 PyGILState_Release (__py_gil_state);
170 m_simulator->ScheduleWithContext (context, delay, event);
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.
ObjectFactory m_simulatorImplFactory
simulator implementation factory
virtual EventId ScheduleNow(EventImpl *event)
Schedule an event to run at the current virtual time.
An identifier for simulation events.
virtual Time GetMaximumSimulationTime(void) const
Get the maximum representable simulation time.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void Destroy()
Execute the events scheduled with ScheduleDestroy().
static TypeId GetTypeId(void)
Register this type.
virtual EventId ScheduleDestroy(EventImpl *event)
Schedule an event to run at the end of the simulation, after the Stop() time or condition has been re...
TypeId SetParent(TypeId tid)
Set the parent TypeId.
virtual void Cancel(const EventId &id)
Set the cancel bit on this event: the event's associated function will not be invoked when it expires...
virtual uint32_t GetContext(void) const
Get the current simulation context.
virtual void SetScheduler(ObjectFactory schedulerFactory)
Set the Scheduler to be used to manage the event list.
virtual bool IsExpired(const EventId &id) const
Check if an event has already run or been cancelled.
virtual uint64_t GetEventCount(void) const
Get the number of events executed.
Ptr< const AttributeAccessor > MakeObjectFactoryAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
static TypeId GetTypeId(void)
Get the type ID.
virtual Time GetDelayLeft(const EventId &id) const
Get the remaining time until this event will execute.
virtual bool IsFinished(void) const
Check if the simulation should finish.
Instantiate subclasses of ns3::Object.
Simulation virtual time values and global simulation resolution.
virtual EventId Schedule(Time const &delay, EventImpl *event)
Schedule a future event execution (in the same context).
virtual Time Now(void) const
Return the current simulation virtual time.
virtual uint32_t GetSystemId(void) const
Get the system id of this simulator.
virtual void Remove(const EventId &id)
Remove an event from the event list.
void NotifyConstructionCompleted(void)
Notifier called once the ObjectBase is fully constructed.
void DoDispose()
Destructor implementation.
A replacement simulator that starts the visualizer.
virtual void Run(void)
Run the simulation.
AttributeValue implementation for ObjectFactory.
The SimulatorImpl base class.
virtual void ScheduleWithContext(uint32_t context, Time const &delay, EventImpl *event)
Schedule a future event execution (in a different context).
virtual void Stop(void)
Tell the Simulator the calling event should be the last one executed.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
Ptr< Object > Create(void) const
Create an Object instance of the configured TypeId.
Ptr< SimulatorImpl > m_simulator
the simulator implementation
virtual void DoDispose(void)
Destructor implementation.
void RunRealSimulator(void)
calls Run() in the wrapped simulator
ObjectFactory GetDefaultSimulatorImplFactory()
Get an object factory configured to the default simulator implementation.
Ptr< const AttributeChecker > MakeObjectFactoryChecker(void)