YARP
Yet Another Robot Platform
MonoThreadTimer Class Reference
+ Inheritance diagram for MonoThreadTimer:

Public Member Functions

 MonoThreadTimer (const TimerSettings &sett, const TimerCallback &call, yarp::os::Mutex *mutex)
 
 MonoThreadTimer (const TimerSettings &sett, const TimerCallback &call, std::mutex *mutex=nullptr)
 
 ~MonoThreadTimer () override
 
virtual yarp::os::YarpTimerEvent getEventNow ()
 
bool startTimer () override
 
void stopTimer () override
 
bool stepTimer () override
 
virtual bool step (YarpTimerEvent event, bool singleStep)
 
bool timerIsRunning () override
 
- Public Member Functions inherited from yarp::os::Timer::PrivateImpl
 PrivateImpl (const TimerSettings &sett, TimerCallback call, yarp::os::Mutex *mutex)
 
 PrivateImpl (const TimerSettings &sett, TimerCallback call, std::mutex *mutex=nullptr)
 
virtual ~PrivateImpl ()=default
 

Public Attributes

bool m_active {false}
 
unsigned int m_runTimes {1}
 
size_t m_id {(size_t)-1}
 
- Public Attributes inherited from yarp::os::Timer::PrivateImpl
TimerSettings m_settings
 
TimerCallback m_callback
 
double m_startStamp {0.0}
 
double m_lastReal {0.0}
 
std::mutex * m_mutex {nullptr}
 
yarp::os::Mutexm_old_mutex {nullptr}
 

Additional Inherited Members

- Public Types inherited from yarp::os::Timer::PrivateImpl
using TimerCallback = yarp::os::Timer::TimerCallback
 
- Protected Member Functions inherited from yarp::os::Timer::PrivateImpl
yarp::os::YarpTimerEvent getEventNow (unsigned int iteration)
 
bool runTimer (unsigned int iteration, YarpTimerEvent event)
 

Detailed Description

Definition at line 81 of file Timer.cpp.

Constructor & Destructor Documentation

◆ MonoThreadTimer() [1/2]

MonoThreadTimer::MonoThreadTimer ( const TimerSettings sett,
const TimerCallback call,
yarp::os::Mutex mutex 
)

Definition at line 217 of file Timer.cpp.

◆ MonoThreadTimer() [2/2]

MonoThreadTimer::MonoThreadTimer ( const TimerSettings sett,
const TimerCallback call,
std::mutex *  mutex = nullptr 
)

Definition at line 231 of file Timer.cpp.

◆ ~MonoThreadTimer()

MonoThreadTimer::~MonoThreadTimer ( )
override

Definition at line 243 of file Timer.cpp.

Member Function Documentation

◆ getEventNow()

virtual yarp::os::YarpTimerEvent MonoThreadTimer::getEventNow ( )
inlinevirtual

Definition at line 103 of file Timer.cpp.

◆ startTimer()

bool MonoThreadTimer::startTimer ( )
inlineoverridevirtual

Implements yarp::os::Timer::PrivateImpl.

Definition at line 108 of file Timer.cpp.

◆ step()

virtual bool MonoThreadTimer::step ( YarpTimerEvent  event,
bool  singleStep 
)
inlinevirtual

Definition at line 125 of file Timer.cpp.

◆ stepTimer()

bool MonoThreadTimer::stepTimer ( )
inlineoverridevirtual

Implements yarp::os::Timer::PrivateImpl.

Definition at line 120 of file Timer.cpp.

◆ stopTimer()

void MonoThreadTimer::stopTimer ( )
inlineoverridevirtual

Implements yarp::os::Timer::PrivateImpl.

Definition at line 115 of file Timer.cpp.

◆ timerIsRunning()

bool MonoThreadTimer::timerIsRunning ( )
inlineoverridevirtual

Implements yarp::os::Timer::PrivateImpl.

Definition at line 134 of file Timer.cpp.

Member Data Documentation

◆ m_active

bool MonoThreadTimer::m_active {false}

Definition at line 99 of file Timer.cpp.

◆ m_id

size_t MonoThreadTimer::m_id {(size_t)-1}

Definition at line 101 of file Timer.cpp.

◆ m_runTimes

unsigned int MonoThreadTimer::m_runTimes {1}

Definition at line 100 of file Timer.cpp.


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