23 #include "sensor_thread.h"
24 #include "act_thread.h"
26 using namespace fawkes;
37 :
Thread(
"PanTiltSensorThread",
Thread::OPMODE_WAITFORWAKEUP),
49 __act_threads.push_back(act_thread);
56 for (__ati = __act_threads.begin(); __ati != __act_threads.end(); ++__ati) {
58 (*__ati)->update_sensor_values();
60 logger->
log_warn(
name(),
"Act thread %s threw an exception when updating sensor values",
virtual void loop()
Code to execute in the thread.
Thread class encapsulation of pthreads.
Logger * logger
This is the Logger member used to access the logger.
Thread aspect to use blocked timing.
Base class for exceptions in Fawkes.
void add_act_thread(PanTiltActThread *act_thread)
Add an act thread.
virtual void log_warn(const char *component, const char *format,...)=0
Log warning message.
const char * name() const
Get name of thread.
PanTiltSensorThread()
Constructor.