239 template <
typename FUNC,
240 std::enable_if_t<!std::is_convertible_v<FUNC, Ptr<EventImpl>>,
int> = 0,
241 std::enable_if_t<!std::is_function_v<std::remove_pointer_t<FUNC>>,
int> = 0,
260 template <
typename... Us,
typename... Ts>
285 template <
typename FUNC,
286 std::enable_if_t<!std::is_convertible_v<FUNC, Ptr<EventImpl>>,
int> = 0,
287 std::enable_if_t<!std::is_function_v<std::remove_pointer_t<FUNC>>,
int> = 0,
303 template <
typename... Us,
typename... Ts>
328 template <
typename FUNC,
329 std::enable_if_t<!std::is_convertible_v<FUNC, Ptr<EventImpl>>,
int> = 0,
330 std::enable_if_t<!std::is_function_v<std::remove_pointer_t<FUNC>>,
int> = 0,
345 template <
typename... Us,
typename... Ts>
370 template <
typename FUNC,
371 std::enable_if_t<!std::is_convertible_v<FUNC, Ptr<EventImpl>>,
int> = 0,
372 std::enable_if_t<!std::is_function_v<std::remove_pointer_t<FUNC>>,
int> = 0,
388 template <
typename... Us,
typename... Ts>
566 template <
typename FUNC,
567 std::enable_if_t<!std::is_convertible_v<FUNC, Ptr<EventImpl>>,
int>,
568 std::enable_if_t<!std::is_function_v<std::remove_pointer_t<FUNC>>,
int>,
576 template <
typename... Us,
typename... Ts>
583 template <
typename FUNC,
584 std::enable_if_t<!std::is_convertible_v<FUNC, Ptr<EventImpl>>,
int>,
585 std::enable_if_t<!std::is_function_v<std::remove_pointer_t<FUNC>>,
int>,
593 template <
typename... Us,
typename... Ts>
600 template <
typename FUNC,
601 std::enable_if_t<!std::is_convertible_v<FUNC, Ptr<EventImpl>>,
int>,
602 std::enable_if_t<!std::is_function_v<std::remove_pointer_t<FUNC>>,
int>,
610 template <
typename... Us,
typename... Ts>
617 template <
typename FUNC,
618 std::enable_if_t<!std::is_convertible_v<FUNC, Ptr<EventImpl>>,
int>,
619 std::enable_if_t<!std::is_function_v<std::remove_pointer_t<FUNC>>,
int>,
627 template <
typename... Us,
typename... Ts>
double f(double x, void *params)
An identifier for simulation events.
Instantiate subclasses of ns3::Object.
Smart pointer class similar to boost::intrusive_ptr.
Control the scheduling of simulation events.
static EventId DoScheduleDestroy(EventImpl *event)
Implementation of the various ScheduleDestroy methods.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static Ptr< SimulatorImpl > GetImplementation()
Get the SimulatorImpl singleton.
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...
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
static void ScheduleWithContext(uint32_t context, const Time &delay, FUNC f, Ts &&... args)
Schedule an event with the given context.
static EventId m_stopEvent
Stop event (if present)
static bool IsFinished()
Check if the simulation should finish.
static uint32_t GetSystemId()
Get the system id of this simulator.
static Time Now()
Return the current simulation virtual time.
static void Run()
Run the simulation.
static bool IsExpired(const EventId &id)
Check if an event has already run or been cancelled.
static EventId ScheduleDestroy(FUNC f, Ts &&... args)
Schedule an event to run at the end of the simulation, when Simulator::Destroy() is called.
static void SetScheduler(ObjectFactory schedulerFactory)
Set the scheduler type with an ObjectFactory.
static EventId DoScheduleNow(EventImpl *event)
Implementation of the various ScheduleNow methods.
static uint64_t GetEventCount()
Get the number of events executed.
static EventId ScheduleNow(FUNC f, Ts &&... args)
Schedule an event to expire Now.
@ NO_CONTEXT
Flag for events not associated with any particular context.
static EventId DoSchedule(const Time &delay, EventImpl *event)
Implementation of the various Schedule methods.
static Time GetMaximumSimulationTime()
Get the maximum representable simulation time.
static void Remove(const EventId &id)
Remove an event from the event list.
static EventId GetStopEvent()
Returns the Stop Event, or an invalid event if the simulation does not have a scheduled stop time.
static void Stop()
Tell the Simulator the calling event should be the last one executed.
static void SetImplementation(Ptr< SimulatorImpl > impl)
static uint32_t GetContext()
Get the current simulation context.
static Time GetDelayLeft(const EventId &id)
Get the remaining time until this event will execute.
Simulation virtual time values and global simulation resolution.
ns3::EventId declarations.
ns3::EventImpl declarations.
EventImpl * MakeEvent(void(*f)())
Make an EventImpl from a function pointer taking varying numbers of arguments.
Time Now()
create an ns3::Time instance which contains the current simulation time.
ns3::MakeEvent function declarations and template implementation.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Declaration of classes ns3::Time and ns3::TimeWithUnit, and the TimeValue implementation classes.
ns3::ObjectFactory class declaration.