22 #include "ns3/default-simulator-impl.h"
48 .SetGroupName (
"Visualizer")
50 .AddAttribute (
"SimulatorImplFactory",
51 "Factory for the underlying simulator implementation used by the visualizer.",
114 if (!Py_IsInitialized ())
116 const char *argv[] = {
"python", NULL};
118 PySys_SetArgv (1, (
char**) argv);
120 "import visualizer\n"
121 "visualizer.start();\n"
126 PyGILState_STATE __py_gil_state = PyGILState_Ensure ();
129 "import visualizer\n"
130 "visualizer.start();\n"
133 PyGILState_Release (__py_gil_state);
161 m_simulator->ScheduleWithContext (context, delay, event);
virtual EventId Schedule(Time const &delay, EventImpl *event)
Schedule a future event execution (in the same context).
void NotifyConstructionCompleted(void)
Notifier called once the ObjectBase is fully constructed.
Simulation virtual time values and global simulation resolution.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
virtual void Run(void)
Run the simulation.
ObjectFactory GetDefaultSimulatorImplFactory()
void DoDispose()
Destructor implementation.
ObjectFactory m_simulatorImplFactory
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
virtual void DoDispose(void)
Destructor implementation.
Ptr< const AttributeChecker > MakeObjectFactoryChecker(void)
virtual void Remove(const EventId &id)
Remove an event from the event list.
virtual void SetScheduler(ObjectFactory schedulerFactory)
Set the Scheduler to be used to manage the event list.
A replacement simulator that starts the visualizer.
AttributeValue implementation for ObjectFactory.
virtual void ScheduleWithContext(uint32_t context, Time const &delay, EventImpl *event)
Schedule a future event execution (in a different context).
static TypeId GetTypeId(void)
Register this type.
virtual bool IsFinished(void) const
Check if the simulation should finish.
Ptr< Object > Create(void) const
Create an Object instance of the configured TypeId.
virtual void Stop(void)
Tell the Simulator the calling event should be the last one executed.
virtual Time GetMaximumSimulationTime(void) const
Get the maximum representable simulation time.
Ptr< const AttributeAccessor > MakeObjectFactoryAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
virtual Time GetDelayLeft(const EventId &id) const
Get the remaining time until this event will execute.
virtual bool IsExpired(const EventId &id) const
Check if an event has already run or been cancelled.
virtual void Destroy()
Execute the events scheduled with ScheduleDestroy().
virtual EventId ScheduleNow(EventImpl *event)
Schedule an event to run at the current virtual time.
Ptr< SimulatorImpl > m_simulator
void RunRealSimulator(void)
calls Run() in the wrapped simulator
Instantiate subclasses of ns3::Object.
An identifier for simulation events.
virtual uint32_t GetSystemId(void) const
Get the system id of this simulator.
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 Time Now(void) const
Return the current simulation virtual time.
a unique identifier for an interface.
virtual uint32_t GetContext(void) const
Get the current simulation context.
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.
static TypeId GetTypeId(void)
The SimulatorImpl base class.