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

an identifier for simulation events. More...

#include <event-id.h>

+ Collaboration diagram for ns3::EventId:

Public Member Functions

 EventId ()
 
 EventId (const Ptr< EventImpl > &impl, uint64_t ts, uint32_t context, uint32_t uid)
 
void Cancel (void)
 This method is syntactic sugar for the ns3::Simulator::cancel method. More...
 
uint32_t GetContext (void) const
 
uint64_t GetTs (void) const
 
uint32_t GetUid (void) const
 
bool IsExpired (void) const
 This method is syntactic sugar for the ns3::Simulator::isExpired method. More...
 
bool IsRunning (void) const
 This method is syntactic sugar for the ns3::Simulator::isExpired method. More...
 
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.

Constructor & Destructor Documentation

ns3::EventId::EventId ( )

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

References NS_LOG_FUNCTION.

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

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

References NS_LOG_FUNCTION.

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::HalfDuplexIdealPhy::AbortRx(), ns3::RandomDirection2dMobilityModel::BeginPause(), ns3::RandomWaypointMobilityModel::BeginWalk(), ns3::MacLow::CancelAllEvents(), ns3::TcpSocketBase::CancelAllTimers(), ns3::UanTransducerHd::Clear(), ns3::UanMacCw::Clear(), ns3::UanMacRc::Clear(), ns3::dot11s::PeerLink::ClearConfirmTimer(), ns3::dot11s::PeerLink::ClearHoldingTimer(), ns3::dot11s::PeerLink::ClearRetryTimer(), CwndTracer(), ns3::LteRlcUm::DoDispose(), ns3::LteRlcTm::DoDispose(), ns3::LteRlcAm::DoDispose(), ns3::dot11s::PeerLink::DoDispose(), ns3::dot11s::HwmpProtocol::DoDispose(), ns3::Application::DoDispose(), ns3::MeshWifiInterfaceMac::DoDispose(), ns3::ApWifiMac::DoDispose(), ns3::MacLow::DoDispose(), ns3::TcpSocketBase::DoForwardUp(), ns3::MeshWifiInterfaceMac::DoInitialize(), ns3::ApWifiMac::DoInitialize(), ns3::LteRlcTm::DoNotifyTxOpportunity(), ns3::LteRlcUm::DoNotifyTxOpportunity(), ns3::LteRlcAm::DoNotifyTxOpportunity(), ns3::LteRlcUm::DoReceivePdu(), ns3::LteRlcAm::DoReceivePdu(), ns3::LteUePhy::DoReset(), ns3::DcfManager::DoRestartAccessTimeoutIfNeeded(), SimulatorEventsTestCase::DoRun(), ns3::RandomDirection2dMobilityModel::DoSetPosition(), ns3::LteRlcTm::DoTransmitPdcpPdu(), ns3::LteRlcUm::DoTransmitPdcpPdu(), ns3::RandomWalk2dMobilityModel::DoWalk(), ns3::TcpWestwood::EstimateRtt(), ns3::ArpCache::Flush(), ns3::TcpSocketBase::LastAckTimeout(), ns3::StaWifiMac::MissedBeacons(), ns3::TcpSocketBase::NewAck(), ns3::WifiRadioEnergyModelPhyListener::NotifyMaybeCcaBusyStart(), ns3::WifiRadioEnergyModelPhyListener::NotifyRxStart(), ns3::WifiRadioEnergyModelPhyListener::NotifySwitchingStart(), ns3::DcfManager::NotifySwitchingStartNow(), ns3::MacLow::NotifySwitchingStartNow(), ns3::WifiRadioEnergyModelPhyListener::NotifyTxStart(), ns3::TcpSocketBase::ProcessSynRcvd(), ns3::TcpSocketBase::ProcessSynSent(), ns3::StaWifiMac::Receive(), ns3::TcpSocketBase::ReceivedData(), ns3::MacLow::ReceiveOk(), ns3::LteUeMac::RecvRaResponse(), ns3::UeManager::RecvRrcConnectionReconfigurationCompleted(), ns3::UeManager::RecvRrcConnectionReestablishmentRequest(), ns3::UeManager::RecvRrcConnectionRequest(), ns3::UeManager::RecvUeContextRelease(), ns3::RadioBearerStatsCalculator::RescheduleEndEpoch(), ns3::LteSpectrumPhy::Reset(), ns3::MacLow::ResetBlockAckInactivityTimerIfNeeded(), ns3::UanMacRc::ScheduleData(), ns3::StaWifiMac::SendAssociationRequest(), ns3::TcpSocketBase::SendEmptyPacket(), ns3::YansWifiPhy::SendPacket(), ns3::StaWifiMac::SendProbeRequest(), ns3::StaWifiMac::SetActiveProbing(), ns3::ApWifiMac::SetBeaconGeneration(), ns3::dot11s::PeerLink::SetBeaconInformation(), ns3::YansWifiPhy::SetChannelNumber(), ns3::RandomDirection2dMobilityModel::SetDirectionAndSpeed(), SsThreshTracer(), ns3::LteTestRrc::Stop(), ns3::V4Ping::StopApplication(), ns3::dot11s::HwmpProtocol::UnsetRoot(), ns3::BasicEnergySource::UpdateEnergySource(), ns3::RvBatteryModel::UpdateEnergySource(), ns3::LiIonEnergySource::UpdateEnergySource(), ns3::BlockAckAgreement::~BlockAckAgreement(), and ns3::Timer::~Timer().

