20 #include "ns3/core-config.h"
49 "The object class to use as the simulator implementation",
51 MakeStringChecker ());
54 "The object class to use as the scheduler implementation",
56 MakeTypeIdChecker ());
104 (*pimpl)->SetScheduler (factory);
137 (*pimpl)->Destroy ();
326 NS_FATAL_ERROR (
"It is not possible to set the implementation after calling any Simulator:: function. Call Simulator::SetImplementation earlier or after Simulator::Destroy.");
334 impl->SetScheduler (factory);
static Time GetDelayLeft(const EventId &id)
keep track of time values and allow control of global simulation resolution
virtual void ScheduleWithContext(uint32_t context, Time const &time, EventImpl *event)=0
smart pointer class similar to boost::intrusive_ptr
#define NS_LOG_FUNCTION(parameters)
void LogSetNodePrinter(LogNodePrinter printer)
std::string Get(void) const
static void SetImplementation(Ptr< SimulatorImpl > impl)
virtual bool IsExpired(const EventId &ev) const =0
This method has O(1) complexity.
hold variables of type string
static EventId DoScheduleDestroy(EventImpl *event)
static Ptr< SimulatorImpl > GetImplementation(void)
static uint32_t GetSystemId(void)
virtual Time Now(void) const =0
Return the "current simulation time".
static uint32_t GetContext(void)
static void Run(void)
Run the simulation until one of:
static EventId DoSchedule(Time const &time, EventImpl *event)
virtual EventId ScheduleNow(EventImpl *event)=0
void SetTypeId(TypeId tid)
T * GetPointer(const Ptr< T > &p)
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...
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
GlobalValue g_simTypeImpl
void LogSetTimePrinter(LogTimePrinter printer)
virtual void SetScheduler(ObjectFactory schedulerFactory)=0
static EventId Schedule(Time const &time, MEM mem_ptr, OBJ obj)
Schedule an event to expire at the relative time "time" is reached.
hold a so-called 'global value'.
virtual void Run(void)=0
Run the simulation until one of:
#define NS_FATAL_ERROR(msg)
fatal error handling
virtual Time GetMaximumSimulationTime(void) const =0
virtual bool IsFinished(void) const =0
If there are no more events lefts to be scheduled, or if simulation time has already reached the "sto...
double GetSeconds(void) const
static void TimePrinter(std::ostream &os)
GlobalValue g_schedTypeImpl
Ptr< Object > Create(void) const
virtual Time GetDelayLeft(const EventId &id) const =0
hold objects of type ns3::TypeId
static void ScheduleWithContext(uint32_t context, Time const &time, MEM mem_ptr, OBJ obj)
Schedule an event with the given context.
virtual EventId ScheduleDestroy(EventImpl *event)=0
#define NS_LOG_LOGIC(msg)
static void Destroy(void)
Every event scheduled by the Simulator::insertAtDestroy method is invoked.
static void Remove(const EventId &id)
Remove an event from the event list.
virtual void Cancel(const EventId &ev)=0
Set the cancel bit on this event: the event's associated function will not be invoked when it expires...
static bool IsExpired(const EventId &id)
This method has O(1) complexity.
static EventId ScheduleNow(MEM mem_ptr, OBJ obj)
Schedule an event to expire Now.
NS_LOG_COMPONENT_DEFINE("Simulator")
static void SetScheduler(ObjectFactory schedulerFactory)
static Time Now(void)
Return the "current simulation time".
static SimulatorImpl ** PeekImpl(void)
static SimulatorImpl * GetImpl(void)
virtual EventId Schedule(Time const &time, EventImpl *event)=0
instantiate subclasses of ns3::Object.
static EventId DoScheduleNow(EventImpl *event)
virtual void Remove(const EventId &ev)=0
Remove an event from the event list.
an identifier for simulation events.
static void Stop(void)
If an event invokes this method, it will be the last event scheduled by the Simulator::run method bef...
Time Now(void)
create an ns3::Time instance which contains the current simulation time.
virtual void Stop(void)=0
If an event invokes this method, it will be the last event scheduled by the Simulator::Run method bef...
static bool IsFinished(void)
If there are no more events lefts to be scheduled, or if simulation time has already reached the "sto...
EventImpl * MakeEvent(void(*f)(void))
static EventId ScheduleDestroy(MEM mem_ptr, OBJ obj)
Schedule an event to expire at Destroy time.
virtual uint32_t GetSystemId() const =0
static void ClearMarkedTimes()
Remove all MarkedTimes.
virtual uint32_t GetContext(void) const =0
static void NodePrinter(std::ostream &os)
static Time GetMaximumSimulationTime(void)
Doxygen introspection did not find any typical Config paths.
void GetValue(AttributeValue &value) const
static TypeId GetTypeId(void)