Class SocketCANInterface

Inheritance Relationships

Base Type

Class Documentation

class SocketCANInterface : public can::AsioDriver<boost::asio::posix::stream_descriptor>

Public Functions

inline SocketCANInterface()
inline virtual bool doesLoopBack() const
inline virtual bool init(const std::string &device, bool loopback)

initialize interface

Parameters:
  • device[in] driver-specific device name/path

  • loopback[in] loop-back own messages

Returns:

true if device was initialized succesfully, false otherwise

inline virtual bool recover()

Recover interface after errors and emergency stops

Returns:

true if device was recovered succesfully, false otherwise

inline virtual bool translateError(unsigned int internal_error, std::string &str)
inline int getInternalSocket()

Protected Functions

inline virtual void triggerReadSome()
inline virtual bool enqueue(const Frame &msg)
inline void readFrame(const boost::system::error_code &error)

Protected Attributes

std::string device_
can_frame frame_