Fawkes API  Fawkes Development Version
sensor_thread.h
1 
2 /***************************************************************************
3  * sensor_thread.h - Robotis dynamixel servo sensor thread
4  *
5  * Created: Mon Mar 23 20:20:55 2015 (based on pantilt plugin)
6  * Copyright 2006-2015 Tim Niemueller [www.niemueller.de]
7  ****************************************************************************/
8 
9 /* This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU Library General Public License for more details.
18  *
19  * Read the full text in the LICENSE.GPL file in the doc directory.
20  */
21 
22 #ifndef _PLUGINS_DYNAMIXEL_SENSOR_THREAD_H_
23 #define _PLUGINS_DYNAMIXEL_SENSOR_THREAD_H_
24 
25 #include "sensor_thread.h"
26 
27 #include <aspect/blocked_timing.h>
28 #include <aspect/configurable.h>
29 #include <aspect/logging.h>
30 #include <core/threading/thread.h>
31 
33 
36  public fawkes::LoggingAspect,
38 {
39 public:
41  virtual void loop();
42 
43  void add_driver_thread(DynamixelDriverThread *drv_thread);
44 
45  /** Stub to see name in backtrace for easier debugging. @see Thread::run() */
46 protected:
47  virtual void
48  run()
49  {
50  Thread::run();
51  }
52 
53 private:
54  std::list<DynamixelDriverThread *> driver_threads_;
55 };
56 
57 #endif
DynamixelSensorThread::run
virtual void run()
Stub to see name in backtrace for easier debugging.
Definition: sensor_thread.h:47
DynamixelDriverThread
Definition: driver_thread.h:50
DynamixelSensorThread::add_driver_thread
void add_driver_thread(DynamixelDriverThread *drv_thread)
Add a driver thread to wake in SENSOR_ACQUIRE hook.
Definition: sensor_thread.cpp:53
DynamixelSensorThread::loop
virtual void loop()
Code to execute in the thread.
Definition: sensor_thread.cpp:42
DynamixelSensorThread::DynamixelSensorThread
DynamixelSensorThread()
Constructor.
Definition: sensor_thread.cpp:35
fawkes::BlockedTimingAspect
Definition: blocked_timing.h:54
fawkes::LoggingAspect
Definition: logging.h:36
DynamixelSensorThread
Definition: sensor_thread.h:33
fawkes::Thread
Definition: thread.h:44
fawkes::ConfigurableAspect
Definition: configurable.h:36