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 &delay);
66 virtual void Run (
void);
Time CalculateGuaranteeTime(uint32_t systemId)
virtual void Remove(const EventId &id)
Remove an event from the event list.
Simulation virtual time values and global simulation resolution.
Smart pointer class similar to boost::intrusive_ptr.
virtual void Destroy()
Execute the events scheduled with ScheduleDestroy().
void HandleArrivingMessagesNonBlocking(void)
Non blocking receive of pending messages.
virtual EventId ScheduleNow(EventImpl *event)
Schedule an event to run at the current virtual time.
Ptr< Scheduler > m_events
~NullMessageSimulatorImpl()
virtual bool IsFinished(void) const
Check if the simulation should finish.
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)
Schedule an event to run at the end of the simulation, after the Stop() time or condition has been re...
virtual uint32_t GetContext(void) const
Get the current simulation context.
void CalculateSafeTime(void)
Calculate the SafeTime.
static NullMessageSimulatorImpl * GetInstance(void)
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.
virtual bool IsExpired(const EventId &id) const
Check if an event has already run or been cancelled.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void CalculateLookAhead(void)
Calculate the look ahead allowable for this MPI task.
virtual void ScheduleWithContext(uint32_t context, Time const &delay, EventImpl *event)
Schedule a future event execution (in a different context).
void HandleArrivingMessagesBlocking(void)
Blocking receive of arriving messages.
virtual Time Now(void) const
Return the current simulation virtual time.
std::list< EventId > DestroyEvents
NullMessageSimulatorImpl()
Simulator implementation using MPI and a Null Message algorithm.
Instantiate subclasses of ns3::Object.
virtual uint32_t GetSystemId(void) const
Get the system id of this simulator.
An identifier for simulation events.
virtual Time GetMaximumSimulationTime(void) const
Get the maximum representable simulation time.
virtual void Stop(void)
Tell the Simulator the calling event should be the last one executed.
uint32_t m_currentContext
virtual void Cancel(const EventId &id)
Set the cancel bit on this event: the event's associated function will not be invoked when it expires...
void ScheduleNullMessageEvent(Ptr< RemoteChannelBundle > bundle)
void NullMessageEventHandler(RemoteChannelBundle *bundle)
virtual EventId Schedule(Time const &delay, EventImpl *event)
Schedule a future event execution (in the same context).
virtual void DoDispose(void)
Destructor implementation.
friend class NullMessageEvent
a unique identifier for an interface.
virtual void SetScheduler(ObjectFactory schedulerFactory)
Set the Scheduler to be used to manage the event list.
virtual Time GetDelayLeft(const EventId &id) const
Get the remaining time until this event will execute.
static TypeId GetTypeId(void)
The SimulatorImpl base class.
Interface between ns-3 and MPI for the Null Message distributed simulation implementation.