Public Member Functions | Private Member Functions | Private Attributes
SDHX Class Reference

#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

SDHX::SDHX ( ) [inline]

Definition at line 99 of file sdhx.h.

SDHX::~SDHX ( ) [inline]

Definition at line 101 of file sdhx.h.

Member Function Documentation

void SDHX::doRead ( ) [inline, private]

Definition at line 34 of file sdhx.h.

template<typename Dur >
bool SDHX::getData ( int16_t(&)  p[2],
int16_t(&)  v[2],
int16_t(&)  c[2],
const Dur &  max_age 
) [inline]

Definition at line 133 of file sdhx.h.

uint8_t SDHX::getRC ( ) [inline]

Definition at line 162 of file sdhx.h.

bool SDHX::halt ( ) [inline]

Definition at line 150 of file sdhx.h.

bool SDHX::init ( const char *  port,
int16_t  min_pwm0,
int16_t  min_pwm1,
int16_t  max_pwm0,
int16_t  max_pwm1 
) [inline]

Definition at line 107 of file sdhx.h.

bool SDHX::isInitialized ( ) [inline]

Definition at line 129 of file sdhx.h.

bool SDHX::move ( const int16_t(&)  p[2],
const int16_t(&)  v[2],
const int16_t(&)  c[2] 
) [inline]

Definition at line 153 of file sdhx.h.

bool SDHX::poll ( ) [inline]

Definition at line 147 of file sdhx.h.

bool SDHX::send ( const std::string &  command) [inline, private]

Definition at line 88 of file sdhx.h.

bool SDHX::setPWM ( const int16_t &  val,
const char *  format 
) [inline, private]

Definition at line 93 of file sdhx.h.

bool SDHX::tryParseRC ( const char *  line) [inline, private]

Definition at line 62 of file sdhx.h.

template<typename T >
bool SDHX::tryReadValues ( const char *  line,
T(&)  val[2],
const char *  format,
bool  track_time = false 
) [inline, private]

Definition at line 73 of file sdhx.h.

Member Data Documentation

int16_t SDHX::cur[2] [private]

Definition at line 97 of file sdhx.h.

boost::mutex SDHX::data_mutex [private]

Definition at line 30 of file sdhx.h.

volatile bool SDHX::initialized [private]

Definition at line 28 of file sdhx.h.

boost::chrono::steady_clock::time_point SDHX::last_time [private]

Definition at line 32 of file sdhx.h.

int16_t SDHX::pos[2] [private]

Definition at line 97 of file sdhx.h.

uint8_t SDHX::rc [private]

Definition at line 27 of file sdhx.h.

boost::thread SDHX::read_thread [private]

Definition at line 31 of file sdhx.h.

volatile bool SDHX::reading [private]

Definition at line 28 of file sdhx.h.

boost::mutex SDHX::send_mutex [private]

Definition at line 29 of file sdhx.h.

Definition at line 26 of file sdhx.h.

int16_t SDHX::vel[2] [private]

Definition at line 97 of file sdhx.h.

The documentation for this class was generated from the following file:

Author(s): Mathias L├╝dtke
autogenerated on Thu Jun 6 2019 20:43:57