#include <socketcan.h>
Public Member Functions | |
virtual bool | doesLoopBack () const |
int | getInternalSocket () |
virtual bool | init (const std::string &device, bool loopback) |
virtual bool | recover () |
SocketCANInterface () | |
virtual bool | translateError (unsigned int internal_error, std::string &str) |
Protected Member Functions | |
virtual bool | enqueue (const Frame &msg) |
void | readFrame (const boost::system::error_code &error) |
virtual void | triggerReadSome () |
Protected Attributes | |
std::string | device_ |
can_frame | frame_ |
Private Attributes | |
bool | loopback_ |
int | sc_ |
boost::mutex | send_mutex_ |
Definition at line 20 of file socketcan.h.
can::SocketCANInterface::SocketCANInterface | ( | ) | [inline] |
Definition at line 24 of file socketcan.h.
virtual bool can::SocketCANInterface::doesLoopBack | ( | ) | const [inline, virtual] |
Implements can::DriverInterface.
Definition at line 28 of file socketcan.h.
virtual bool can::SocketCANInterface::enqueue | ( | const Frame & | msg | ) | [inline, protected, virtual] |
Implements can::AsioDriver< boost::asio::posix::stream_descriptor >.
Definition at line 169 of file socketcan.h.
int can::SocketCANInterface::getInternalSocket | ( | ) | [inline] |
Definition at line 157 of file socketcan.h.
virtual bool can::SocketCANInterface::init | ( | const std::string & | device, |
bool | loopback | ||
) | [inline, virtual] |
initialize interface
[in] | device,: | driver-specific device name/path |
[in] | loopback,: | loop-back own messages |
Implements can::DriverInterface.
Definition at line 32 of file socketcan.h.
void can::SocketCANInterface::readFrame | ( | const boost::system::error_code & | error | ) | [inline, protected] |
Definition at line 192 of file socketcan.h.
virtual bool can::SocketCANInterface::recover | ( | ) | [inline, virtual] |
Recover interface after errors and emergency stops
Implements can::DriverInterface.
Definition at line 113 of file socketcan.h.
virtual bool can::SocketCANInterface::translateError | ( | unsigned int | internal_error, |
std::string & | str | ||
) | [inline, virtual] |
Implements can::DriverInterface.
Definition at line 120 of file socketcan.h.
virtual void can::SocketCANInterface::triggerReadSome | ( | ) | [inline, protected, virtual] |
Implements can::AsioDriver< boost::asio::posix::stream_descriptor >.
Definition at line 164 of file socketcan.h.
std::string can::SocketCANInterface::device_ [protected] |
Definition at line 161 of file socketcan.h.
can_frame can::SocketCANInterface::frame_ [protected] |
Definition at line 162 of file socketcan.h.
bool can::SocketCANInterface::loopback_ [private] |
Definition at line 21 of file socketcan.h.
int can::SocketCANInterface::sc_ [private] |
Definition at line 22 of file socketcan.h.
boost::mutex can::SocketCANInterface::send_mutex_ [private] |
Definition at line 218 of file socketcan.h.