OpenJAUS Software Development Kit  4.3.1
Public Member Functions | Static Protected Member Functions | Protected Attributes | Friends | List of all members
openjaus::system::Timer Class Reference

#include <Timer.h>

Public Member Functions

 Timer ()
 
virtual ~Timer ()
 
 Timer (void(*functionPointer)(void *, Timer *), void *data)
 
void reset (int milliseconds)
 Operation reset. More...
 
void setInterval (int milliseconds)
 Operation setInterval. More...
 
void stop ()
 Operation stop. More...
 
virtual std::string toString () const
 
void setTimerFunction (void(*functionPointer)(void *, Timer *), void *data)
 
bool isRunning () const
 

Static Protected Member Functions

static void timerEventFunction (sigval_t)
 

Protected Attributes

timer_t timerId
 
struct sigevent event
 
struct itimerspec intervalSpec
 
bool running
 
bool stopped
 
bool created
 
void * data
 
void(* timerFunction )(void *, Timer *)
 

Friends

OPENJAUS_EXPORT friend std::ostream & operator<< (std::ostream &output, const Timer &object)
 
OPENJAUS_EXPORT friend std::ostream & operator<< (std::ostream &output, const Timer *object)
 

Constructor & Destructor Documentation

§ Timer() [1/2]

openjaus::system::Timer::Timer ( )

§ ~Timer()

openjaus::system::Timer::~Timer ( )
virtual

§ Timer() [2/2]

openjaus::system::Timer::Timer ( void(*)(void *, Timer *)  functionPointer,
void *  data 
)

Member Function Documentation

§ isRunning()

bool openjaus::system::Timer::isRunning ( ) const
inline

§ reset()

void openjaus::system::Timer::reset ( int  milliseconds)
Parameters
milliseconds

§ setInterval()

void openjaus::system::Timer::setInterval ( int  milliseconds)
Parameters
milliseconds

§ setTimerFunction()

void openjaus::system::Timer::setTimerFunction ( void(*)(void *, Timer *)  functionPointer,
void *  data 
)

§ stop()

void openjaus::system::Timer::stop ( )

§ timerEventFunction()

void openjaus::system::Timer::timerEventFunction ( sigval_t  sigval)
staticprotected

§ toString()

std::string openjaus::system::Timer::toString ( ) const
virtual

Friends And Related Function Documentation

§ operator<< [1/2]

OPENJAUS_EXPORT friend std::ostream& operator<< ( std::ostream &  output,
const Timer object 
)
friend

§ operator<< [2/2]

OPENJAUS_EXPORT friend std::ostream& operator<< ( std::ostream &  output,
const Timer object 
)
friend

Member Data Documentation

§ created

bool openjaus::system::Timer::created
protected

§ data

void* openjaus::system::Timer::data
protected

§ event

struct sigevent openjaus::system::Timer::event
protected

§ intervalSpec

struct itimerspec openjaus::system::Timer::intervalSpec
protected

§ running

bool openjaus::system::Timer::running
protected

§ stopped

bool openjaus::system::Timer::stopped
protected

§ timerFunction

void(* openjaus::system::Timer::timerFunction) (void *, Timer *)
protected

§ timerId

timer_t openjaus::system::Timer::timerId
protected

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