A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::EventImpl Class Referenceabstract

a simulation event More...

#include <event-impl.h>

+ Inheritance diagram for ns3::EventImpl:
+ Collaboration diagram for ns3::EventImpl:

Public Member Functions

 EventImpl ()
 
virtual ~EventImpl ()=0
 
void Cancel (void)
 Marks the event as 'canceled'. More...
 
void Invoke (void)
 Called by the simulation engine to notify the event that it has expired. More...
 
bool IsCancelled (void)
 
- Public Member Functions inherited from ns3::SimpleRefCount< EventImpl >
 SimpleRefCount ()
 Constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 

Protected Member Functions

virtual void Notify (void)=0
 

Private Attributes

bool m_cancel
 

Additional Inherited Members

- Static Public Member Functions inherited from ns3::SimpleRefCount< EventImpl >
static void Cleanup (void)
 Noop. More...
 

Detailed Description

a simulation event

Each subclass of this base class represents a simulation event. The EventImpl::Invoke method will be invoked by the simulation engine when the time associated to this event expires. This class is obviously (there are Ref and Unref methods) reference-counted and most subclasses are usually created by one of the many Simulator::Schedule methods.

Definition at line 39 of file event-impl.h.

Constructor & Destructor Documentation

ns3::EventImpl::EventImpl ( )

Definition at line 33 of file event-impl.cc.

References NS_LOG_FUNCTION.

ns3::EventImpl::~EventImpl ( )
pure virtual

Definition at line 28 of file event-impl.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

void ns3::EventImpl::Cancel ( void  )

Marks the event as 'canceled'.

The event will not be removed from the event list but the simulation engine will check its canceled status before calling Invoke.

Definition at line 50 of file event-impl.cc.

References m_cancel, and NS_LOG_FUNCTION.

void ns3::EventImpl::Invoke ( void  )

Called by the simulation engine to notify the event that it has expired.

Definition at line 40 of file event-impl.cc.

References m_cancel, Notify(), and NS_LOG_FUNCTION.

Referenced by ns3::DefaultSimulatorImpl::ProcessOneEvent(), ns3::NullMessageSimulatorImpl::ProcessOneEvent(), and ns3::DistributedSimulatorImpl::ProcessOneEvent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::EventImpl::IsCancelled ( void  )
Returns
true if the event has been canceled.

Invoked by the simulation engine before calling Invoke.

Definition at line 57 of file event-impl.cc.

References m_cancel, and NS_LOG_FUNCTION.

Referenced by ns3::DefaultSimulatorImpl::IsExpired(), ns3::NullMessageSimulatorImpl::IsExpired(), ns3::RealtimeSimulatorImpl::IsExpired(), and ns3::DistributedSimulatorImpl::IsExpired().

+ Here is the caller graph for this function:

virtual void ns3::EventImpl::Notify ( void  )
protectedpure virtual

Referenced by Invoke().

+ Here is the caller graph for this function:

Member Data Documentation

bool ns3::EventImpl::m_cancel
private

Definition at line 65 of file event-impl.h.

Referenced by Cancel(), Invoke(), and IsCancelled().


The documentation for this class was generated from the following files: