21 #ifndef DEFAULT_SIMULATOR_IMPL_H
22 #define DEFAULT_SIMULATOR_IMPL_H
28 #include "ns3/system-mutex.h"
51 virtual void Stop (
void);
52 virtual void Stop (
Time const &time);
60 virtual void Run (
void);
Simulation virtual time values and global simulation resolution.
EventsWithContext m_eventsWithContext
Smart pointer class similar to boost::intrusive_ptr.
ns3::EventImpl declarations.
Ptr< Scheduler > m_events
virtual void DoDispose(void)
Destructor implementation.
System-independent thread class ns3::SystemThread declaration.
Smart pointer implementation.
virtual Time GetMaximumSimulationTime(void) const
Get the maximum representable simulation time.
virtual void SetScheduler(ObjectFactory schedulerFactory)
Set the Scheduler to be used to manage the event list.
DestroyEvents m_destroyEvents
SystemMutex m_eventsWithContextMutex
virtual EventId ScheduleNow(EventImpl *event)
Schedule an event to run at the current virtual time.
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...
ns3::Scheduler abstract base class, ns3::Scheduler::Event and ns3::Scheduler::EventKey declarations...
static TypeId GetTypeId(void)
virtual Time Now(void) const
Return the current simulation virtual time.
uint32_t m_currentContext
pthread_t ThreadId
Type alias for the system-dependent thread object.
virtual Time GetDelayLeft(const EventId &id) const
Get the remaining time until this event will execute.
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...
std::list< struct EventWithContext > EventsWithContext
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void Stop(void)
Tell the Simulator the calling event should be the last one executed.
virtual uint32_t GetContext(void) const
Get the current simulation context.
virtual void Remove(const EventId &id)
Remove an event from the event list.
A class which provides a relatively platform-independent Mutual Exclusion thread synchronization prim...
The default single process simulator implementation.
virtual void ScheduleWithContext(uint32_t context, Time const &time, EventImpl *event)
Schedule a future event execution (in a different context).
virtual EventId Schedule(Time const &time, EventImpl *event)
Schedule a future event execution (in the same context).
Instantiate subclasses of ns3::Object.
virtual bool IsFinished(void) const
Check if the simulation should finish.
virtual void Run(void)
Run the simulation.
An identifier for simulation events.
virtual void Destroy()
Execute the events scheduled with ScheduleDestroy().
virtual bool IsExpired(const EventId &id) const
Check if an event has already run or been cancelled.
SystemThread::ThreadId m_main
std::list< EventId > DestroyEvents
void ProcessOneEvent(void)
bool m_eventsWithContextEmpty
a unique identifier for an interface.
The SimulatorImpl base class.
void ProcessEventsWithContext(void)