|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
146 static void Run (
void);
156 static void Stop (
void);
167 static void Stop (
const Time &delay);
229 template <
typename FUNC,
230 typename std::enable_if<!std::is_convertible<FUNC, Ptr<EventImpl>>::value,
int>::type = 0,
231 typename std::enable_if<!std::is_function<typename std::remove_pointer<FUNC>::type>::value,
int>::type = 0,
250 template <
typename... Us,
typename... Ts>
275 template <
typename FUNC,
276 typename std::enable_if<!std::is_convertible<FUNC, Ptr<EventImpl>>::value,
int>::type = 0,
277 typename std::enable_if<!std::is_function<typename std::remove_pointer<FUNC>::type>::value,
int>::type = 0,
293 template <
typename... Us,
typename... Ts>
315 template <
typename FUNC,
316 typename std::enable_if<!std::is_convertible<FUNC, Ptr<EventImpl>>::value,
int>::type = 0,
317 typename std::enable_if<!std::is_function<typename std::remove_pointer<FUNC>::type>::value,
int>::type = 0,
332 template <
typename... Us,
typename... Ts>
356 template <
typename FUNC,
357 typename std::enable_if<!std::is_convertible<FUNC, Ptr<EventImpl>>::value,
int>::type = 0,
358 typename std::enable_if<!std::is_function<typename std::remove_pointer<FUNC>::type>::value,
int>::type = 0,
374 template <
typename... Us,
typename... Ts>
553 template <
typename FUNC,
554 typename std::enable_if<!std::is_convertible<FUNC, Ptr<EventImpl>>::value,
int>::type,
555 typename std::enable_if<!std::is_function<typename std::remove_pointer<FUNC>::type>::value,
int>::type,
562 template <
typename... Us,
typename... Ts>
568 template <
typename FUNC,
569 typename std::enable_if<!std::is_convertible<FUNC, Ptr<EventImpl>>::value,
int>::type,
570 typename std::enable_if<!std::is_function<typename std::remove_pointer<FUNC>::type>::value,
int>::type,
577 template <
typename... Us,
typename... Ts>
583 template <
typename FUNC,
584 typename std::enable_if<!std::is_convertible<FUNC, Ptr<EventImpl>>::value,
int>::type,
585 typename std::enable_if<!std::is_function<typename std::remove_pointer<FUNC>::type>::value,
int>::type,
593 template <
typename... Us,
typename... Ts>
601 template <
typename FUNC,
602 typename std::enable_if<!std::is_convertible<FUNC, Ptr<EventImpl>>::value,
int>::type,
603 typename std::enable_if<!std::is_function<typename std::remove_pointer<FUNC>::type>::value,
int>::type,
611 template <
typename... Us,
typename... Ts>
EventImpl * MakeEvent(void(*f)(void))
Make an EventImpl from a function pointer taking varying numbers of arguments.
static bool IsExpired(const EventId &id)
Check if an event has already run or been cancelled.
ns3::EventId declarations.
static EventId DoScheduleDestroy(EventImpl *event)
Implementation of the various ScheduleDestroy methods.
static uint32_t GetSystemId(void)
Get the system id of this simulator.
static void ScheduleWithContext(uint32_t context, Time const &delay, FUNC f, Ts &&... args)
Schedule an event with the given context.
static EventId ScheduleDestroy(FUNC f, Ts &&... args)
Schedule an event to run at the end of the simulation, when Simulator::Destroy() is called.
An identifier for simulation events.
static Time Now(void)
Return the current simulation virtual time.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::MakeEvent function declarations and template implementation.
static Ptr< SimulatorImpl > GetImplementation(void)
Get the SimulatorImpl singleton.
static Time GetDelayLeft(const EventId &id)
Get the remaining time until this event will execute.
static EventId Schedule(Time const &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static void Remove(const EventId &id)
Remove an event from the event list.
Smart pointer class similar to boost::intrusive_ptr.
static void Stop(void)
Tell the Simulator the calling event should be the last one executed.
Time Now(void)
create an ns3::Time instance which contains the current simulation time.
static void Cancel(const EventId &id)
Set the cancel bit on this event: the event's associated function will not be invoked when it expires...
Instantiate subclasses of ns3::Object.
ns3::EventImpl declarations.
static void SetImplementation(Ptr< SimulatorImpl > impl)
Simulation virtual time values and global simulation resolution.
Simulator()
Default constructor.
static EventId DoScheduleNow(EventImpl *event)
Implementation of the various ScheduleNow methods.
static void SetScheduler(ObjectFactory schedulerFactory)
Set the scheduler type with an ObjectFactory.
static Time GetMaximumSimulationTime(void)
Get the maximum representable simulation time.
ns3::ObjectFactory class declaration.
static void Run(void)
Run the simulation.
Control the scheduling of simulation events.
static void Destroy(void)
Execute the events scheduled with ScheduleDestroy().
static EventId DoSchedule(Time const &delay, EventImpl *event)
Implementation of the various Schedule methods.
double f(double x, void *params)
static uint64_t GetEventCount(void)
Get the number of events executed.
static bool IsFinished(void)
Check if the simulation should finish.
Declaration of classes ns3::Time and ns3::TimeWithUnit, and the TimeValue implementation classes.
@ NO_CONTEXT
Flag for events not associated with any particular context.
static uint32_t GetContext(void)
Get the current simulation context.
static EventId ScheduleNow(FUNC f, Ts &&... args)
Schedule an event to expire Now.