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);
keep track of time values and allow control of global simulation resolution
EventsWithContext m_eventsWithContext
smart pointer class similar to boost::intrusive_ptr
bool IsPositive(void) const
#define NS_LOG_FUNCTION(parameters)
Ptr< Scheduler > m_events
virtual void DoDispose(void)
Time TimeStep(uint64_t ts)
virtual Time GetMaximumSimulationTime(void) const
virtual void SetScheduler(ObjectFactory schedulerFactory)
DestroyEvents m_destroyEvents
#define NS_ASSERT(condition)
#define NS_LOG_COMPONENT_DEFINE(name)
SystemMutex m_eventsWithContextMutex
virtual void DoDispose(void)
static EventId Schedule(Time const &time, MEM mem_ptr, OBJ obj)
EventImpl * PeekEventImpl(void) const
virtual EventId ScheduleNow(EventImpl *event)
virtual uint32_t GetSystemId(void) const
static TypeId GetTypeId(void)
virtual void Remove(const EventId &ev)
Ptr< Object > Create(void) const
A class which provides a simple way to implement a Critical Section.
virtual Time Now(void) const
NS_OBJECT_ENSURE_REGISTERED(AntennaModel)
uint32_t m_currentContext
uint32_t GetUid(void) const
#define NS_LOG_LOGIC(msg)
virtual bool IsExpired(const EventId &ev) const
virtual Time GetDelayLeft(const EventId &id) const
virtual EventId ScheduleDestroy(EventImpl *event)
std::list< struct EventWithContext > EventsWithContext
static bool Equals(ThreadId id)
Compares an TharedId with the current ThreadId .
virtual void Cancel(const EventId &ev)
virtual uint32_t GetContext(void) const
int64_t GetTimeStep(void) const
virtual void ScheduleWithContext(uint32_t context, Time const &time, EventImpl *event)
#define NS_ASSERT_MSG(condition, message)
virtual EventId Schedule(Time const &time, EventImpl *event)
instantiate subclasses of ns3::Object.
virtual bool IsFinished(void) const
an identifier for simulation events.
SystemThread::ThreadId m_main
void ProcessOneEvent(void)
bool m_eventsWithContextEmpty
static ThreadId Self(void)
Returns the current thread Id.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
uint64_t GetTs(void) const
void ProcessEventsWithContext(void)