#include <realtime-simulator-impl.h>
Definition at line 37 of file realtime-simulator-impl.h.
typedef std::list<EventId> ns3::RealtimeSimulatorImpl::DestroyEvents [private] |
Definition at line 89 of file realtime-simulator-impl.h.
Enumeration of the types of packets supported in the class.
Definition at line 46 of file realtime-simulator-impl.h.
ns3::RealtimeSimulatorImpl::RealtimeSimulatorImpl | ( | ) |
Definition at line 66 of file realtime-simulator-impl.cc.
References m_currentTs, m_currentUid, m_running, m_stop, m_synchronizer, m_uid, m_unscheduledEvents, and NS_LOG_FUNCTION_NOARGS.
ns3::RealtimeSimulatorImpl::~RealtimeSimulatorImpl | ( | ) |
Definition at line 87 of file realtime-simulator-impl.cc.
References ns3::Scheduler::Event::impl, m_events, m_synchronizer, NS_LOG_FUNCTION_NOARGS, and ns3::EventImpl::Unref().
void ns3::RealtimeSimulatorImpl::Cancel | ( | const EventId & | ev | ) | [virtual] |
Implements ns3::SimulatorImpl.
Definition at line 722 of file realtime-simulator-impl.cc.
References IsExpired().
void ns3::RealtimeSimulatorImpl::Destroy | ( | void | ) | [virtual] |
Implements ns3::SimulatorImpl.
Definition at line 100 of file realtime-simulator-impl.cc.
References m_destroyEvents, NS_LOG_FUNCTION_NOARGS, and NS_LOG_LOGIC.
Implements ns3::SimulatorImpl.
Definition at line 669 of file realtime-simulator-impl.cc.
References IsExpired(), m_currentTs, and ns3::TimeStep().
Time ns3::RealtimeSimulatorImpl::GetHardLimit | ( | void | ) | const |
Definition at line 798 of file realtime-simulator-impl.cc.
References m_hardLimit, and NS_LOG_FUNCTION_NOARGS.
Time ns3::RealtimeSimulatorImpl::GetMaximumSimulationTime | ( | void | ) | const [virtual] |
Implements ns3::SimulatorImpl.
Definition at line 769 of file realtime-simulator-impl.cc.
References ns3::TimeStep().
Implements ns3::SimulatorImpl.
Definition at line 145 of file realtime-simulator-impl.cc.
References m_events, and NS_LOG_FUNCTION_NOARGS.
RealtimeSimulatorImpl::SynchronizationMode ns3::RealtimeSimulatorImpl::GetSynchronizationMode | ( | void | ) | const |
Definition at line 784 of file realtime-simulator-impl.cc.
References m_synchronizationMode, and NS_LOG_FUNCTION_NOARGS.
TypeId ns3::RealtimeSimulatorImpl::GetTypeId | ( | void | ) | [static] |
This method returns the TypeId associated to ns3::RealtimeSimulatorImpl.
Attributes defined for this type:
No TraceSources defined for this type.
Reimplemented from ns3::Object.
Definition at line 45 of file realtime-simulator-impl.cc.
References ns3::TypeId::AddAttribute(), m_hardLimit, ns3::MakeEnumAccessor(), ns3::MakeEnumChecker(), ns3::Seconds(), ns3::TypeId::SetParent(), SetSynchronizationMode(), SYNC_BEST_EFFORT, and SYNC_HARD_LIMIT.
bool ns3::RealtimeSimulatorImpl::IsExpired | ( | const EventId & | ev | ) | const [virtual] |
Implements ns3::SimulatorImpl.
Definition at line 731 of file realtime-simulator-impl.cc.
References ns3::EventId::GetTs(), ns3::EventId::GetUid(), ns3::EventImpl::IsCancelled(), m_currentTs, m_currentUid, m_destroyEvents, and ns3::EventId::PeekEventImpl().
Referenced by Cancel(), GetDelayLeft(), and Remove().
bool ns3::RealtimeSimulatorImpl::IsFinished | ( | void | ) | const [virtual] |
Implements ns3::SimulatorImpl.
Definition at line 381 of file realtime-simulator-impl.cc.
References m_events, m_mutex, and NS_LOG_FUNCTION_NOARGS.
Time ns3::RealtimeSimulatorImpl::Next | ( | void | ) | const [virtual] |
Implements ns3::SimulatorImpl.
Definition at line 410 of file realtime-simulator-impl.cc.
References NextTs(), NS_LOG_FUNCTION_NOARGS, and ns3::TimeStep().
uint64_t ns3::RealtimeSimulatorImpl::NextTs | ( | void | ) | const [private] |
Definition at line 397 of file realtime-simulator-impl.cc.
References m_events, NS_ASSERT_MSG, and NS_LOG_FUNCTION_NOARGS.
Referenced by Next(), and ProcessOneEvent().
Time ns3::RealtimeSimulatorImpl::Now | ( | void | ) | const [virtual] |
Implements ns3::SimulatorImpl.
Definition at line 585 of file realtime-simulator-impl.cc.
References m_currentTs, and ns3::TimeStep().
Referenced by Schedule().
void ns3::RealtimeSimulatorImpl::ProcessOneEvent | ( | void | ) | [private] |
Definition at line 152 of file realtime-simulator-impl.cc.
References ns3::TimeUnit< 1 >::GetTimeStep(), ns3::Scheduler::Event::impl, m_currentTs, m_currentUid, m_events, m_hardLimit, m_mutex, m_synchronizationMode, m_synchronizer, m_unscheduledEvents, NextTs(), NS_ASSERT_MSG, NS_FATAL_ERROR, NS_LOG_FUNCTION_NOARGS, NS_LOG_LOGIC, and SYNC_HARD_LIMIT.
Referenced by Run().
bool ns3::RealtimeSimulatorImpl::Realtime | ( | void | ) | const [private] |
Definition at line 476 of file realtime-simulator-impl.cc.
References m_synchronizer, and NS_LOG_FUNCTION_NOARGS.
Time ns3::RealtimeSimulatorImpl::RealtimeNow | ( | void | ) | const |
Definition at line 641 of file realtime-simulator-impl.cc.
References m_synchronizer, and ns3::TimeStep().
void ns3::RealtimeSimulatorImpl::Remove | ( | const EventId & | ev | ) | [virtual] |
Implements ns3::SimulatorImpl.
Definition at line 684 of file realtime-simulator-impl.cc.
References IsExpired(), m_destroyEvents, m_events, m_mutex, and m_unscheduledEvents.
void ns3::RealtimeSimulatorImpl::Run | ( | void | ) | [virtual] |
Implements ns3::SimulatorImpl.
Definition at line 417 of file realtime-simulator-impl.cc.
References m_currentTs, m_events, m_mutex, m_running, m_stop, m_synchronizer, m_unscheduledEvents, NS_ASSERT_MSG, NS_LOG_FUNCTION_NOARGS, and ProcessOneEvent().
bool ns3::RealtimeSimulatorImpl::Running | ( | void | ) | const [private] |
Definition at line 469 of file realtime-simulator-impl.cc.
References m_running, and NS_LOG_FUNCTION_NOARGS.
void ns3::RealtimeSimulatorImpl::RunOneEvent | ( | void | ) | [virtual] |
Implements ns3::SimulatorImpl.
Definition at line 495 of file realtime-simulator-impl.cc.
References ns3::Scheduler::Event::impl, ns3::EventImpl::Invoke(), ns3::Scheduler::Event::key, m_currentTs, m_currentUid, m_events, m_mutex, m_running, m_unscheduledEvents, NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION_NOARGS, and NS_LOG_LOGIC.
Implements ns3::SimulatorImpl.
Definition at line 536 of file realtime-simulator-impl.cc.
References ns3::TimeUnit< 1 >::GetTimeStep(), ns3::Scheduler::Event::impl, ns3::TimeUnit< 1 >::IsPositive(), ns3::Scheduler::Event::key, m_currentTs, m_events, m_mutex, m_synchronizer, m_uid, m_unscheduledEvents, Now(), NS_ASSERT_MSG, NS_LOG_FUNCTION, and ns3::TimeStep().
Implements ns3::SimulatorImpl.
Definition at line 647 of file realtime-simulator-impl.cc.
References m_currentTs, m_destroyEvents, m_mutex, m_uid, and NS_LOG_FUNCTION_NOARGS.
Implements ns3::SimulatorImpl.
Definition at line 565 of file realtime-simulator-impl.cc.
References ns3::Scheduler::Event::impl, ns3::Scheduler::Event::key, m_currentTs, m_events, m_mutex, m_synchronizer, m_uid, m_unscheduledEvents, and NS_LOG_FUNCTION_NOARGS.
Definition at line 594 of file realtime-simulator-impl.cc.
References ns3::TimeUnit< 1 >::GetTimeStep(), ns3::Scheduler::Event::impl, ns3::Scheduler::Event::key, m_currentTs, m_events, m_mutex, m_synchronizer, m_uid, m_unscheduledEvents, NS_ASSERT_MSG, and NS_LOG_FUNCTION.
void ns3::RealtimeSimulatorImpl::ScheduleRealtimeNow | ( | EventImpl * | event | ) |
Definition at line 617 of file realtime-simulator-impl.cc.
References ns3::Scheduler::Event::impl, ns3::Scheduler::Event::key, m_currentTs, m_events, m_mutex, m_running, m_synchronizer, m_uid, m_unscheduledEvents, NS_ASSERT_MSG, and NS_LOG_FUNCTION_NOARGS.
void ns3::RealtimeSimulatorImpl::SetHardLimit | ( | Time | limit | ) |
Definition at line 791 of file realtime-simulator-impl.cc.
References m_hardLimit, and NS_LOG_FUNCTION.
Implements ns3::SimulatorImpl.
Definition at line 125 of file realtime-simulator-impl.cc.
References m_events, m_mutex, and NS_LOG_FUNCTION_NOARGS.
void ns3::RealtimeSimulatorImpl::SetSynchronizationMode | ( | RealtimeSimulatorImpl::SynchronizationMode | mode | ) |
Definition at line 777 of file realtime-simulator-impl.cc.
References m_synchronizationMode, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::RealtimeSimulatorImpl::Stop | ( | void | ) | [virtual] |
Implements ns3::SimulatorImpl.
Definition at line 526 of file realtime-simulator-impl.cc.
References m_stop, and NS_LOG_FUNCTION_NOARGS.
uint64_t ns3::RealtimeSimulatorImpl::m_currentTs [private] |
Definition at line 99 of file realtime-simulator-impl.h.
Referenced by GetDelayLeft(), IsExpired(), Now(), ProcessOneEvent(), RealtimeSimulatorImpl(), Run(), RunOneEvent(), Schedule(), ScheduleDestroy(), ScheduleNow(), ScheduleRealtime(), and ScheduleRealtimeNow().
uint32_t ns3::RealtimeSimulatorImpl::m_currentUid [private] |
Definition at line 98 of file realtime-simulator-impl.h.
Referenced by IsExpired(), ProcessOneEvent(), RealtimeSimulatorImpl(), and RunOneEvent().
Definition at line 90 of file realtime-simulator-impl.h.
Referenced by Destroy(), IsExpired(), Remove(), and ScheduleDestroy().
Ptr<Scheduler> ns3::RealtimeSimulatorImpl::m_events [private] |
Definition at line 95 of file realtime-simulator-impl.h.
Referenced by GetScheduler(), IsFinished(), NextTs(), ProcessOneEvent(), Remove(), Run(), RunOneEvent(), Schedule(), ScheduleNow(), ScheduleRealtime(), ScheduleRealtimeNow(), SetScheduler(), and ~RealtimeSimulatorImpl().
Time ns3::RealtimeSimulatorImpl::m_hardLimit [private] |
The maximum allowable drift from real-time in SYNC_HARD_LIMIT mode.
Definition at line 113 of file realtime-simulator-impl.h.
Referenced by GetHardLimit(), GetTypeId(), ProcessOneEvent(), and SetHardLimit().
SystemMutex ns3::RealtimeSimulatorImpl::m_mutex [mutable, private] |
Definition at line 101 of file realtime-simulator-impl.h.
Referenced by IsFinished(), ProcessOneEvent(), Remove(), Run(), RunOneEvent(), Schedule(), ScheduleDestroy(), ScheduleNow(), ScheduleRealtime(), ScheduleRealtimeNow(), and SetScheduler().
bool ns3::RealtimeSimulatorImpl::m_running [private] |
Definition at line 92 of file realtime-simulator-impl.h.
Referenced by RealtimeSimulatorImpl(), Run(), Running(), RunOneEvent(), and ScheduleRealtimeNow().
bool ns3::RealtimeSimulatorImpl::m_stop [private] |
Definition at line 91 of file realtime-simulator-impl.h.
Referenced by RealtimeSimulatorImpl(), Run(), and Stop().
The policy to use if the simulation cannot keep synchronized to real-time.
Definition at line 108 of file realtime-simulator-impl.h.
Referenced by GetSynchronizationMode(), ProcessOneEvent(), and SetSynchronizationMode().
Definition at line 103 of file realtime-simulator-impl.h.
Referenced by ProcessOneEvent(), Realtime(), RealtimeNow(), RealtimeSimulatorImpl(), Run(), Schedule(), ScheduleNow(), ScheduleRealtime(), ScheduleRealtimeNow(), and ~RealtimeSimulatorImpl().
uint32_t ns3::RealtimeSimulatorImpl::m_uid [private] |
Definition at line 97 of file realtime-simulator-impl.h.
Referenced by RealtimeSimulatorImpl(), Schedule(), ScheduleDestroy(), ScheduleNow(), ScheduleRealtime(), and ScheduleRealtimeNow().
int ns3::RealtimeSimulatorImpl::m_unscheduledEvents [private] |
Definition at line 96 of file realtime-simulator-impl.h.
Referenced by ProcessOneEvent(), RealtimeSimulatorImpl(), Remove(), Run(), RunOneEvent(), Schedule(), ScheduleNow(), ScheduleRealtime(), and ScheduleRealtimeNow().