+ Here is the call graph for this function:

uint32_t ns3::EventId::GetContext ( void  ) const

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

References m_context, and NS_LOG_FUNCTION.

uint64_t ns3::EventId::GetTs ( void  ) const
uint32_t ns3::EventId::GetUid ( void  ) const
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.

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

References IsExpired(), and NS_LOG_FUNCTION.

Referenced by ns3::dsdv::RoutingTable::AnyRunningEvent(), ns3::UanMacRc::Associate(), ns3::UanMacRc::AssociateTimeout(), ns3::MacLow::CancelAllEvents(), ns3::OnOffApplication::CancelEvents(), ns3::dsdv::RoutingTable::DeleteIpv4Event(), ns3::ArpCache::DoDispose(), ns3::MeshWifiInterfaceMac::DoInitialize(), ns3::SteadyStateRandomWaypointMobilityModel::DoInitializePrivate(), ns3::LteRlcAm::DoNotifyTxOpportunity(), ns3::SubscriberStationNetDevice::DoReceive(), ns3::LteRlcUm::DoReceivePdu(), ns3::LteRlcAm::DoReceivePdu(), ns3::LteRlcAm::DoReportBufferStatus(), ns3::DcfManager::DoRestartAccessTimeoutIfNeeded(), ns3::UanMacCw::Enqueue(), ns3::UanMacRc::Enqueue(), ns3::ArpCache::Flush(), ns3::MeshWifiInterfaceMac::GetBeaconGeneration(), ns3::Timer::IsRunning(), ns3::StaWifiMac::MissedBeacons(), ns3::DcfManager::NotifySwitchingStartNow(), ns3::MacLow::NotifySwitchingStartNow(), ns3::UanMacCw::NotifyTxStart(), ns3::SSLinkManager::PerformRanging(), ns3::Watchdog::Ping(), ns3::StaWifiMac::Receive(), ns3::MacLow::ReceiveOk(), ns3::MacLow::ResetBlockAckInactivityTimerIfNeeded(), ns3::UanMacRc::RtsTimeout(), ns3::Timer::Schedule(), ns3::UanMacRc::ScheduleData(), ns3::SsServiceFlowManager::ScheduleDsaReq(), ns3::BsServiceFlowManager::ScheduleDsaRsp(), ns3::StaWifiMac::SendAssociationRequest(), ns3::MeshWifiInterfaceMac::SendBeacon(), ns3::dot11s::HwmpProtocolMac::SendMyPerr(), ns3::dot11s::HwmpProtocolMac::SendMyPreq(), ns3::StaWifiMac::SendProbeRequest(), ns3::UanMacRc::SendRts(), ns3::FdReader::Start(), ns3::ArpCache::StartWaitReplyTimer(), MyApp::StopApplication(), SimpleSource::StopApplication(), and ns3::Timer::~Timer().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

EventImpl * ns3::EventId::PeekEventImpl ( void  ) const

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

References m_eventImpl, NS_LOG_FUNCTION, and ns3::PeekPointer().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Friends And Related Function Documentation

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

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

Member Data Documentation

uint32_t ns3::EventId::m_context
private

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

Referenced by GetContext(), and ns3::operator==().

Ptr<EventImpl> ns3::EventId::m_eventImpl
private

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

Referenced by ns3::operator==(), and PeekEventImpl().

uint64_t ns3::EventId::m_ts
private

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

Referenced by GetTs(), and ns3::operator==().

uint32_t ns3::EventId::m_uid
private

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

Referenced by GetUid(), and ns3::operator==().


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