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 |
EventImpl * | PeekEventImpl (void) const |
Private Attributes | |
uint32_t | m_context |
Ptr< EventImpl > | m_eventImpl |
uint64_t | m_ts |
uint32_t | m_uid |
Friends | |
bool | operator== (const EventId &a, const EventId &b) |
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.
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 |
This method is syntactic sugar for the ns3::Simulator::isExpired method.
Definition at line 53 of file event-id.cc.
References ns3::Simulator::IsExpired(), and NS_LOG_FUNCTION.
Referenced by ns3::dsdv::RoutingTable::DeleteIpv4Event(), ns3::DcfManager::DoRestartAccessTimeoutIfNeeded(), SimulatorEventsTestCase::DoRun(), ns3::Timer::IsExpired(), IsRunning(), ns3::MacLow::ReceiveError(), ns3::MacLow::ReceiveOk(), ns3::Ping6::Send(), ns3::TcpSocketBase::SendDataPacket(), and ns3::TcpSocketBase::SendEmptyPacket().
bool ns3::EventId::IsRunning | ( | void | ) | const |
This method is syntactic sugar for the ns3::Simulator::isExpired method.
Definition at line 59 of file event-id.cc.
References IsExpired(), and NS_LOG_FUNCTION.
Referenced by ns3::dsdv::RoutingTable::AnyRunningEvent(), ns3::dsdv::RoutingTable::DeleteIpv4Event(), ns3::ArpCache::DoDispose(), ns3::MeshWifiInterfaceMac::DoInitialize(), ns3::LteRlcAm::DoNotifyTxOpportunity(), ns3::DcfManager::DoRestartAccessTimeoutIfNeeded(), ns3::UanMacCw::Enqueue(), ns3::UanMacRc::Enqueue(), ns3::ArpCache::Flush(), ns3::MeshWifiInterfaceMac::GetBeaconGeneration(), ns3::Timer::IsRunning(), ns3::MacLow::NotifySensingStartNow(), ns3::DcfManager::NotifySwitchingStartNow(), ns3::MacLow::NotifySwitchingStartNow(), ns3::UanMacCw::NotifyTxStart(), ns3::Watchdog::Ping(), ns3::DcaTxop::Queue(), ns3::StaWifiMac::Receive(), ns3::MacLow::ReceiveOk(), ns3::Timer::Schedule(), ns3::MeshWifiInterfaceMac::SendBeacon(), ns3::dot11s::HwmpProtocolMac::SendMyPreq(), ns3::FdReader::Start(), ns3::ArpCache::StartWaitReplyTimer(), and SimpleSource::StopApplication().