Public Member Functions | Friends

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 (const Ptr< EventImpl > &impl, uint64_t ts, uint32_t context, uint32_t uid)
void Cancel (void)
bool IsExpired (void) const
bool IsRunning (void) const
EventImplPeekEventImpl (void) const
uint64_t GetTs (void) const
uint32_t GetContext (void) const
uint32_t GetUid (void) const

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.


Member Function Documentation

void ns3::EventId::Cancel ( void   ) 

This method is syntactic sugar for the ns3::Simulator::cancel method.

bool ns3::EventId::IsExpired ( void   )  const

This method is syntactic sugar for the ns3::Simulator::isExpired method.

Returns:
true if the event has expired, false otherwise.
bool ns3::EventId::IsRunning ( void   )  const

This method is syntactic sugar for the ns3::Simulator::isExpired method.

Returns:
true if the event has not expired, false otherwise.

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