22 #ifndef NULLMESSAGE_SIMULATOR_IMPL_H
23 #define NULLMESSAGE_SIMULATOR_IMPL_H
25 #include <ns3/simulator-impl.h>
26 #include <ns3/scheduler.h>
27 #include <ns3/event-impl.h>
36 class NullMessageEvent;
37 class NullMessageMpiInterface;
38 class RemoteChannelBundle;
57 virtual void Stop (
void);
58 virtual void Stop (
Time const &time);
66 virtual void Run (
void);
Time CalculateGuaranteeTime(uint32_t systemId)
virtual Time GetMaximumSimulationTime(void) const
keep track of time values and allow control of global simulation resolution
smart pointer class similar to boost::intrusive_ptr
virtual void Cancel(const EventId &ev)
Set the cancel bit on this event: the event's associated function will not be invoked when it expires...
virtual void Destroy()
This method is typically invoked at the end of a simulation to avoid false-positive reports by a leak...
void HandleArrivingMessagesNonBlocking(void)
Non blocking receive of pending messages.
virtual EventId ScheduleNow(EventImpl *event)
Ptr< Scheduler > m_events
~NullMessageSimulatorImpl()
virtual EventId Schedule(Time const &time, EventImpl *event)
void ProcessOneEvent(void)
Process the next event on the queue.
void RescheduleNullMessageEvent(Ptr< RemoteChannelBundle > bundle)
Collection of NS3 channels between local and remote nodes.
virtual EventId ScheduleDestroy(EventImpl *event)
void CalculateSafeTime(void)
Calculate the SafeTime.
static NullMessageSimulatorImpl * GetInstance(void)
virtual uint32_t GetSystemId(void) const
virtual bool IsFinished(void) const
If there are no more events lefts to be scheduled, or if simulation time has already reached the "sto...
virtual void RunOneEvent(void)
DestroyEvents m_destroyEvents
Time GetSafeTime(void)
Get the current SafeTime; the maximum time that events can be processed based on information received...
static NullMessageSimulatorImpl * g_instance
virtual void Run(void)
Run the simulation until one of:
void CalculateLookAhead(void)
Calculate the look ahead allowable for this MPI task.
virtual uint32_t GetContext(void) const
void HandleArrivingMessagesBlocking(void)
Blocking receive of arriving messages.
virtual Time GetDelayLeft(const EventId &id) const
std::list< EventId > DestroyEvents
NullMessageSimulatorImpl()
virtual void ScheduleWithContext(uint32_t context, Time const &time, EventImpl *event)
Simulator implementation using MPI and a Null Message algorithm.
instantiate subclasses of ns3::Object.
an identifier for simulation events.
virtual void Stop(void)
If an event invokes this method, it will be the last event scheduled by the Simulator::Run method bef...
uint32_t m_currentContext
virtual Time Now(void) const
Return the "current simulation time".
void ScheduleNullMessageEvent(Ptr< RemoteChannelBundle > bundle)
void NullMessageEventHandler(RemoteChannelBundle *bundle)
virtual bool IsExpired(const EventId &ev) const
This method has O(1) complexity.
virtual void Remove(const EventId &ev)
Remove an event from the event list.
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
friend class NullMessageEvent
a unique identifier for an interface.
virtual void SetScheduler(ObjectFactory schedulerFactory)
static TypeId GetTypeId(void)
Doxygen introspection did not find any typical Config paths.
Interface between ns-3 and MPI for the Null Message distributed simulation implementation.