Control the virtual time and the execution of simulation events. More...
Collaboration diagram for Simulator:Modules | |
| Realtime Simulator | |
| Realtime simulator implementation. | |
Files | |
| file | default-simulator-impl.cc |
| Implementation of class ns3::DefaultSimulatorImpl. | |
| file | default-simulator-impl.h |
| Declaration of class ns3::DefaultSimulatorImpl. | |
| file | des-metrics.cc |
| ns3::DesMetrics implementation. | |
| file | des-metrics.h |
| ns3::DesMetrics declaration. | |
| file | sample-simulator.cc |
| Example program demonstrating use of various Schedule functions. | |
| file | simulator-impl.cc |
| Implementation of class ns3::SimulatorImpl. | |
| file | simulator-impl.h |
| Declaration of class ns3::SimulatorImpl. | |
| file | simulator.cc |
| ns3::Simulator implementation, as well as implementation pointer, global scheduler implementation, and default ns3::NodePrinter and ns3::TimePrinter. | |
| file | simulator.h |
| ns3::Simulator declaration. | |
Classes | |
| class | ns3::DefaultSimulatorImpl |
| The default single process simulator implementation. More... | |
| class | ns3::DesMetrics |
| Event trace data collector for the DES Metrics project. More... | |
| class | ns3::DistributedSimulatorImpl |
| Distributed simulator implementation using lookahead. More... | |
| struct | ns3::DefaultSimulatorImpl::EventWithContext |
| Wrap an event with its execution context. More... | |
| class | ns3::Simulator |
| Control the scheduling of simulation events. More... | |
| class | ns3::SimulatorImpl |
| The SimulatorImpl base class. More... | |
| class | ns3::VisualSimulatorImpl |
| A replacement simulator that starts the visualizer. More... | |
Enumerations | |
| enum | { ns3::Simulator::NO_CONTEXT = 0xffffffff } |
| Context enum values. More... | |
Functions | |
| static SimulatorImpl * | ns3::GetImpl (void) |
| Get the SimulatorImpl singleton. More... | |
| Time | ns3::Now (void) |
| create an ns3::Time instance which contains the current simulation time. More... | |
| static SimulatorImpl ** | ns3::PeekImpl (void) |
| Get the static SimulatorImpl instance. More... | |
Variables | |
| static GlobalValue | ns3::g_simTypeImpl |
| The specific simulator implementation to use. More... | |
Control the virtual time and the execution of simulation events.
| anonymous enum |
Context enum values.
| Enumerator | |
|---|---|
| NO_CONTEXT |
Flag for events not associated with any particular context. |
Definition at line 188 of file simulator.h.
|
static |
Get the SimulatorImpl singleton.
Definition at line 127 of file simulator.cc.
References ns3::ObjectFactory::Create(), ns3::StringValue::Get(), ns3::GetPointer(), ns3::GlobalValue::GetValue(), ns3::LogSetNodePrinter(), ns3::LogSetTimePrinter(), ns3::NodePrinter(), ns3::PeekImpl(), ns3::ObjectFactory::SetTypeId(), and ns3::TimePrinter().
Referenced by ns3::Simulator::Cancel(), ns3::Simulator::DoSchedule(), ns3::Simulator::DoScheduleDestroy(), ns3::Simulator::DoScheduleNow(), ns3::Simulator::GetContext(), ns3::Simulator::GetDelayLeft(), ns3::Simulator::GetImplementation(), ns3::Simulator::GetMaximumSimulationTime(), ns3::Simulator::GetSystemId(), ns3::Simulator::IsExpired(), ns3::Simulator::IsFinished(), ns3::Simulator::Now(), ns3::Simulator::Remove(), ns3::Simulator::Run(), ns3::Simulator::ScheduleWithContext(), ns3::Simulator::SetScheduler(), and ns3::Simulator::Stop().
Here is the call graph for this function:
Here is the caller graph for this function:| Time ns3::Now | ( | void | ) |
create an ns3::Time instance which contains the current simulation time.
This is really a shortcut for the ns3::Simulator::Now method. It is typically used as shown below to schedule an event which expires at the absolute time "2 seconds":
Definition at line 340 of file simulator.cc.
References ns3::Simulator::Now().
Referenced by DcfManagerTest::AddAccessRequestWithAckTimeout(), DcfManagerTest::AddAccessRequestWithSuccessfullAck(), DcfManagerTest::AddAckTimeoutReset(), DcfManagerTest::AddCcaBusyEvt(), DcfManagerTest::AddNavReset(), DcfManagerTest::AddNavStart(), DcfManagerTest::AddRxErrorEvt(), DcfManagerTest::AddRxInsideSifsEvt(), DcfManagerTest::AddRxOkEvt(), DcfManagerTest::AddRxStartEvt(), DcfManagerTest::AddSwitchingEvt(), DcfManagerTest::AddTxEvt(), ns3::DefaultChannelScheduler::AssignDefaultCchAccess(), DsdvManetExample::CheckThroughput(), RoutingExperiment::CheckThroughput(), Experiment::CheckThroughput(), VanetRoutingExperiment::CheckThroughput(), ns3::LteInterference::ConditionallyEvaluateChunk(), ns3::SpectrumInterference::ConditionallyEvaluateChunk(), LteDownlinkPowerControlRrcConnectionReconfigurationTestCase::ConnectionReconfigurationEnb(), LteDownlinkPowerControlRrcConnectionReconfigurationTestCase::ConnectionReconfigurationUe(), VanetRoutingExperiment::CourseChange(), WaypointLazyNotifyFalse::CourseChangeCallback(), WaypointLazyNotifyTrue::CourseChangeCallback(), CwndChange(), Ns3TcpCwndTestCase1::CwndChange(), Ns3TcpCwndTestCase2::CwndChange(), Ns3TcpLossTestCase::CwndTracer(), LrWpanAckTestCase::DataConfirm(), LrWpanAckTestCase::DataIndication(), CoDelQueueDiscBasicDrop::Dequeue(), LteFrAreaTestCase::DlDataRxStart(), LteCqiGenerationTestCase::DlScheduling(), LteInterferenceTestCase::DlScheduling(), LteLinkAdaptationTestCase::DlScheduling(), LtePathlossModelSystemTestCase::DlScheduling(), LteCqiGenerationDlPowerControlTestCase::DlScheduling(), ns3::SpectrumInterference::DoAddSignal(), EventGarbageCollectorTestCase::DoRun(), LiIonEnergyTestCase::DoRun(), BasicEnergyHarvesterTestCase::DoRun(), LrWpanAckTestCase::DoRun(), ns3::SpectrumInterference::DoSubtractSignal(), WatchdogTestCase::Expire(), ns3::Watchdog::Expire(), ns3::JakesProcess::GetComplexGain(), ns3::ChannelCoordinator::GetIntervalTime(), LenaMimoTestCase::GetRlcBufferSample(), Ipv4DynamicGlobalRoutingTestCase::HandleRead(), LteHandoverTargetTestCase::HandoverStartCallback(), Ns3TcpLossTestCase::Ipv4L3Tx(), Ns3TcpStateTestCase::Ipv4L3Tx(), Ns3TcpInteroperabilityTestCase::Ipv4L3Tx(), OcbWifiMacTestCase::MacAssoc(), JakesPropagationExample::Next(), DcfManagerTest::NotifyAccessGranted(), ChannelCoordinationTestCase::NotifyCchStartNow(), DcfManagerTest::NotifyChannelSwitching(), DcfManagerTest::NotifyCollision(), ChannelCoordinationTestCase::NotifyGuardStartNow(), DcfManagerTest::NotifyInternalCollision(), DcfImmediateAccessBroadcastTestCase::NotifyPhyTxBegin(), ChannelCoordinationTestCase::NotifySchStartNow(), SimulatorEventsTestCase::NowUs(), LrWpanCcaTestCase::PhyRxBegin(), LrWpanCcaTestCase::PhyRxDrop(), LrWpanCcaTestCase::PhyRxEnd(), OcbWifiMacTestCase::PhyRxOkTrace(), LrWpanCcaTestCase::PhyTxBegin(), LrWpanCcaTestCase::PhyTxEnd(), OcbWifiMacTestCase::PhyTxTrace(), ns3::Watchdog::Ping(), LrWpanCcaTestCase::PlmeCcaConfirm(), PrintReceivedPacket(), PrintReceivedRoutingPacket(), ns3::dsdv::RoutingProtocol::PrintRoutingTable(), ns3::aodv::RoutingProtocol::PrintRoutingTable(), ns3::Ipv4StaticRouting::PrintRoutingTable(), ns3::Ipv4ListRouting::PrintRoutingTable(), ns3::Ipv4GlobalRouting::PrintRoutingTable(), ns3::Ipv6ListRouting::PrintRoutingTable(), ns3::Ipv4NixVectorRouting::PrintRoutingTable(), ns3::Rip::PrintRoutingTable(), ns3::RipNg::PrintRoutingTable(), ns3::Ipv6StaticRouting::PrintRoutingTable(), ns3::olsr::RoutingProtocol::PrintRoutingTable(), LteUplinkPowerControlTestCase::PucchTxPowerTrace(), LteUplinkPowerControlTestCase::PuschTxPowerTrace(), WaveNetDeviceExample::Receive(), Receiver::Receive(), Bug730TestCase::Receive(), AnnexC_TestCase::Receive(), DsdvManetExample::ReceivePacket(), LrWpanPlmeAndPdInterfaceTestCase::ReceivePdDataInndication(), WaveNetDeviceExample::ReceiveVsa(), LteUeMeasurementsTestCase::RecvMeasurementReport(), LteUeMeasurementsPiecewiseTestCase1::RecvMeasurementReportCallback(), LteUeMeasurementsPiecewiseTestCase2::RecvMeasurementReportCallback(), LteUeMeasurementsHandoverTestCase::RecvMeasurementReportCallback(), LteUeMeasurementsTestCase::ReportUeMeasurements(), NetAnimExperiment::ResetData(), Experiment::ResetData(), RxDrop(), EpsBearerTagUdpClient::Send(), FlameRegressionTest::SendData(), HwmpProactiveRegressionTest::SendData(), Bug772ChainTest::SendData(), HwmpSimplestRegressionTest::SendData(), HwmpReactiveRegressionTest::SendData(), HwmpDoRfRegressionTest::SendDataA(), HwmpDoRfRegressionTest::SendDataB(), HwmpDoRfRegressionTest::SendDataC(), AnnexC_TestCase::SendPacket(), ChainRegressionTest::SendPing(), ChannelAccessTestCase::SendX(), LteUplinkPowerControlTestCase::SetTpcConfiguration(), LteFrAreaTestCase::SimpleTeleportUe(), LteUplinkPowerControlTestCase::SrsTxPowerTrace(), ns3::WaveformGenerator::Start(), ns3::ChannelCoordinator::StartChannelCoordination(), Ns3TcpStateTestCase::StartFlow(), Ns3TcpLossTestCase::StartFlow(), ns3::SpectrumInterference::StartRx(), ns3::LteInterference::StartRx(), LteUplinkPowerControlTestCase::TeleportUe(), LteFrAreaTestCase::TeleportUe(), LteFrAreaTestCase::TeleportUe2(), ChannelAccessTestCase::TestAlternating(), ChannelAccessTestCase::TestAlternatingAfter(), ChannelAccessTestCase::TestContinuous(), ChannelAccessTestCase::TestContinuousAfter(), ChannelAccessTestCase::TestExtended(), ChannelAccessTestCase::TestExtendedAfter(), ChannelCoordinationTestCase::TestIntervalAfter(), ProbeTestCase1::TraceSink(), WaveformGeneratorTestCase::TraceWave(), LteFrAreaTestCase::UlDataRxStart(), LteCqiGenerationTestCase::UlScheduling(), LteInterferenceTestCase::UlScheduling(), LteCqiGenerationDlPowerControlTestCase::UlScheduling(), ns3::SpectrumAnalyzer::UpdateEnergyReceivedSoFar(), NetAnimExperiment::UpdatePositions(), Experiment::UpdatePositions(), ns3::WriteAveragePowerSpectralDensityReport(), Ns3TcpStateTestCase::WriteUntilBufferFull(), and Ns3TcpLossTestCase::WriteUntilBufferFull().
Here is the call graph for this function:
|
static |
Get the static SimulatorImpl instance.
Definition at line 115 of file simulator.cc.
Referenced by ns3::Simulator::Cancel(), ns3::Simulator::Destroy(), ns3::GetImpl(), ns3::Simulator::GetSystemId(), ns3::Simulator::IsExpired(), ns3::Simulator::Remove(), and ns3::Simulator::SetImplementation().
Here is the caller graph for this function:
|
static |
The specific simulator implementation to use.
Must be derived from SimulatorImpl.
Definition at line 62 of file simulator.cc.