A simulation event. More...
#include "event-impl.h"
Public Member Functions | |
EventImpl () | |
Default constructor. More... | |
virtual | ~EventImpl ()=0 |
Destructor. More... | |
void | Cancel () |
Marks the event as 'canceled'. More... | |
void | Invoke () |
Called by the simulation engine to notify the event that it is time to execute. More... | |
bool | IsCancelled () |
Public Member Functions inherited from ns3::SimpleRefCount< EventImpl > | |
SimpleRefCount () | |
Default constructor. More... | |
SimpleRefCount (const SimpleRefCount &o[[maybe_unused]]) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o[[maybe_unused]]) |
Assignment operator. More... | |
void | Ref () const |
Increment the reference count. More... | |
void | Unref () const |
Decrement the reference count. More... | |
Protected Member Functions | |
virtual void | Notify ()=0 |
Implementation for Invoke(). More... | |
Private Attributes | |
bool | m_cancel |
Has this event been cancelled. More... | |
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 45 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 57 of file event-impl.cc.
References m_cancel, and NS_LOG_FUNCTION.
void ns3::EventImpl::Invoke | ( | ) |
Called by the simulation engine to notify the event that it is time to execute.
Definition at line 47 of file event-impl.cc.
References m_cancel, Notify(), and NS_LOG_FUNCTION.
Referenced by ns3::EmlsrManager::NotifyMgtFrameReceived(), ns3::DefaultSimulatorImpl::ProcessOneEvent(), ns3::DistributedSimulatorImpl::ProcessOneEvent(), and ns3::NullMessageSimulatorImpl::ProcessOneEvent().
bool ns3::EventImpl::IsCancelled | ( | ) |
Checked by the simulation engine before calling Invoke().
Definition at line 64 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 80 of file event-impl.h.
Referenced by Cancel(), Invoke(), and IsCancelled().