A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
+ Collaboration diagram for Events:

Topics

 MakeEvent from Function Pointers and Lambdas.
 
 

Files

file  event-garbage-collector-test-suite.cc
 EventGarbageCollector test suite.
 
file  event-garbage-collector.cc
 ns3::EventGarbageCollector implementation.
 
file  event-garbage-collector.h
 ns3::EventGarbageCollector declaration.
 
file  event-id.cc
 ns3::EventId implementation.
 
file  event-id.h
 ns3::EventId declarations.
 
file  event-impl.cc
 ns3::EventImpl definitions.
 
file  event-impl.h
 ns3::EventImpl declarations.
 
file  make-event.h
 ns3::MakeEvent function declarations and template implementation.
 
file  scheduler.h
 ns3::Scheduler abstract base class, ns3::Scheduler::Event and ns3::Scheduler::EventKey declarations.
 

Classes

struct  ns3::Scheduler::Event
 Scheduler event. More...
 
class  ns3::EventGarbageCollector
 An object that tracks scheduled events and automatically cancels them when it is destroyed. More...
 
class  ns3::EventId
 An identifier for simulation events. More...
 
class  ns3::EventImpl
 A simulation event. More...
 
struct  ns3::Scheduler::EventKey
 Structure for sorting and comparing Events. More...
 
struct  ns3::internal::EventMemberImplObjTraits< T >
 Helper for the MakeEvent functions which take a class method. More...
 
struct  ns3::internal::EventMemberImplObjTraits< T * >
 Helper for the MakeEvent functions which take a class method. More...
 

Functions

template<typename MEM , typename OBJ , typename... Ts>
std::enable_if_t< std::is_member_pointer_v< MEM >, EventImpl * > ns3::MakeEvent (MEM mem_ptr, OBJ obj, Ts... args)
 Make an EventImpl from class method members which take varying numbers of arguments.
 
bool ns3::operator!= (const Scheduler::EventKey &a, const Scheduler::EventKey &b)
 Compare (not equal) two events by EventKey.
 
bool ns3::operator< (const Scheduler::EventKey &a, const Scheduler::EventKey &b)
 Compare (less than) two events by EventKey.
 
bool ns3::operator== (const Scheduler::EventKey &a, const Scheduler::EventKey &b)
 Compare (equal) two events by EventKey.
 

Detailed Description

Function Documentation

◆ MakeEvent()

template<typename MEM , typename OBJ , typename... Ts>
std::enable_if_t< std::is_member_pointer_v< MEM >, EventImpl * > ns3::MakeEvent ( MEM mem_ptr,
OBJ obj,
Ts... args )

Make an EventImpl from class method members which take varying numbers of arguments.

Template Parameters
MEM[deduced] The class method function signature.
OBJ[deduced] The class type holding the method.
Ts[deduced] Type template parameter pack.
Parameters
[in]mem_ptrClass method member function pointer
[in]objClass instance.
[in]argsArguments to be bound to the underlying function.
Returns
The constructed EventImpl.

Definition at line 133 of file make-event.h.

Referenced by ns3::TapBridge::ReadCallback(), ns3::FdNetDevice::ReceiveCallback(), ns3::Simulator::Schedule(), ns3::Simulator::Schedule(), ns3::Simulator::ScheduleDestroy(), ns3::Simulator::ScheduleDestroy(), ns3::Simulator::ScheduleNow(), ns3::Simulator::ScheduleNow(), ns3::Simulator::ScheduleWithContext(), ns3::Simulator::ScheduleWithContext(), and ns3::WifiTxTimer::Set().

+ Here is the caller graph for this function:

◆ operator!=()

bool ns3::operator!= ( const Scheduler::EventKey & a,
const Scheduler::EventKey & b )
inline

Compare (not equal) two events by EventKey.

Parameters
[in]aThe first event.
[in]bThe second event.
Returns
true if a != b

Definition at line 243 of file scheduler.h.

References ns3::Scheduler::EventKey::m_uid.

◆ operator<()

bool ns3::operator< ( const Scheduler::EventKey & a,
const Scheduler::EventKey & b )
inline

Compare (less than) two events by EventKey.

Note the invariants which this function must provide:

  • irreflexibility: f (x,x) is false
  • antisymmetry: f(x,y) = !f(y,x)
  • transitivity: f(x,y) and f(y,z) => f(x,z)
Parameters
[in]aThe first event.
[in]bThe second event.
Returns
true if a < b

Definition at line 261 of file scheduler.h.

References ns3::Scheduler::EventKey::m_ts, and ns3::Scheduler::EventKey::m_uid.

◆ operator==()

bool ns3::operator== ( const Scheduler::EventKey & a,
const Scheduler::EventKey & b )
inline

Compare (equal) two events by EventKey.

Parameters
[in]aThe first event.
[in]bThe second event.
Returns
true if a != b

Definition at line 229 of file scheduler.h.

References ns3::Scheduler::EventKey::m_uid.