#include <sdhx.h>
List of all members.
Public Member Functions |
template<typename Dur > |
bool | getData (int16_t(&p)[2], int16_t(&v)[2], int16_t(&c)[2], const Dur &max_age) |
uint8_t | getRC () |
bool | halt () |
bool | init (const char *port, int16_t min_pwm0, int16_t min_pwm1, int16_t max_pwm0, int16_t max_pwm1) |
bool | isInitialized () |
bool | move (const int16_t(&p)[2], const int16_t(&v)[2], const int16_t(&c)[2]) |
bool | poll () |
| SDHX () |
| ~SDHX () |
Private Member Functions |
void | doRead () |
bool | send (const std::string &command) |
bool | setPWM (const int16_t &val, const char *format) |
bool | tryParseRC (const char *line) |
template<typename T > |
bool | tryReadValues (const char *line, T(&val)[2], const char *format, bool track_time=false) |
Private Attributes |
int16_t | cur [2] |
boost::mutex | data_mutex |
volatile bool | initialized |
boost::chrono::steady_clock::time_point | last_time |
int16_t | pos [2] |
uint8_t | rc |
boost::thread | read_thread |
volatile bool | reading |
boost::mutex | send_mutex |
SerialPort | serial |
int16_t | vel [2] |
Detailed Description
Definition at line 25 of file sdhx.h.
Constructor & Destructor Documentation
Member Function Documentation
template<typename Dur >
bool SDHX::getData |
( |
int16_t(&) |
p[2], |
|
|
int16_t(&) |
v[2], |
|
|
int16_t(&) |
c[2], |
|
|
const Dur & |
max_age |
|
) |
| [inline] |
bool SDHX::init |
( |
const char * |
port, |
|
|
int16_t |
min_pwm0, |
|
|
int16_t |
min_pwm1, |
|
|
int16_t |
max_pwm0, |
|
|
int16_t |
max_pwm1 |
|
) |
| [inline] |
bool SDHX::move |
( |
const int16_t(&) |
p[2], |
|
|
const int16_t(&) |
v[2], |
|
|
const int16_t(&) |
c[2] |
|
) |
| [inline] |
bool SDHX::send |
( |
const std::string & |
command | ) |
[inline, private] |
bool SDHX::setPWM |
( |
const int16_t & |
val, |
|
|
const char * |
format |
|
) |
| [inline, private] |
template<typename T >
bool SDHX::tryReadValues |
( |
const char * |
line, |
|
|
T(&) |
val[2], |
|
|
const char * |
format, |
|
|
bool |
track_time = false |
|
) |
| [inline, private] |
Member Data Documentation
The documentation for this class was generated from the following file: