#include <CanDriver.h>
Classes | |
struct | Channel |
struct | Filter |
Public Member Functions | |
CanDriver (ros::NodeHandle &nh, ros::NodeHandle &nh_priv, lusb::UsbDevice *dev=NULL, const std::string &name=std::string("Dataspeed USB CAN Tool"), const ModuleVersion &firmware=ModuleVersion(10, 4, 0)) | |
~CanDriver () | |
Private Member Functions | |
void | recvDevice (unsigned int channel, uint32_t id, bool extended, uint8_t dlc, const uint8_t data[8]) |
void | recvRos (const can_msgs::Frame::ConstPtr &msg, unsigned int channel) |
bool | sampleTimeOffset (ros::WallDuration &offset, ros::WallDuration &delay) |
void | serviceDevice () |
ros::WallTime | stampDev2Ros (unsigned int dev_stamp) |
void | timerFlushCallback (const ros::WallTimerEvent &event) |
void | timerServiceCallback (const ros::WallTimerEvent &event) |
Private Attributes | |
std::vector< Channel > | channels_ |
CanUsb * | dev_ |
bool | error_topic_ |
ModuleVersion | firmware_ |
std::string | mac_addr_ |
boost::mutex | mutex_ |
std::string | name_ |
ros::NodeHandle | nh_ |
ros::NodeHandle | nh_priv_ |
ros::Publisher | pub_version_ |
std::vector< ros::Publisher > | pubs_ |
std::vector< ros::Publisher > | pubs_err_ |
std::vector< ros::Subscriber > | subs_ |
bool | sync_time_ |
ros::WallTimer | timer_flush_ |
ros::WallTimer | timer_service_ |
uint32_t | total_drops_ |
Definition at line 59 of file CanDriver.h.
dataspeed_can_usb::CanDriver::CanDriver | ( | ros::NodeHandle & | nh, |
ros::NodeHandle & | nh_priv, | ||
lusb::UsbDevice * | dev = NULL , |
||
const std::string & | name = std::string("Dataspeed USB CAN Tool") , |
||
const ModuleVersion & | firmware = ModuleVersion(10,4,0) |
||
) |
Definition at line 74 of file CanDriver.cpp.
Definition at line 124 of file CanDriver.cpp.
void dataspeed_can_usb::CanDriver::recvDevice | ( | unsigned int | channel, |
uint32_t | id, | ||
bool | extended, | ||
uint8_t | dlc, | ||
const uint8_t | data[8] | ||
) | [private] |
Definition at line 140 of file CanDriver.cpp.
void dataspeed_can_usb::CanDriver::recvRos | ( | const can_msgs::Frame::ConstPtr & | msg, |
unsigned int | channel | ||
) | [private] |
Definition at line 135 of file CanDriver.cpp.
bool dataspeed_can_usb::CanDriver::sampleTimeOffset | ( | ros::WallDuration & | offset, |
ros::WallDuration & | delay | ||
) | [private] |
Definition at line 160 of file CanDriver.cpp.
void dataspeed_can_usb::CanDriver::serviceDevice | ( | ) | [private] |
Definition at line 177 of file CanDriver.cpp.
ros::WallTime dataspeed_can_usb::CanDriver::stampDev2Ros | ( | unsigned int | dev_stamp | ) | [inline, private] |
Definition at line 75 of file CanDriver.h.
void dataspeed_can_usb::CanDriver::timerFlushCallback | ( | const ros::WallTimerEvent & | event | ) | [private] |
Definition at line 305 of file CanDriver.cpp.
void dataspeed_can_usb::CanDriver::timerServiceCallback | ( | const ros::WallTimerEvent & | event | ) | [private] |
Definition at line 300 of file CanDriver.cpp.
std::vector<Channel> dataspeed_can_usb::CanDriver::channels_ [private] |
Definition at line 97 of file CanDriver.h.
CanUsb* dataspeed_can_usb::CanDriver::dev_ [private] |
Definition at line 104 of file CanDriver.h.
bool dataspeed_can_usb::CanDriver::error_topic_ [private] |
Definition at line 85 of file CanDriver.h.
Definition at line 124 of file CanDriver.h.
std::string dataspeed_can_usb::CanDriver::mac_addr_ [private] |
Definition at line 86 of file CanDriver.h.
boost::mutex dataspeed_can_usb::CanDriver::mutex_ [private] |
Definition at line 115 of file CanDriver.h.
std::string dataspeed_can_usb::CanDriver::name_ [private] |
Definition at line 118 of file CanDriver.h.
Definition at line 80 of file CanDriver.h.
Definition at line 81 of file CanDriver.h.
Definition at line 110 of file CanDriver.h.
std::vector<ros::Publisher> dataspeed_can_usb::CanDriver::pubs_ [private] |
Definition at line 111 of file CanDriver.h.
std::vector<ros::Publisher> dataspeed_can_usb::CanDriver::pubs_err_ [private] |
Definition at line 112 of file CanDriver.h.
std::vector<ros::Subscriber> dataspeed_can_usb::CanDriver::subs_ [private] |
Definition at line 107 of file CanDriver.h.
bool dataspeed_can_usb::CanDriver::sync_time_ [private] |
Definition at line 84 of file CanDriver.h.
Definition at line 101 of file CanDriver.h.
Definition at line 100 of file CanDriver.h.
uint32_t dataspeed_can_usb::CanDriver::total_drops_ [private] |
Definition at line 121 of file CanDriver.h.