Fawkes API  Fawkes Development Version
act_thread.h
1 
2 /***************************************************************************
3  * act_thread.h - Robotis dynamixel servo actuator integration
4  *
5  * Created: Mon Mar 23 20:23:33 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_ACT_THREAD_H_
23 #define __PLUGINS_DYNAMIXEL_ACT_THREAD_H_
24 
25 #include <core/threading/thread.h>
26 #include <aspect/blocked_timing.h>
27 #include <aspect/logging.h>
28 #include <aspect/configurable.h>
29 
31 
33 : public fawkes::Thread,
35  public fawkes::LoggingAspect,
37 {
38  public:
40  virtual void loop();
41 
42  void add_driver_thread(DynamixelDriverThread *drv_thread);
43 
44  /** Stub to see name in backtrace for easier debugging. @see Thread::run() */
45  protected: virtual void run() { Thread::run(); }
46 
47  private:
48  std::list<DynamixelDriverThread *> driver_threads_;
49 
50 };
51 
52 
53 #endif
virtual void loop()
Code to execute in the thread.
Definition: act_thread.cpp:44
Driver thread for Robotis dynamixel servos.
Definition: driver_thread.h:53
void add_driver_thread(DynamixelDriverThread *drv_thread)
Add a driver thread to wake in ACT hook.
Definition: act_thread.cpp:55
Thread class encapsulation of pthreads.
Definition: thread.h:42
Thread aspect to use blocked timing.
Robotis dynamixel servo act thread.
Definition: act_thread.h:32
Thread aspect to log output.
Definition: logging.h:35
DynamixelActThread()
Constructor.
Definition: act_thread.cpp:36
Thread aspect to access configuration data.
Definition: configurable.h:35
virtual void run()
Stub to see name in backtrace for easier debugging.
Definition: act_thread.h:45