NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::util::scheduler::Scheduler Class Reference

Generic scheduler. More...

#include <scheduler.hpp>

Inheritance diagram for ndn::util::scheduler::Scheduler:
Collaboration diagram for ndn::util::scheduler::Scheduler:

Public Types

typedef function< void()> Event
 

Public Member Functions

 Scheduler (boost::asio::io_service &ioService)
 
 ~Scheduler ()
 
EventId scheduleEvent (const time::nanoseconds &after, const Event &event)
 Schedule a one-time event after the specified delay. More...
 
void cancelEvent (const EventId &eventId)
 Cancel a scheduled event. More...
 
void cancelAllEvents ()
 Cancel all scheduled events. More...
 

Detailed Description

Generic scheduler.

Definition at line 44 of file scheduler.hpp.

Member Typedef Documentation

◆ Event

typedef function<void()> ndn::util::scheduler::Scheduler::Event
Deprecated:
use EventCallback

Definition at line 50 of file scheduler.hpp.

Constructor & Destructor Documentation

◆ Scheduler()

ndn::util::scheduler::Scheduler::Scheduler ( boost::asio::io_service &  ioService)
explicit

Definition at line 47 of file scheduler.cpp.

◆ ~Scheduler()

ndn::util::scheduler::Scheduler::~Scheduler ( )

Definition at line 52 of file scheduler.cpp.

References cancelAllEvents().

Member Function Documentation

◆ scheduleEvent()

EventId ndn::util::scheduler::Scheduler::scheduleEvent ( const time::nanoseconds &  after,
const Event event 
)

◆ cancelEvent()

◆ cancelAllEvents()

void ndn::util::scheduler::Scheduler::cancelAllEvents ( )

Cancel all scheduled events.

Definition at line 89 of file scheduler.cpp.

Referenced by ~Scheduler().


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