Fawkes API Fawkes Development Version
act_thread.cpp
1
2/***************************************************************************
3 * act_thread.cpp - Pan/tilt plugin act thread (abstract)
4 *
5 * Created: Thu Jun 18 09:48:03 2009
6 * Copyright 2006-2009 Tim Niemueller [www.niemueller.de]
7 *
8 ****************************************************************************/
9
10/* This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Library General Public License for more details.
19 *
20 * Read the full text in the LICENSE.GPL file in the doc directory.
21 */
22
23#include "act_thread.h"
24
25using namespace fawkes;
26
27/** @class PanTiltActThread "act_thread.h"
28 * Pan/tilt act thread.
29 * This thread integrates into the Fawkes main loop at the ACT_EXEC hook and
30 * interacts with the controller of a particular pan/tilt unit. Note that this
31 * abstract class is then implemented by threads interacting with a particular
32 * pan/tilt unit.
33 *
34 * Each implementation of this thread shall open an instance of a PanTiltInterface
35 * and act within this thread's loop() method. The data read back from the unit
36 * shall be written in the update_sensor_values() method, that is called from
37 * the PanTiltSensorThread.
38 *
39 * @author Tim Niemueller
40 *
41 * @fn void PanTiltActThread::update_sensor_values()
42 * Update sensor values of the PTU in the BB interface.
43 */
44
45/** Constructor.
46 * @param thread_name thread name
47 */
48PanTiltActThread::PanTiltActThread(const char *thread_name)
49: Thread(thread_name, Thread::OPMODE_WAITFORWAKEUP),
50 BlockedTimingAspect(BlockedTimingAspect::WAKEUP_HOOK_ACT_EXEC)
51{
52}
53
54/** Destructor. */
56{
57}
PanTiltActThread(const char *thread_name)
Constructor.
Definition: act_thread.cpp:48
virtual ~PanTiltActThread()
Destructor.
Definition: act_thread.cpp:55
Thread aspect to use blocked timing.
Thread class encapsulation of pthreads.
Definition: thread.h:46
Fawkes library namespace.