|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
26 #ifndef NS3_DISTRIBUTED_SIMULATOR_IMPL_H
27 #define NS3_DISTRIBUTED_SIMULATOR_IMPL_H
29 #include "ns3/simulator-impl.h"
30 #include "ns3/scheduler.h"
31 #include "ns3/event-impl.h"
61 LbtsMessage (uint32_t rxc, uint32_t txc, uint32_t
id,
bool isFinished,
const Time& t)
124 virtual void Stop (
void);
125 virtual void Stop (
Time const &delay);
133 virtual void Run (
void);
187 uint64_t
NextTs (
void)
const;
a unique identifier for an interface.
uint32_t m_currentUid
Unique id of the current event.
Time m_grantedTime
End of current window.
virtual void ScheduleWithContext(uint32_t context, Time const &delay, EventImpl *event)
Schedule a future event execution (in a different context).
An identifier for simulation events.
std::list< EventId > DestroyEvents
Container type for the events to run at Simulator::Destroy().
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...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint64_t m_eventCount
The event count.
Distributed simulator implementation using lookahead.
virtual EventId Schedule(Time const &delay, EventImpl *event)
Schedule a future event execution (in the same context).
~DistributedSimulatorImpl()
Destructor.
virtual Time GetMaximumSimulationTime(void) const
Get the maximum representable simulation time.
DistributedSimulatorImpl()
Default constructor.
void ProcessOneEvent(void)
Process the next event.
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 uint32_t GetContext(void) const
Get the current simulation context.
bool IsLocalFinished(void) const
Check if this rank is finished.
virtual uint64_t GetEventCount(void) const
Get the number of events executed.
virtual EventId ScheduleNow(EventImpl *event)
Schedule an event to run at the current virtual time.
virtual Time GetDelayLeft(const EventId &id) const
Get the remaining time until this event will execute.
Time m_smallestTime
Earliest next event timestamp.
virtual void DoDispose(void)
Destructor implementation.
Time Next(void) const
Get the time of the next event, as returned by NextTs().
virtual bool IsFinished(void) const
Check if the simulation should finish.
Structure used for all-reduce LBTS computation.
Smart pointer class similar to boost::intrusive_ptr.
virtual void Destroy()
Execute the events scheduled with ScheduleDestroy().
virtual bool IsExpired(const EventId &id) const
Check if an event has already run or been cancelled.
bool m_stop
Flag calling for the end of the simulation.
uint32_t m_currentContext
Execution context of the current event.
bool m_isFinished
true when this rank has no more events.
Instantiate subclasses of ns3::Object.
virtual uint32_t GetSystemId(void) const
Get the system id of this simulator.
int m_unscheduledEvents
Number of events that have been inserted but not yet scheduled, not counting the "destroy" events; th...
virtual void Remove(const EventId &id)
Remove an event from the event list.
Simulation virtual time values and global simulation resolution.
DestroyEvents m_destroyEvents
The container of events to run at Destroy()
uint32_t m_txCount
Count of transmitted messages.
uint32_t m_myId
System Id of the rank sending this LBTS.
static TypeId GetTypeId(void)
Register this type.
virtual void BoundLookAhead(const Time lookAhead)
Add additional bound to lookahead constraints.
uint64_t m_currentTs
Timestamp of the current event.
bool m_globalFinished
Are all parallel instances completed.
The SimulatorImpl base class.
uint32_t m_uid
Next event unique id.
LbtsMessage * m_pLBTS
Container for Lbts messages, one per rank.
LbtsMessage(uint32_t rxc, uint32_t txc, uint32_t id, bool isFinished, const Time &t)
void CalculateLookAhead(void)
Calculate lookahead constraint based on network latency.
static Time m_lookAhead
Current window size.
uint64_t NextTs(void) const
Get the timestep of the next event.
virtual void Stop(void)
Tell the Simulator the calling event should be the last one executed.
uint32_t m_systemCount
MPI communicator size.
virtual void SetScheduler(ObjectFactory schedulerFactory)
Set the Scheduler to be used to manage the event list.
virtual Time Now(void) const
Return the current simulation virtual time.
uint32_t m_rxCount
Count of received messages.
virtual void Run(void)
Run the simulation.
Ptr< Scheduler > m_events
The event priority queue.