#include <controller.h>
Classes | |
class | EOMSend |
class | MessageSender |
Public Member Functions | |
void | addChannel (Channel *channel) |
void | connect () |
bool | connected () |
Controller (const char *port, int baud) | |
bool | downloadScript () |
void | flush () |
void | resetDIOx (int i) |
void | resetEstop () |
void | setDIOx (int i) |
void | setEstop () |
int | setSerialEcho (bool serial_echo) |
void | setUserBool (int var, bool val) |
void | setUserVariable (int var, int val) |
void | spinOnce () |
void | startScript () |
void | stopScript () |
~Controller () | |
Protected Member Functions | |
bool | haveLastResponse () |
Protected Attributes | |
MessageSender | command |
std::string | last_response_ |
boost::condition_variable | last_response_available_ |
boost::mutex | last_response_mutex_ |
MessageSender | param |
MessageSender | query |
EOMSend | send |
EOMSend | sendVerify |
uint8_t | start_script_attempts_ |
Private Member Functions | |
void | processFeedback (std::string msg) |
void | processStatus (std::string msg) |
void | read () |
void | write (std::string) |
Private Attributes | |
int | baud_ |
std::vector< Channel * > | channels_ |
bool | connected_ |
ros::NodeHandle | nh_ |
const char * | port_ |
ros::Publisher | pub_status_ |
serial::Serial * | serial_ |
std::stringstream | tx_buffer_ |
std::string | version_ |
Friends | |
class | Channel |
Definition at line 43 of file controller.h.
roboteq::Controller::Controller | ( | const char * | port, |
int | baud | ||
) |
Definition at line 50 of file controller.cpp.
Definition at line 58 of file controller.cpp.
void roboteq::Controller::addChannel | ( | Channel * | channel | ) |
Definition at line 61 of file controller.cpp.
void roboteq::Controller::connect | ( | ) |
Definition at line 65 of file controller.cpp.
bool roboteq::Controller::connected | ( | ) | [inline] |
Definition at line 116 of file controller.h.
bool roboteq::Controller::downloadScript | ( | ) |
Definition at line 210 of file controller.cpp.
void roboteq::Controller::flush | ( | ) |
Definition at line 142 of file controller.cpp.
bool roboteq::Controller::haveLastResponse | ( | ) | [inline, protected] |
Definition at line 71 of file controller.h.
void roboteq::Controller::processFeedback | ( | std::string | msg | ) | [private] |
Definition at line 188 of file controller.cpp.
void roboteq::Controller::processStatus | ( | std::string | msg | ) | [private] |
Definition at line 151 of file controller.cpp.
void roboteq::Controller::read | ( | ) | [private] |
Definition at line 93 of file controller.cpp.
void roboteq::Controller::resetDIOx | ( | int | i | ) | [inline] |
Definition at line 123 of file controller.h.
void roboteq::Controller::resetEstop | ( | ) | [inline] |
Definition at line 122 of file controller.h.
void roboteq::Controller::setDIOx | ( | int | i | ) | [inline] |
Definition at line 124 of file controller.h.
void roboteq::Controller::setEstop | ( | ) | [inline] |
Definition at line 121 of file controller.h.
int roboteq::Controller::setSerialEcho | ( | bool | serial_echo | ) | [inline] |
Definition at line 131 of file controller.h.
void roboteq::Controller::setUserBool | ( | int | var, |
bool | val | ||
) | [inline] |
Definition at line 128 of file controller.h.
void roboteq::Controller::setUserVariable | ( | int | var, |
int | val | ||
) | [inline] |
Definition at line 127 of file controller.h.
void roboteq::Controller::spinOnce | ( | ) | [inline] |
Definition at line 117 of file controller.h.
void roboteq::Controller::startScript | ( | ) | [inline] |
Definition at line 125 of file controller.h.
void roboteq::Controller::stopScript | ( | ) | [inline] |
Definition at line 126 of file controller.h.
void roboteq::Controller::write | ( | std::string | msg | ) | [private] |
Definition at line 138 of file controller.cpp.
friend class Channel [friend] |
Definition at line 44 of file controller.h.
int roboteq::Controller::baud_ [private] |
Definition at line 48 of file controller.h.
std::vector<Channel*> roboteq::Controller::channels_ [private] |
Definition at line 53 of file controller.h.
MessageSender roboteq::Controller::command [protected] |
Definition at line 105 of file controller.h.
bool roboteq::Controller::connected_ [private] |
Definition at line 49 of file controller.h.
std::string roboteq::Controller::last_response_ [protected] |
Definition at line 68 of file controller.h.
boost::condition_variable roboteq::Controller::last_response_available_ [protected] |
Definition at line 70 of file controller.h.
boost::mutex roboteq::Controller::last_response_mutex_ [protected] |
Definition at line 69 of file controller.h.
ros::NodeHandle roboteq::Controller::nh_ [private] |
Definition at line 55 of file controller.h.
MessageSender roboteq::Controller::param [protected] |
Definition at line 107 of file controller.h.
const char* roboteq::Controller::port_ [private] |
Definition at line 47 of file controller.h.
Definition at line 56 of file controller.h.
MessageSender roboteq::Controller::query [protected] |
Definition at line 106 of file controller.h.
EOMSend roboteq::Controller::send [protected] |
Definition at line 108 of file controller.h.
EOMSend roboteq::Controller::sendVerify [protected] |
Definition at line 108 of file controller.h.
serial::Serial* roboteq::Controller::serial_ [private] |
Definition at line 51 of file controller.h.
uint8_t roboteq::Controller::start_script_attempts_ [protected] |
Definition at line 74 of file controller.h.
std::stringstream roboteq::Controller::tx_buffer_ [private] |
Definition at line 52 of file controller.h.
std::string roboteq::Controller::version_ [private] |
Definition at line 50 of file controller.h.