Fawkes API
Fawkes Development Version
|
00001 00002 /*************************************************************************** 00003 * act_thread.cpp - Pan/tilt plugin act thread (abstract) 00004 * 00005 * Created: Thu Jun 18 09:48:03 2009 00006 * Copyright 2006-2009 Tim Niemueller [www.niemueller.de] 00007 * 00008 ****************************************************************************/ 00009 00010 /* This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. 00014 * 00015 * This program is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU Library General Public License for more details. 00019 * 00020 * Read the full text in the LICENSE.GPL file in the doc directory. 00021 */ 00022 00023 #include "act_thread.h" 00024 00025 using namespace fawkes; 00026 00027 /** @class PanTiltActThread "act_thread.h" 00028 * Pan/tilt act thread. 00029 * This thread integrates into the Fawkes main loop at the ACT_EXEC hook and 00030 * interacts with the controller of a particular pan/tilt unit. Note that this 00031 * abstract class is then implemented by threads interacting with a particular 00032 * pan/tilt unit. 00033 * 00034 * Each implementation of this thread shall open an instance of a PanTiltInterface 00035 * and act within this thread's loop() method. The data read back from the unit 00036 * shall be written in the update_sensor_values() method, that is called from 00037 * the PanTiltSensorThread. 00038 * 00039 * @author Tim Niemueller 00040 * 00041 * @fn void PanTiltActThread::update_sensor_values() 00042 * Update sensor values of the PTU in the BB interface. 00043 */ 00044 00045 /** Constructor. 00046 * @param thread_name thread name 00047 */ 00048 PanTiltActThread::PanTiltActThread(const char *thread_name) 00049 : Thread(thread_name, Thread::OPMODE_WAITFORWAKEUP), 00050 BlockedTimingAspect(BlockedTimingAspect::WAKEUP_HOOK_ACT_EXEC) 00051 { 00052 } 00053 00054 00055 /** Destructor. */ 00056 PanTiltActThread::~PanTiltActThread() 00057 { 00058 }