#include <socketcan_gateway.h>
Public Member Functions | |
virtual bool | connect () |
virtual bool | isConnected () |
void | msgToFrame (Message *msg, can_frame *frame) |
virtual void | queue (const Message &msg) |
virtual bool | recv (Message *msg) |
virtual bool | sendAllQueued () |
SocketCANGateway (std::string canbus_dev) | |
Private Attributes | |
std::string | canbus_dev_ |
bool | is_connected_ |
int | socket_ |
can_frame | write_frames_ [1024] |
int | write_frames_index_ |
Definition at line 49 of file socketcan_gateway.h.
puma_motor_driver::SocketCANGateway::SocketCANGateway | ( | std::string | canbus_dev | ) | [explicit] |
Definition at line 44 of file socketcan_gateway.cpp.
bool puma_motor_driver::SocketCANGateway::connect | ( | ) | [virtual] |
Implements puma_motor_driver::Gateway.
Definition at line 51 of file socketcan_gateway.cpp.
bool puma_motor_driver::SocketCANGateway::isConnected | ( | ) | [virtual] |
Implements puma_motor_driver::Gateway.
Definition at line 95 of file socketcan_gateway.cpp.
void puma_motor_driver::SocketCANGateway::msgToFrame | ( | Message * | msg, |
can_frame * | frame | ||
) |
Definition at line 157 of file socketcan_gateway.cpp.
void puma_motor_driver::SocketCANGateway::queue | ( | const Message & | msg | ) | [virtual] |
Queue specified message to be sent on the bus.
Implements puma_motor_driver::Gateway.
Definition at line 133 of file socketcan_gateway.cpp.
bool puma_motor_driver::SocketCANGateway::recv | ( | Message * | msg | ) | [virtual] |
Receive the next available message from the bus, blocking for timeout_millis if nonzero.
Implements puma_motor_driver::Gateway.
Definition at line 101 of file socketcan_gateway.cpp.
bool puma_motor_driver::SocketCANGateway::sendAllQueued | ( | ) | [virtual] |
Send the queued messages on the bus.
Implements puma_motor_driver::Gateway.
Definition at line 146 of file socketcan_gateway.cpp.
std::string puma_motor_driver::SocketCANGateway::canbus_dev_ [private] |
Definition at line 64 of file socketcan_gateway.h.
bool puma_motor_driver::SocketCANGateway::is_connected_ [private] |
Definition at line 65 of file socketcan_gateway.h.
int puma_motor_driver::SocketCANGateway::socket_ [private] |
Definition at line 63 of file socketcan_gateway.h.
can_frame puma_motor_driver::SocketCANGateway::write_frames_[1024] [private] |
Definition at line 67 of file socketcan_gateway.h.
int puma_motor_driver::SocketCANGateway::write_frames_index_ [private] |
Definition at line 68 of file socketcan_gateway.h.