Class SocketCANGateway

Inheritance Relationships

Base Type

Class Documentation

class SocketCANGateway : public puma_motor_driver::Gateway

Public Functions

explicit SocketCANGateway(const std::string &canbus_dev)
~SocketCANGateway()
virtual bool connect() override
virtual bool isConnected() const override
void process()
virtual bool recv(Message *msg) override

Receive the next available message from the bus, blocking for timeout_millis if nonzero.

Returns:

True if a message was returned false if timeout occurred.

virtual void queue(const Message &msg) override

Queue specified message to be sent on the bus.

void canFrameToMsg(const can::Frame *frame, Message *msg)
void msgToCanFrame(const Message *msg, can::Frame *frame)