#include <simulator.h>
Static Public Member Functions | |
static void | SetImplementation (Ptr< SimulatorImpl > impl) |
static void | SetScheduler (Ptr< Scheduler > scheduler) |
static void | Destroy (void) |
static bool | IsFinished (void) |
static Time | Next (void) |
static void | Run (void) |
static void | RunOneEvent (void) |
static void | Stop (void) |
static void | Stop (Time const &time) |
template<typename MEM , typename OBJ > | |
static EventId | Schedule (Time const &time, MEM mem_ptr, OBJ obj) |
template<typename MEM , typename OBJ , typename T1 > | |
static EventId | Schedule (Time const &time, MEM mem_ptr, OBJ obj, T1 a1) |
template<typename MEM , typename OBJ , typename T1 , typename T2 > | |
static EventId | Schedule (Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2) |
template<typename MEM , typename OBJ , typename T1 , typename T2 , typename T3 > | |
static EventId | Schedule (Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3) |
template<typename MEM , typename OBJ , typename T1 , typename T2 , typename T3 , typename T4 > | |
static EventId | Schedule (Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4) |
template<typename MEM , typename OBJ , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > | |
static EventId | Schedule (Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) |
static EventId | Schedule (Time const &time, void(*f)(void)) |
template<typename U1 , typename T1 > | |
static EventId | Schedule (Time const &time, void(*f)(U1), T1 a1) |
template<typename U1 , typename U2 , typename T1 , typename T2 > | |
static EventId | Schedule (Time const &time, void(*f)(U1, U2), T1 a1, T2 a2) |
template<typename U1 , typename U2 , typename U3 , typename T1 , typename T2 , typename T3 > | |
static EventId | Schedule (Time const &time, void(*f)(U1, U2, U3), T1 a1, T2 a2, T3 a3) |
template<typename U1 , typename U2 , typename U3 , typename U4 , typename T1 , typename T2 , typename T3 , typename T4 > | |
static EventId | Schedule (Time const &time, void(*f)(U1, U2, U3, U4), T1 a1, T2 a2, T3 a3, T4 a4) |
template<typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > | |
static EventId | Schedule (Time const &time, void(*f)(U1, U2, U3, U4, U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) |
template<typename MEM , typename OBJ > | |
static EventId | ScheduleNow (MEM mem_ptr, OBJ obj) |
template<typename MEM , typename OBJ , typename T1 > | |
static EventId | ScheduleNow (MEM mem_ptr, OBJ obj, T1 a1) |
template<typename MEM , typename OBJ , typename T1 , typename T2 > | |
static EventId | ScheduleNow (MEM mem_ptr, OBJ obj, T1 a1, T2 a2) |
template<typename MEM , typename OBJ , typename T1 , typename T2 , typename T3 > | |
static EventId | ScheduleNow (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3) |
template<typename MEM , typename OBJ , typename T1 , typename T2 , typename T3 , typename T4 > | |
static EventId | ScheduleNow (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4) |
template<typename MEM , typename OBJ , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > | |
static EventId | ScheduleNow (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) |
static EventId | ScheduleNow (void(*f)(void)) |
template<typename U1 , typename T1 > | |
static EventId | ScheduleNow (void(*f)(U1), T1 a1) |
template<typename U1 , typename U2 , typename T1 , typename T2 > | |
static EventId | ScheduleNow (void(*f)(U1, U2), T1 a1, T2 a2) |
template<typename U1 , typename U2 , typename U3 , typename T1 , typename T2 , typename T3 > | |
static EventId | ScheduleNow (void(*f)(U1, U2, U3), T1 a1, T2 a2, T3 a3) |
template<typename U1 , typename U2 , typename U3 , typename U4 , typename T1 , typename T2 , typename T3 , typename T4 > | |
static EventId | ScheduleNow (void(*f)(U1, U2, U3, U4), T1 a1, T2 a2, T3 a3, T4 a4) |
template<typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > | |
static EventId | ScheduleNow (void(*f)(U1, U2, U3, U4, U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) |
template<typename MEM , typename OBJ > | |
static EventId | ScheduleDestroy (MEM mem_ptr, OBJ obj) |
template<typename MEM , typename OBJ , typename T1 > | |
static EventId | ScheduleDestroy (MEM mem_ptr, OBJ obj, T1 a1) |
template<typename MEM , typename OBJ , typename T1 , typename T2 > | |
static EventId | ScheduleDestroy (MEM mem_ptr, OBJ obj, T1 a1, T2 a2) |
template<typename MEM , typename OBJ , typename T1 , typename T2 , typename T3 > | |
static EventId | ScheduleDestroy (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3) |
template<typename MEM , typename OBJ , typename T1 , typename T2 , typename T3 , typename T4 > | |
static EventId | ScheduleDestroy (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4) |
template<typename MEM , typename OBJ , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > | |
static EventId | ScheduleDestroy (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) |
static EventId | ScheduleDestroy (void(*f)(void)) |
template<typename U1 , typename T1 > | |
static EventId | ScheduleDestroy (void(*f)(U1), T1 a1) |
template<typename U1 , typename U2 , typename T1 , typename T2 > | |
static EventId | ScheduleDestroy (void(*f)(U1, U2), T1 a1, T2 a2) |
template<typename U1 , typename U2 , typename U3 , typename T1 , typename T2 , typename T3 > | |
static EventId | ScheduleDestroy (void(*f)(U1, U2, U3), T1 a1, T2 a2, T3 a3) |
template<typename U1 , typename U2 , typename U3 , typename U4 , typename T1 , typename T2 , typename T3 , typename T4 > | |
static EventId | ScheduleDestroy (void(*f)(U1, U2, U3, U4), T1 a1, T2 a2, T3 a3, T4 a4) |
template<typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > | |
static EventId | ScheduleDestroy (void(*f)(U1, U2, U3, U4, U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) |
static void | Remove (const EventId &id) |
static void | Cancel (const EventId &id) |
static bool | IsExpired (const EventId &id) |
static Time | Now (void) |
static Time | GetDelayLeft (const EventId &id) |
static Time | GetMaximumSimulationTime (void) |
static EventId | Schedule (Time const &time, const Ptr< EventImpl > &event) |
static EventId | ScheduleDestroy (const Ptr< EventImpl > &event) |
static EventId | ScheduleNow (const Ptr< EventImpl > &event) |
The internal simulation clock is maintained as a 64-bit integer in a unit specified by the user through the TimeStepPrecision::Set function. This means that it is not possible to specify event expiration times with anything better than this user-specified accuracy. Events whose expiration time is the same modulo this accuracy are scheduled in FIFO order: the first event inserted in the scheduling queue is scheduled to expire first.
A simple example of how to use the Simulator class to schedule events is shown below:
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ #include "ns3/simulator.h" #include "ns3/nstime.h" #include "ns3/command-line.h" #include <iostream> using namespace ns3; class MyModel { public: void Start (void); private: void DealWithEvent (double eventValue); }; void MyModel::Start (void) { Simulator::Schedule (Seconds (10.0), &MyModel::DealWithEvent, this, Simulator::Now ().GetSeconds ()); } void MyModel::DealWithEvent (double value) { std::cout << "Member method received event at " << Simulator::Now ().GetSeconds () << "s started at " << value << "s" << std::endl; } static void random_function (MyModel *model) { std::cout << "random function received event at " << Simulator::Now ().GetSeconds () << "s" << std::endl; model->Start (); } int main (int argc, char *argv[]) { CommandLine cmd; cmd.Parse (argc, argv); MyModel model; Simulator::Schedule (Seconds (10.0), &random_function, &model); Simulator::Run (); Simulator::Destroy (); }
static void ns3::Simulator::Cancel | ( | const EventId & | id | ) | [static] |
Set the cancel bit on this event: the event's associated function will not be invoked when it expires. This method has the same visible effect as the ns3::Simulator::remove method but its algorithmic complexity is much lower: it has O(1) complexity. This method has the exact same semantics as ns3::EventId::cancel. Note that it is not possible to cancel events which were scheduled for the "destroy" time. Doing so will result in a program error (crash).
id | the event to cancel |
static void ns3::Simulator::Destroy | ( | void | ) | [static] |
Every event scheduled by the Simulator::insertAtDestroy method is invoked. Then, we ensure that any memory allocated by the Simulator is freed. This method is typically invoked at the end of a simulation to avoid false-positive reports by a leak checker. After this method has been invoked, it is actually possible to restart a new simulation with a set of calls to Simulator::run and Simulator::insert_*.
id | the event id to analyse |
static Time ns3::Simulator::GetMaximumSimulationTime | ( | void | ) | [static] |
static bool ns3::Simulator::IsExpired | ( | const EventId & | id | ) | [static] |
This method has O(1) complexity. Note that it is not possible to test for the expiration of events which were scheduled for the "destroy" time. Doing so will result in a program error (crash). An event is said to "expire" when it starts being scheduled which means that if the code executed by the event calls this function, it will get true.
id | the event to test for expiration |
static bool ns3::Simulator::IsFinished | ( | void | ) | [static] |
If there are no more events lefts to be scheduled, or if simulation time has already reached the "stop time" (see Simulator::Stop()), return true. Return false otherwise.
static Time ns3::Simulator::Next | ( | void | ) | [static] |
If Simulator::isFinished returns true, the behavior of this method is undefined. Otherwise, it returns the microsecond-based time of the next event expected to be scheduled.
static Time ns3::Simulator::Now | ( | void | ) | [static] |
Return the "current simulation time".
static void ns3::Simulator::Remove | ( | const EventId & | id | ) | [static] |
Remove an event from the event list. This method has the same visible effect as the ns3::EventId::Cancel method but its algorithmic complexity is much higher: it has often O(log(n)) complexity, sometimes O(n), sometimes worse. Note that it is not possible to remove events which were scheduled for the "destroy" time. Doing so will result in a program error (crash).
id | the event to remove from the list of scheduled events. |
static void ns3::Simulator::Run | ( | void | ) | [static] |
Run the simulation until one of:
static void ns3::Simulator::RunOneEvent | ( | void | ) | [static] |
Process only the next simulation event, then return immediately.
static EventId ns3::Simulator::Schedule | ( | Time const & | time, | |
const Ptr< EventImpl > & | event | |||
) | [static] |
time | delay until the event expires | |
event | the event to schedule |
EventId ns3::Simulator::Schedule | ( | Time const & | time, | |
void(*)(U1, U2, U3, U4, U5) | f, | |||
T1 | a1, | |||
T2 | a2, | |||
T3 | a3, | |||
T4 | a4, | |||
T5 | a5 | |||
) | [inline, static] |
time | the relative expiration time of the event. | |
f | the function to invoke | |
a1 | the first argument to pass to the function to invoke | |
a2 | the second argument to pass to the function to invoke | |
a3 | the third argument to pass to the function to invoke | |
a4 | the fourth argument to pass to the function to invoke | |
a5 | the fifth argument to pass to the function to invoke |
EventId ns3::Simulator::Schedule | ( | Time const & | time, | |
void(*)(U1, U2, U3, U4) | f, | |||
T1 | a1, | |||
T2 | a2, | |||
T3 | a3, | |||
T4 | a4 | |||
) | [inline, static] |
time | the relative expiration time of the event. | |
f | the function to invoke | |
a1 | the first argument to pass to the function to invoke | |
a2 | the second argument to pass to the function to invoke | |
a3 | the third argument to pass to the function to invoke | |
a4 | the fourth argument to pass to the function to invoke |
EventId ns3::Simulator::Schedule | ( | Time const & | time, | |
void(*)(U1, U2, U3) | f, | |||
T1 | a1, | |||
T2 | a2, | |||
T3 | a3 | |||
) | [inline, static] |
time | the relative expiration time of the event. | |
f | the function to invoke | |
a1 | the first argument to pass to the function to invoke | |
a2 | the second argument to pass to the function to invoke | |
a3 | the third argument to pass to the function to invoke |
EventId ns3::Simulator::Schedule | ( | Time const & | time, | |
void(*)(U1, U2) | f, | |||
T1 | a1, | |||
T2 | a2 | |||
) | [inline, static] |
time | the relative expiration time of the event. | |
f | the function to invoke | |
a1 | the first argument to pass to the function to invoke | |
a2 | the second argument to pass to the function to invoke |
EventId ns3::Simulator::Schedule | ( | Time const & | time, | |
void(*)(U1) | f, | |||
T1 | a1 | |||
) | [inline, static] |
time | the relative expiration time of the event. | |
f | the function to invoke | |
a1 | the first argument to pass to the function to invoke |
time | the relative expiration time of the event. | |
f | the function to invoke |
EventId ns3::Simulator::Schedule | ( | Time const & | time, | |
MEM | mem_ptr, | |||
OBJ | obj, | |||
T1 | a1, | |||
T2 | a2, | |||
T3 | a3, | |||
T4 | a4, | |||
T5 | a5 | |||
) | [inline, static] |
time | the relative expiration time of the event. | |
mem_ptr | member method pointer to invoke | |
obj | the object on which to invoke the member method | |
a1 | the first argument to pass to the invoked method | |
a2 | the second argument to pass to the invoked method | |
a3 | the third argument to pass to the invoked method | |
a4 | the fourth argument to pass to the invoked method | |
a5 | the fifth argument to pass to the invoked method |
EventId ns3::Simulator::Schedule | ( | Time const & | time, | |
MEM | mem_ptr, | |||
OBJ | obj, | |||
T1 | a1, | |||
T2 | a2, | |||
T3 | a3, | |||
T4 | a4 | |||
) | [inline, static] |
time | the relative expiration time of the event. | |
mem_ptr | member method pointer to invoke | |
obj | the object on which to invoke the member method | |
a1 | the first argument to pass to the invoked method | |
a2 | the second argument to pass to the invoked method | |
a3 | the third argument to pass to the invoked method | |
a4 | the fourth argument to pass to the invoked method |
EventId ns3::Simulator::Schedule | ( | Time const & | time, | |
MEM | mem_ptr, | |||
OBJ | obj, | |||
T1 | a1, | |||
T2 | a2, | |||
T3 | a3 | |||
) | [inline, static] |
time | the relative expiration time of the event. | |
mem_ptr | member method pointer to invoke | |
obj | the object on which to invoke the member method | |
a1 | the first argument to pass to the invoked method | |
a2 | the second argument to pass to the invoked method | |
a3 | the third argument to pass to the invoked method |
EventId ns3::Simulator::Schedule | ( | Time const & | time, | |
MEM | mem_ptr, | |||
OBJ | obj, | |||
T1 | a1, | |||
T2 | a2 | |||
) | [inline, static] |
time | the relative expiration time of the event. | |
mem_ptr | member method pointer to invoke | |
obj | the object on which to invoke the member method | |
a1 | the first argument to pass to the invoked method | |
a2 | the second argument to pass to the invoked method |
EventId ns3::Simulator::Schedule | ( | Time const & | time, | |
MEM | mem_ptr, | |||
OBJ | obj, | |||
T1 | a1 | |||
) | [inline, static] |
time | the relative expiration time of the event. | |
mem_ptr | member method pointer to invoke | |
obj | the object on which to invoke the member method | |
a1 | the first argument to pass to the invoked method |
EventId ns3::Simulator::Schedule | ( | Time const & | time, | |
MEM | mem_ptr, | |||
OBJ | obj | |||
) | [inline, static] |
Schedule an event to expire at the relative time "time" is reached. This can be thought of as scheduling an event for the current simulation time plus the Time passed as a parameter
When the event expires (when it becomes due to be run), the input method will be invoked on the input object.
time | the relative expiration time of the event. | |
mem_ptr | member method pointer to invoke | |
obj | the object on which to invoke the member method |
event | the event to schedule |
EventId ns3::Simulator::ScheduleDestroy | ( | void(*)(U1, U2, U3, U4, U5) | f, | |
T1 | a1, | |||
T2 | a2, | |||
T3 | a3, | |||
T4 | a4, | |||
T5 | a5 | |||
) | [inline, static] |
f | the function to invoke | |
a1 | the first argument to pass to the function to invoke | |
a2 | the second argument to pass to the function to invoke | |
a3 | the third argument to pass to the function to invoke | |
a4 | the fourth argument to pass to the function to invoke | |
a5 | the fifth argument to pass to the function to invoke |
EventId ns3::Simulator::ScheduleDestroy | ( | void(*)(U1, U2, U3, U4) | f, | |
T1 | a1, | |||
T2 | a2, | |||
T3 | a3, | |||
T4 | a4 | |||
) | [inline, static] |
f | the function to invoke | |
a1 | the first argument to pass to the function to invoke | |
a2 | the second argument to pass to the function to invoke | |
a3 | the third argument to pass to the function to invoke | |
a4 | the fourth argument to pass to the function to invoke |
EventId ns3::Simulator::ScheduleDestroy | ( | void(*)(U1, U2, U3) | f, | |
T1 | a1, | |||
T2 | a2, | |||
T3 | a3 | |||
) | [inline, static] |
f | the function to invoke | |
a1 | the first argument to pass to the function to invoke | |
a2 | the second argument to pass to the function to invoke | |
a3 | the third argument to pass to the function to invoke |
EventId ns3::Simulator::ScheduleDestroy | ( | void(*)(U1, U2) | f, | |
T1 | a1, | |||
T2 | a2 | |||
) | [inline, static] |
f | the function to invoke | |
a1 | the first argument to pass to the function to invoke | |
a2 | the second argument to pass to the function to invoke |
EventId ns3::Simulator::ScheduleDestroy | ( | void(*)(U1) | f, | |
T1 | a1 | |||
) | [inline, static] |
f | the function to invoke | |
a1 | the first argument to pass to the function to invoke |
static EventId ns3::Simulator::ScheduleDestroy | ( | void(*)(void) | f | ) | [static] |
f | the function to invoke |
EventId ns3::Simulator::ScheduleDestroy | ( | MEM | mem_ptr, | |
OBJ | obj, | |||
T1 | a1, | |||
T2 | a2, | |||
T3 | a3, | |||
T4 | a4, | |||
T5 | a5 | |||
) | [inline, static] |
mem_ptr | member method pointer to invoke | |
obj | the object on which to invoke the member method | |
a1 | the first argument to pass to the invoked method | |
a2 | the second argument to pass to the invoked method | |
a3 | the third argument to pass to the invoked method | |
a4 | the fourth argument to pass to the invoked method | |
a5 | the fifth argument to pass to the invoked method |
EventId ns3::Simulator::ScheduleDestroy | ( | MEM | mem_ptr, | |
OBJ | obj, | |||
T1 | a1, | |||
T2 | a2, | |||
T3 | a3, | |||
T4 | a4 | |||
) | [inline, static] |
mem_ptr | member method pointer to invoke | |
obj | the object on which to invoke the member method | |
a1 | the first argument to pass to the invoked method | |
a2 | the second argument to pass to the invoked method | |
a3 | the third argument to pass to the invoked method | |
a4 | the fourth argument to pass to the invoked method |
EventId ns3::Simulator::ScheduleDestroy | ( | MEM | mem_ptr, | |
OBJ | obj, | |||
T1 | a1, | |||
T2 | a2, | |||
T3 | a3 | |||
) | [inline, static] |
mem_ptr | member method pointer to invoke | |
obj | the object on which to invoke the member method | |
a1 | the first argument to pass to the invoked method | |
a2 | the second argument to pass to the invoked method | |
a3 | the third argument to pass to the invoked method |
EventId ns3::Simulator::ScheduleDestroy | ( | MEM | mem_ptr, | |
OBJ | obj, | |||
T1 | a1, | |||
T2 | a2 | |||
) | [inline, static] |
mem_ptr | member method pointer to invoke | |
obj | the object on which to invoke the member method | |
a1 | the first argument to pass to the invoked method | |
a2 | the second argument to pass to the invoked method |
EventId ns3::Simulator::ScheduleDestroy | ( | MEM | mem_ptr, | |
OBJ | obj, | |||
T1 | a1 | |||
) | [inline, static] |
mem_ptr | member method pointer to invoke | |
obj | the object on which to invoke the member method | |
a1 | the first argument to pass to the invoked method |
EventId ns3::Simulator::ScheduleDestroy | ( | MEM | mem_ptr, | |
OBJ | obj | |||
) | [inline, static] |
Schedule an event to expire at Destroy time. All events scheduled to expire at "Destroy" time are scheduled FIFO, after all normal events have expired and only when Simulator::Destroy is invoked.
mem_ptr | member method pointer to invoke | |
obj | the object on which to invoke the member method |
event | the event to schedule |
EventId ns3::Simulator::ScheduleNow | ( | void(*)(U1, U2, U3, U4, U5) | f, | |
T1 | a1, | |||
T2 | a2, | |||
T3 | a3, | |||
T4 | a4, | |||
T5 | a5 | |||
) | [inline, static] |
f | the function to invoke | |
a1 | the first argument to pass to the function to invoke | |
a2 | the second argument to pass to the function to invoke | |
a3 | the third argument to pass to the function to invoke | |
a4 | the fourth argument to pass to the function to invoke | |
a5 | the fifth argument to pass to the function to invoke |
EventId ns3::Simulator::ScheduleNow | ( | void(*)(U1, U2, U3, U4) | f, | |
T1 | a1, | |||
T2 | a2, | |||
T3 | a3, | |||
T4 | a4 | |||
) | [inline, static] |
f | the function to invoke | |
a1 | the first argument to pass to the function to invoke | |
a2 | the second argument to pass to the function to invoke | |
a3 | the third argument to pass to the function to invoke | |
a4 | the fourth argument to pass to the function to invoke |
EventId ns3::Simulator::ScheduleNow | ( | void(*)(U1, U2, U3) | f, | |
T1 | a1, | |||
T2 | a2, | |||
T3 | a3 | |||
) | [inline, static] |
f | the function to invoke | |
a1 | the first argument to pass to the function to invoke | |
a2 | the second argument to pass to the function to invoke | |
a3 | the third argument to pass to the function to invoke |
EventId ns3::Simulator::ScheduleNow | ( | void(*)(U1, U2) | f, | |
T1 | a1, | |||
T2 | a2 | |||
) | [inline, static] |
f | the function to invoke | |
a1 | the first argument to pass to the function to invoke | |
a2 | the second argument to pass to the function to invoke |
EventId ns3::Simulator::ScheduleNow | ( | void(*)(U1) | f, | |
T1 | a1 | |||
) | [inline, static] |
f | the function to invoke | |
a1 | the first argument to pass to the function to invoke |
static EventId ns3::Simulator::ScheduleNow | ( | void(*)(void) | f | ) | [static] |
f | the function to invoke |
EventId ns3::Simulator::ScheduleNow | ( | MEM | mem_ptr, | |
OBJ | obj, | |||
T1 | a1, | |||
T2 | a2, | |||
T3 | a3, | |||
T4 | a4, | |||
T5 | a5 | |||
) | [inline, static] |
mem_ptr | member method pointer to invoke | |
obj | the object on which to invoke the member method | |
a1 | the first argument to pass to the invoked method | |
a2 | the second argument to pass to the invoked method | |
a3 | the third argument to pass to the invoked method | |
a4 | the fourth argument to pass to the invoked method | |
a5 | the fifth argument to pass to the invoked method |
EventId ns3::Simulator::ScheduleNow | ( | MEM | mem_ptr, | |
OBJ | obj, | |||
T1 | a1, | |||
T2 | a2, | |||
T3 | a3, | |||
T4 | a4 | |||
) | [inline, static] |
mem_ptr | member method pointer to invoke | |
obj | the object on which to invoke the member method | |
a1 | the first argument to pass to the invoked method | |
a2 | the second argument to pass to the invoked method | |
a3 | the third argument to pass to the invoked method | |
a4 | the fourth argument to pass to the invoked method |
EventId ns3::Simulator::ScheduleNow | ( | MEM | mem_ptr, | |
OBJ | obj, | |||
T1 | a1, | |||
T2 | a2, | |||
T3 | a3 | |||
) | [inline, static] |
mem_ptr | member method pointer to invoke | |
obj | the object on which to invoke the member method | |
a1 | the first argument to pass to the invoked method | |
a2 | the second argument to pass to the invoked method | |
a3 | the third argument to pass to the invoked method |
EventId ns3::Simulator::ScheduleNow | ( | MEM | mem_ptr, | |
OBJ | obj, | |||
T1 | a1, | |||
T2 | a2 | |||
) | [inline, static] |
mem_ptr | member method pointer to invoke | |
obj | the object on which to invoke the member method | |
a1 | the first argument to pass to the invoked method | |
a2 | the second argument to pass to the invoked method |
EventId ns3::Simulator::ScheduleNow | ( | MEM | mem_ptr, | |
OBJ | obj, | |||
T1 | a1 | |||
) | [inline, static] |
mem_ptr | member method pointer to invoke | |
obj | the object on which to invoke the member method | |
a1 | the first argument to pass to the invoked method |
EventId ns3::Simulator::ScheduleNow | ( | MEM | mem_ptr, | |
OBJ | obj | |||
) | [inline, static] |
Schedule an event to expire Now. All events scheduled to to expire "Now" are scheduled FIFO, after all normal events have expired.
mem_ptr | member method pointer to invoke | |
obj | the object on which to invoke the member method |
static void ns3::Simulator::SetImplementation | ( | Ptr< SimulatorImpl > | impl | ) | [static] |
impl | a new simulator implementation |
The simulator implementation can be set when the simulator is not running.
scheduler | a new event scheduler |
static void ns3::Simulator::Stop | ( | Time const & | time | ) | [static] |
Force the Simulator::run method to return to the caller when the expiration time of the next event to be processed is greater than or equal to the stop time. The stop time is relative to the current simulation time.
time | the stop time, relative to the current time. |
static void ns3::Simulator::Stop | ( | void | ) | [static] |
If an event invokes this method, it will be the last event scheduled by the Simulator::run method before returning to the caller.