an identifier for simulation events. More...
#include <event-id.h>
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 |
EventImpl * | PeekEventImpl (void) const |
uint64_t | GetTs (void) const |
uint32_t | GetUid (void) const |
Private Attributes | |
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.
ns3::EventId::EventId | ( | ) |
Definition at line 26 of file event-id.cc.
Definition at line 32 of file event-id.cc.
void ns3::EventId::Cancel | ( | void | ) |
This method is syntactic sugar for the ns3::Simulator::cancel method.
Definition at line 38 of file event-id.cc.
Referenced by ns3::MacLow::CancelAllEvents(), ns3::TcpSocketImpl::CommonNewAck(), ns3::TcpSocketImpl::Destroy(), ns3::NqapWifiMac::DoDispose(), ns3::DcfManager::DoRestartAccessTimeoutIfNeeded(), ns3::ArpCache::Flush(), ns3::TcpSocketImpl::ForwardUp(), ns3::TcpSocketImpl::LastAckTimeout(), ns3::TcpSocketImpl::NewRx(), ns3::NqstaWifiMac::Receive(), ns3::MacLow::ReceiveOk(), ns3::YansWifiPhy::SendPacket(), ns3::Ns2ExtWifiPhy::SendPacket(), ns3::NqstaWifiMac::SetActiveProbing(), ns3::NqapWifiMac::SetBeaconGeneration(), and ns3::Timer::~Timer().
uint64_t ns3::EventId::GetTs | ( | void | ) | const |
Definition at line 58 of file event-id.cc.
References m_ts.
Referenced by ns3::RealtimeSimulatorImpl::IsExpired(), ns3::DefaultSimulatorImpl::IsExpired(), and ns3::EventGarbageCollector::EventIdLessThanTs::operator()().
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 |
This method is syntactic sugar for the ns3::Simulator::isExpired method.
Definition at line 43 of file event-id.cc.
Referenced by ns3::TcpSocketImpl::CommonNewAck(), ns3::SimulatorTests::destroy(), ns3::DcfManager::DoRestartAccessTimeoutIfNeeded(), ns3::Timer::IsExpired(), IsRunning(), ns3::TcpSocketImpl::NewRx(), ns3::MacLow::ReceiveError(), ns3::MacLow::ReceiveOk(), ns3::NqstaWifiMac::RestartBeaconWatchdog(), ns3::TcpSocketImpl::Retransmit(), ns3::SimulatorTests::RunOneTest(), ns3::SimulatorTests::RunTests(), ns3::UdpEchoClient::Send(), ns3::TcpSocketImpl::SendEmptyPacket(), ns3::OnOffApplication::SendPacket(), ns3::TcpSocketImpl::SendPendingData(), ns3::MacLow::SendRtsForPacket(), ns3::MacLow::StartDataTxTimers(), ns3::YansWifiPhy::StartReceivePacket(), and ns3::Ns2ExtWifiPhy::StartReceivePacket().
bool ns3::EventId::IsRunning | ( | void | ) | const |
This method is syntactic sugar for the ns3::Simulator::isExpired method.
Definition at line 48 of file event-id.cc.
References IsExpired().
Referenced by ns3::MacLow::CancelAllEvents(), ns3::OnOffApplication::CancelEvents(), ns3::ArpCache::DoDispose(), ns3::DcfManager::DoRestartAccessTimeoutIfNeeded(), ns3::ArpCache::Flush(), ns3::NqapWifiMac::GetBeaconGeneration(), ns3::Timer::IsRunning(), ns3::Watchdog::Ping(), ns3::NqstaWifiMac::Receive(), ns3::MacLow::ReceiveOk(), ns3::Timer::Schedule(), ns3::ArpCache::StartWaitReplyTimer(), and ns3::Timer::~Timer().
EventImpl * ns3::EventId::PeekEventImpl | ( | void | ) | const |
Definition at line 53 of file event-id.cc.
References m_eventImpl, and ns3::PeekPointer().
Referenced by ns3::RealtimeSimulatorImpl::IsExpired(), and ns3::DefaultSimulatorImpl::IsExpired().
Ptr<EventImpl> ns3::EventId::m_eventImpl [private] |
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().