|
|
| 81 |
void |
81 |
void |
| 82 |
DefaultSimulatorImpl::Destroy () |
82 |
DefaultSimulatorImpl::Destroy () |
| 83 |
{ |
83 |
{ |
|
|
84 |
while (!m_destroyWithContextEvents.empty ()) |
| 85 |
{ |
| 86 |
EventId event = m_destroyWithContextEvents.front (); |
| 87 |
Ptr<EventImpl> ev = event.PeekEventImpl (); |
| 88 |
m_destroyWithContextEvents.pop_front (); |
| 89 |
NS_LOG_LOGIC ("handle destroy (context) " << ev); |
| 90 |
if (!ev->IsCancelled ()) |
| 91 |
{ |
| 92 |
m_currentContext = event.GetContext (); |
| 93 |
ev->Invoke (); |
| 94 |
} |
| 95 |
} |
| 96 |
m_currentContext = 0xffffffff; |
| 84 |
while (!m_destroyEvents.empty ()) |
97 |
while (!m_destroyEvents.empty ()) |
| 85 |
{ |
98 |
{ |
| 86 |
Ptr<EventImpl> ev = m_destroyEvents.front ().PeekEventImpl (); |
99 |
Ptr<EventImpl> ev = m_destroyEvents.front ().PeekEventImpl (); |
|
|
| 281 |
return id; |
294 |
return id; |
| 282 |
} |
295 |
} |
| 283 |
|
296 |
|
|
|
297 |
EventId |
| 298 |
DefaultSimulatorImpl::ScheduleDestroyWithContext (uint32_t context, EventImpl *event) |
| 299 |
{ |
| 300 |
EventId id (Ptr<EventImpl> (event, false), m_currentTs, context, 2); |
| 301 |
m_destroyWithContextEvents.push_back (id); |
| 302 |
m_uid++; |
| 303 |
return id; |
| 304 |
} |
| 305 |
|
| 284 |
Time |
306 |
Time |
| 285 |
DefaultSimulatorImpl::Now (void) const |
307 |
DefaultSimulatorImpl::Now (void) const |
| 286 |
{ |
308 |
{ |