Class to create an updater thread for continuously updating tactile sensor data. More...
#include <dsaboost.h>
Public Member Functions | |
cDSAUpdater (cDSA *_ts, int _error_threshold=DEFAULT_ERROR_THRESHOLD) | |
void | interrupt () |
interrupt the updater thread More... | |
Static Public Attributes | |
static int const | DEFAULT_ERROR_THRESHOLD = 16 |
default error threshold, see parameter error_threshold in CTOR More... | |
Private Member Functions | |
void | Updater () |
the actual run function of the updater thread More... | |
Private Attributes | |
int | error_threshold |
cDSA * | ts |
boost::thread | updater_thread |
Class to create an updater thread for continuously updating tactile sensor data.
Uses boost::thread from the boost library (http://www.boost.org)!
Definition at line 61 of file dsaboost.h.
cDSAUpdater::cDSAUpdater | ( | cDSA * | _ts, |
int | _error_threshold = DEFAULT_ERROR_THRESHOLD |
||
) |
CTOR: start an updater thread for the connected tactile sensor _ts
Make remote DSA send frames. Create a thread that updates _ts->frame continuously
_ts | - ptr to already initialized cDSA tactile sensor object |
_error_threshold | - the number of errors that causes a "reset" of the connection to the remote DSA: communication errors with the remote DSACON32m controllers are counted,
|
Definition at line 149 of file dsaboost.cpp.
|
inline |
interrupt the updater thread
Definition at line 93 of file dsaboost.h.
|
private |
the actual run function of the updater thread
run function of updater thread
This function reads frames from the remote DSACON32m tactile sensor controllers continuously in an infinite loop.
Uses global variable g_ts as the tactile sensor object which must point to a valid and connected cDSA object on call.
Definition at line 67 of file dsaboost.cpp.
|
static |
default error threshold, see parameter error_threshold in CTOR
Definition at line 74 of file dsaboost.h.
|
private |
Definition at line 66 of file dsaboost.h.
|
private |
Definition at line 67 of file dsaboost.h.
|
private |
Definition at line 64 of file dsaboost.h.