A simulation event. More...
#include "event-impl.h"
Public Member Functions | |
EventImpl () | |
Default constructor. | |
virtual | ~EventImpl ()=0 |
Destructor. | |
void | Cancel () |
Marks the event as 'canceled'. | |
void | Invoke () |
Called by the simulation engine to notify the event that it is time to execute. | |
bool | IsCancelled () |
Public Member Functions inherited from ns3::SimpleRefCount< EventImpl > | |
SimpleRefCount () | |
Default constructor. | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. | |
void | Ref () const |
Increment the reference count. | |
void | Unref () const |
Decrement the reference count. | |
Protected Member Functions | |
virtual void | Notify ()=0 |
Implementation for Invoke(). | |
Private Attributes | |
bool | m_cancel |
Has this event been cancelled. | |
A simulation event.
Each subclass of this base class represents a simulation event. The Invoke() method will be called by the simulation engine when it reaches the time associated to this event. Most subclasses are usually created by one of the many Simulator::Schedule methods.
Definition at line 34 of file event-impl.h.
ns3::EventImpl::EventImpl | ( | ) |
|
pure virtual |
void ns3::EventImpl::Cancel | ( | ) |
Marks the event as 'canceled'.
The event is not removed from the event list but the simulation engine will check its canceled status before calling Invoke().
Definition at line 46 of file event-impl.cc.
References m_cancel, and NS_LOG_FUNCTION.
Referenced by ns3::DefaultSimulatorImpl::Remove(), ns3::DistributedSimulatorImpl::Remove(), and ns3::NullMessageSimulatorImpl::Remove().
void ns3::EventImpl::Invoke | ( | ) |
Called by the simulation engine to notify the event that it is time to execute.
Definition at line 36 of file event-impl.cc.
References m_cancel, Notify(), and NS_LOG_FUNCTION.
Referenced by ns3::EmlsrManager::NotifyMgtFrameReceived(), ns3::DefaultSimulatorImpl::ProcessOneEvent(), ns3::DistributedSimulatorImpl::ProcessOneEvent(), ns3::NullMessageSimulatorImpl::ProcessOneEvent(), and ns3::RealtimeSimulatorImpl::ProcessOneEvent().
bool ns3::EventImpl::IsCancelled | ( | ) |
Checked by the simulation engine before calling Invoke().
Definition at line 53 of file event-impl.cc.
References m_cancel, and NS_LOG_FUNCTION.
|
protectedpure virtual |
Implementation for Invoke().
This typically calls a method or function pointer with the arguments bound by a call to one of the MakeEvent() functions.
Referenced by Invoke().
|
private |
Has this event been cancelled.
Definition at line 69 of file event-impl.h.
Referenced by Cancel(), Invoke(), and IsCancelled().