A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ns3::EventId Class Reference

an identifier for simulation events. More...

#include <event-id.h>

Public Member Functions

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

Private Attributes

uint32_t m_context
 
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.

Member Function Documentation

void ns3::EventId::Cancel ( void  )

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

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

References ns3::Simulator::Cancel(), and NS_LOG_FUNCTION.

Referenced by ns3::UanTransducerHd::Clear(), ns3::UanMacCw::Clear(), ns3::UanMacRc::Clear(), ns3::LteRlcTm::DoDispose(), ns3::LteRlcUm::DoDispose(), ns3::LteRlcAm::DoDispose(), ns3::dot11s::PeerLink::DoDispose(), ns3::ApWifiMac::DoDispose(), ns3::Application::DoDispose(), ns3::MeshWifiInterfaceMac::DoDispose(), ns3::MacLow::DoDispose(), ns3::TcpSocketBase::DoForwardUp(), ns3::ApWifiMac::DoInitialize(), ns3::MeshWifiInterfaceMac::DoInitialize(), ns3::LteRlcTm::DoNotifyTxOpportunity(), ns3::LteRlcUm::DoNotifyTxOpportunity(), ns3::LteRlcAm::DoNotifyTxOpportunity(), ns3::DcfManager::DoRestartAccessTimeoutIfNeeded(), SimulatorEventsTestCase::DoRun(), ns3::RandomDirection2dMobilityModel::DoSetPosition(), ns3::LteRlcTm::DoTransmitPdcpPdu(), ns3::LteRlcUm::DoTransmitPdcpPdu(), ns3::TcpWestwood::EstimateRtt(), ns3::ArpCache::Flush(), ns3::WifiRadioEnergyModelPhyListener::NotifyMaybeCcaBusyStart(), ns3::WifiRadioEnergyModelPhyListener::NotifyRxStart(), ns3::WifiRadioEnergyModelPhyListener::NotifySensingStart(), ns3::MacLow::NotifySensingStartNow(), ns3::WifiRadioEnergyModelPhyListener::NotifySwitchingStart(), ns3::DcfManager::NotifySwitchingStartNow(), ns3::MacLow::NotifySwitchingStartNow(), ns3::WifiRadioEnergyModelPhyListener::NotifyTxStart(), ns3::TcpSocketBase::ProcessSynRcvd(), ns3::TcpSocketBase::ProcessSynSent(), ns3::StaWifiMac::Receive(), ns3::MacLow::ReceiveOk(), ns3::LteSpectrumPhy::Reset(), ns3::TcpSocketBase::SendEmptyPacket(), ns3::YansWifiPhy::SendPacket(), ns3::dot11s::PeerLink::SetBeaconInformation(), ns3::YansWifiPhy::SetChannelNumber(), ns3::V4Ping::StopApplication(), ns3::BasicEnergySource::UpdateEnergySource(), ns3::RvBatteryModel::UpdateEnergySource(), and ns3::LiIonEnergySource::UpdateEnergySource().

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

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