Revised OpenFlow Library  v0.6.0dev
 All Classes Files Functions Variables Friends Groups Pages
Classes | Public Member Functions | Static Public Member Functions | Friends | List of all members
rofl::ctimer Class Reference

Single timer object in rofl-common. More...

#include <ctimer.h>

Classes

class  ctimer_find_by_timer_id
 

Public Member Functions

virtual ~ctimer ()
 ctimer destructor
 
 ctimer ()
 ctimer default constructor
 
 ctimer (ctimer_env *env, int opaque, const rofl::ctimespec &timespec, void *data=(void *) 0)
 ctimer constructor More...
 
 ctimer (const rofl::ctimer &timer)
 ctimer copy constructor
 
Operators
ctimeroperator= (const rofl::ctimer &timer)
 Assignment operator.
 
bool operator== (const rofl::ctimer &t) const
 Equality operator.
 
bool operator!= (const rofl::ctimer &t) const
 Inequality operator.
 
bool operator< (const rofl::ctimer &t) const
 Lesser operator.
 
bool operator<= (const rofl::ctimer &t) const
 Lesser-or-equal operator.
 
bool operator> (const rofl::ctimer &t) const
 Greater operator.
 
bool operator>= (const rofl::ctimer &t) const
 Greater-or-equal operator.
 
Methods to access data members
ctimer_envget_timer_env () const
 Returns pointer to environment of this rofl::ctimer instance.
 
const rofl::ctimeridget_timer_id () const
 Returns const reference to rofl-common's internal handle assigned to this timer.
 
int get_opaque () const
 Returns opaque timer type chosen by user.
 
void * get_data () const
 Returns pointer to opaque data segment chosen by user.
 
rofl::ctimespecset_timespec ()
 Returns reference to rofl::ctimespec instance assigned to this timer.
 
const rofl::ctimespecget_timespec () const
 Returns const reference to rofl::ctimespec instance assigned to this timer.
 

Static Public Member Functions

static rofl::ctimer now ()
 Returns a rofl::ctimer object with internal timespec set to current time. More...
 

Friends

std::ostream & operator<< (std::ostream &os, const rofl::ctimer &timer)
 

Detailed Description

Single timer object in rofl-common.

A single timer instance that binds together the timer value stored in an instance of class rofl::ctimespec, rofl-common's internal timer handle (rofl::ctimerid) and the user defined opaque values for timer type and data segment. Used by classes rofl::ciosrv and rofl::cioloop.

Constructor & Destructor Documentation

rofl::ctimer::ctimer ( ctimer_env env,
int  opaque,
const rofl::ctimespec timespec,
void *  data = (void*)0 
)
inline

ctimer constructor

Parameters
envenvironment for this rofl::ctimer instance
opaquearbitrary number ćhosen by user, not used by ctimer class
timespecabsolute time when this timer expires
dataarbitrary pointer chosen by user, not used by ctimer class

Member Function Documentation

static rofl::ctimer rofl::ctimer::now ( )
inlinestatic

Returns a rofl::ctimer object with internal timespec set to current time.

Returns
rofl::ctimer object with current time

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