48 .AddConstructor<DefaultSimulatorImpl> ()
97 if (!ev->IsCancelled ())
115 scheduler->Insert (next);
167 while (!eventsWithContext.empty ())
170 eventsWithContext.pop_front ();
172 ev.
impl =
event.event;
320 if (
id.GetUid () == 2)
338 event.
impl =
id.PeekEventImpl ();
339 event.key.m_ts =
id.GetTs ();
340 event.key.m_context =
id.GetContext ();
341 event.key.m_uid =
id.GetUid ();
343 event.impl->Cancel ();
345 event.impl->Unref ();
355 id.PeekEventImpl ()->Cancel ();
398 return TimeStep (0x7fffffffffffffffLL);
Simulation virtual time values and global simulation resolution.
EventsWithContext m_eventsWithContext
smart pointer class similar to boost::intrusive_ptr
bool IsPositive(void) const
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
Ptr< Scheduler > m_events
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register the class in the ns-3 factory.
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
Time TimeStep(uint64_t ts)
virtual Time GetMaximumSimulationTime(void) const
virtual void SetScheduler(ObjectFactory schedulerFactory)
static ThreadId Self(void)
Returns the current thread Id.
DestroyEvents m_destroyEvents
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
SystemMutex m_eventsWithContextMutex
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
static EventId Schedule(Time const &time, MEM mem_ptr, OBJ obj)
Schedule an event to expire at the relative time "time" is reached.
EventImpl * PeekEventImpl(void) const
virtual EventId ScheduleNow(EventImpl *event)
virtual uint32_t GetSystemId(void) const
void Invoke(void)
Called by the simulation engine to notify the event that it has expired.
static TypeId GetTypeId(void)
virtual void Remove(const EventId &ev)
Remove an event from the event list.
Ptr< Object > Create(void) const
A class which provides a simple way to implement a Critical Section.
virtual Time Now(void) const
Return the "current simulation time".
void Unref(void) const
Decrement the reference count.
uint32_t m_currentContext
uint32_t GetUid(void) const
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
virtual bool IsExpired(const EventId &ev) const
This method has O(1) complexity.
virtual Time GetDelayLeft(const EventId &id) const
virtual EventId ScheduleDestroy(EventImpl *event)
std::list< struct EventWithContext > EventsWithContext
virtual void Cancel(const EventId &ev)
Set the cancel bit on this event: the event's associated function will not be invoked when it expires...
virtual void Stop(void)
If an event invokes this method, it will be the last event scheduled by the Simulator::Run method bef...
virtual uint32_t GetContext(void) const
int64_t GetTimeStep(void) const
virtual void ScheduleWithContext(uint32_t context, Time const &time, EventImpl *event)
static bool Equals(ThreadId id)
Compares an TharedId with the current ThreadId .
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
virtual EventId Schedule(Time const &time, EventImpl *event)
instantiate subclasses of ns3::Object.
virtual bool IsFinished(void) const
If there are no more events lefts to be scheduled, or if simulation time has already reached the "sto...
virtual void Run(void)
Run the simulation until one of:
an identifier for simulation events.
static void Stop(void)
If an event invokes this method, it will be the last event scheduled by the Simulator::run method bef...
virtual void Destroy()
This method is typically invoked at the end of a simulation to avoid false-positive reports by a leak...
SystemThread::ThreadId m_main
void ProcessOneEvent(void)
bool m_eventsWithContextEmpty
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
uint64_t GetTs(void) const
Doxygen introspection did not find any typical Config paths.
void ProcessEventsWithContext(void)