|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
28 #ifndef NULLMESSAGE_SIMULATOR_IMPL_H
29 #define NULLMESSAGE_SIMULATOR_IMPL_H
31 #include <ns3/simulator-impl.h>
32 #include <ns3/scheduler.h>
33 #include <ns3/event-impl.h>
42 class NullMessageEvent;
43 class NullMessageMpiInterface;
44 class RemoteChannelBundle;
69 virtual void Stop (
void);
70 virtual void Stop (
Time const &delay);
78 virtual void Run (
void);
DestroyEvents m_destroyEvents
The container of events to run at Destroy()
a unique identifier for an interface.
void ProcessOneEvent(void)
Process the next event on the queue.
virtual bool IsFinished(void) const
Check if the simulation should finish.
Collection of ns-3 channels between local and remote nodes.
virtual EventId ScheduleNow(EventImpl *event)
Schedule an event to run at the current virtual time.
uint32_t m_systemCount
MPI communicator size.
An identifier for simulation events.
static NullMessageSimulatorImpl * g_instance
Singleton instance.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void Destroy()
Execute the events scheduled with ScheduleDestroy().
int m_unscheduledEvents
Number of events that have been inserted but not yet scheduled, not counting the "destroy" events; th...
uint32_t m_currentUid
Unique id of the current event.
static TypeId GetTypeId(void)
Register this type.
std::list< EventId > DestroyEvents
Container type for the events to run at Simulator::Destroy().
virtual void Run(void)
Run the simulation.
~NullMessageSimulatorImpl()
Destructor.
Time GetSafeTime(void)
Get the current SafeTime; the maximum time that events can be processed based on information received...
virtual void Remove(const EventId &id)
Remove an event from the event list.
friend class NullMessageEvent
void RescheduleNullMessageEvent(Ptr< RemoteChannelBundle > bundle)
static NullMessageSimulatorImpl * GetInstance(void)
virtual Time GetMaximumSimulationTime(void) const
Get the maximum representable simulation time.
Smart pointer class similar to boost::intrusive_ptr.
void HandleArrivingMessagesBlocking(void)
Blocking receive of arriving messages.
bool m_stop
Flag calling for the end of the simulation.
uint64_t m_eventCount
The event count.
uint64_t m_currentTs
Timestamp of the current event.
Simulator implementation using MPI and a Null Message algorithm.
Instantiate subclasses of ns3::Object.
void CalculateLookAhead(void)
Calculate the lookahead allowable for this MPI task.
uint32_t m_currentContext
Execution context of the current event.
virtual Time GetDelayLeft(const EventId &id) const
Get the remaining time until this event will execute.
Interface between ns-3 and MPI for the Null Message distributed simulation implementation.
Time CalculateGuaranteeTime(uint32_t systemId)
Simulation virtual time values and global simulation resolution.
virtual void Stop(void)
Tell the Simulator the calling event should be the last one executed.
Time m_safeTime
The time for which it is safe for this task to execute events without danger of out-of-order events.
Ptr< Scheduler > m_events
The event priority queue.
void HandleArrivingMessagesNonBlocking(void)
Non blocking receive of pending messages.
virtual uint32_t GetContext(void) const
Get the current simulation context.
virtual void SetScheduler(ObjectFactory schedulerFactory)
Set the Scheduler to be used to manage the event list.
uint32_t m_uid
Next event unique id.
virtual void ScheduleWithContext(uint32_t context, Time const &delay, EventImpl *event)
Schedule a future event execution (in a different context).
virtual bool IsExpired(const EventId &id) const
Check if an event has already run or been cancelled.
NullMessageSimulatorImpl()
Default constructor.
virtual Time Now(void) const
Return the current simulation virtual time.
The SimulatorImpl base class.
void NullMessageEventHandler(RemoteChannelBundle *bundle)
virtual uint64_t GetEventCount(void) const
Get the number of events executed.
double m_schedulerTune
Null Message performance tuning parameter.
virtual uint32_t GetSystemId(void) const
Get the system id of this simulator.
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...
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 EventId Schedule(Time const &delay, EventImpl *event)
Schedule a future event execution (in the same context).
virtual void DoDispose(void)
Destructor implementation.
void ScheduleNullMessageEvent(Ptr< RemoteChannelBundle > bundle)
void CalculateSafeTime(void)
Calculate the SafeTime.
Singleton for managing the RemoteChannelBundles for each process.