View | Details | Raw Unified | Return to bug 749
Collapse All | Expand All

(-)a/src/devices/emu/emu-net-device.cc (-2 / +3 lines)
 Lines 743-750    Link Here 
743
743
744
      NS_LOG_INFO ("EmuNetDevice::ReadThread(): Received packet");
744
      NS_LOG_INFO ("EmuNetDevice::ReadThread(): Received packet");
745
      NS_LOG_INFO ("EmuNetDevice::ReadThread(): Scheduling handler");
745
      NS_LOG_INFO ("EmuNetDevice::ReadThread(): Scheduling handler");
746
      DynamicCast<RealtimeSimulatorImpl> (Simulator::GetImplementation ())->ScheduleRealtimeNow (
746
      Ptr<RealtimeSimulatorImpl> sched = DynamicCast<RealtimeSimulatorImpl> (Simulator::GetImplementation ());
747
        MakeEvent (&EmuNetDevice::ForwardUp, this, buf, len));
747
      sched->ScheduleRealtimeNow (MakeEvent (&EmuNetDevice::ForwardUp, this, buf, len),
748
                                  GetNode ()->GetId ());
748
      buf = 0;
749
      buf = 0;
749
    }
750
    }
750
}
751
}
(-)a/src/simulator/realtime-simulator-impl.cc (-2 / +4 lines)
 Lines 620-626    Link Here 
620
// Schedule an event for a _relative_ time in the future.
620
// Schedule an event for a _relative_ time in the future.
621
//
621
//
622
void
622
void
623
RealtimeSimulatorImpl::ScheduleRealtime (Time const &time, EventImpl *impl)
623
RealtimeSimulatorImpl::ScheduleRealtime (Time const &time, EventImpl *impl, uint32_t context)
624
{
624
{
625
  NS_LOG_FUNCTION (time << impl);
625
  NS_LOG_FUNCTION (time << impl);
626
626
 Lines 634-639    Link Here 
634
    ev.impl = impl;
634
    ev.impl = impl;
635
    ev.key.m_ts = ts;
635
    ev.key.m_ts = ts;
636
    ev.key.m_uid = m_uid;
636
    ev.key.m_uid = m_uid;
637
    ev.key.m_context = context;
637
    m_uid++;
638
    m_uid++;
638
    m_unscheduledEvents++;
639
    m_unscheduledEvents++;
639
    m_events->Insert (ev);
640
    m_events->Insert (ev);
 Lines 643-649    Link Here 
643
}
644
}
644
645
645
void
646
void
646
RealtimeSimulatorImpl::ScheduleRealtimeNow (EventImpl *impl)
647
RealtimeSimulatorImpl::ScheduleRealtimeNow (EventImpl *impl, uint32_t context)
647
{
648
{
648
  NS_LOG_FUNCTION_NOARGS ();
649
  NS_LOG_FUNCTION_NOARGS ();
649
  {
650
  {
 Lines 659-664    Link Here 
659
    ev.impl = impl;
660
    ev.impl = impl;
660
    ev.key.m_ts = ts;
661
    ev.key.m_ts = ts;
661
    ev.key.m_uid = m_uid;
662
    ev.key.m_uid = m_uid;
663
    ev.key.m_context = context;
662
    m_uid++;
664
    m_uid++;
663
    m_unscheduledEvents++;
665
    m_unscheduledEvents++;
664
    m_events->Insert (ev);
666
    m_events->Insert (ev);
(-)a/src/simulator/realtime-simulator-impl.h (-2 / +2 lines)
 Lines 71-78    Link Here 
71
  virtual void SetScheduler (ObjectFactory schedulerFactory);
71
  virtual void SetScheduler (ObjectFactory schedulerFactory);
72
  virtual uint32_t GetContext (void) const;
72
  virtual uint32_t GetContext (void) const;
73
73
74
  void ScheduleRealtime (Time const &time, EventImpl *event);
74
  void ScheduleRealtime (Time const &time, EventImpl *event, uint32_t context=0);
75
  void ScheduleRealtimeNow (EventImpl *event);
75
  void ScheduleRealtimeNow (EventImpl *event, uint32_t context=0);
76
  Time RealtimeNow (void) const;
76
  Time RealtimeNow (void) const;
77
77
78
  void SetSynchronizationMode (RealtimeSimulatorImpl::SynchronizationMode mode);
78
  void SetSynchronizationMode (RealtimeSimulatorImpl::SynchronizationMode mode);

Return to bug 749