ns3::EventId Class Reference
[Simulator]

an identifier for simulation events. More...

#include <event-id.h>

Collaboration diagram for ns3::EventId:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 EventId ()
 EventId (const Ptr< EventImpl > &impl, uint64_t ts, uint32_t uid)
void Cancel (void)
bool IsExpired (void) const
bool IsRunning (void) const
EventImplPeekEventImpl (void) const
uint64_t GetTs (void) const
uint32_t GetUid (void) const

Private Attributes

Ptr< EventImplm_eventImpl
uint64_t m_ts
uint32_t m_uid

Friends

bool operator== (const EventId &a, const EventId &b)

Detailed Description

an identifier for simulation events.

Each EventId identifies a unique event scheduled with one of the many Simulator::Schedule methods. This EventId can be used to Cancel or Remove events after they are scheduled with Simulator::Cancel or Simulator::Remove.

The important thing to remember about this class is that every variable of this type is _always_ in a valid state, even when it has not been assigned an EventId coming from a Schedule method: calling Cancel, IsRunning, IsExpired or passing around instances of this object will not result in crashes or memory leaks.

Definition at line 46 of file event-id.h.


Constructor & Destructor Documentation

ns3::EventId::EventId (  ) 

Definition at line 26 of file event-id.cc.

ns3::EventId::EventId ( const Ptr< EventImpl > &  impl,
uint64_t  ts,
uint32_t  uid 
)

Definition at line 32 of file event-id.cc.


Member Function Documentation

void ns3::EventId::Cancel ( void   ) 
uint64_t ns3::EventId::GetTs ( void   )  const
uint32_t ns3::EventId::GetUid ( void   )  const

Definition at line 63 of file event-id.cc.

References m_uid.

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

bool ns3::EventId::IsExpired ( void   )  const
bool ns3::EventId::IsRunning ( void   )  const
EventImpl * ns3::EventId::PeekEventImpl ( void   )  const

Friends And Related Function Documentation

bool operator== ( const EventId a,
const EventId b 
) [friend]

Member Data Documentation

Definition at line 78 of file event-id.h.

Referenced by PeekEventImpl().

uint64_t ns3::EventId::m_ts [private]

Definition at line 79 of file event-id.h.

Referenced by GetTs().

uint32_t ns3::EventId::m_uid [private]

Definition at line 80 of file event-id.h.

Referenced by GetUid().


The documentation for this class was generated from the following files:
Generated on Thu Dec 3 14:12:13 2009 for NS-3 by  doxygen 1.6.3