Class DriverInterface

Inheritance Relationships

Base Types

Derived Types

Class Documentation

class DriverInterface : public can::CommInterface, public can::StateInterface

Subclassed by can::AsioDriver< boost::asio::posix::stream_descriptor >, can::AsioDriver< Socket >, can::DummyInterface

Public Functions

virtual bool init(const std::string &device, bool loopback) = 0

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

virtual bool recover() = 0

Recover interface after errors and emergency stops

Returns:

true if device was recovered succesfully, false otherwise

virtual State getState() = 0
Returns:

current state of driver

virtual void shutdown() = 0

shutdown interface

Returns:

true if shutdown was succesful, false otherwise

virtual bool translateError(unsigned int internal_error, std::string &str) = 0
virtual bool doesLoopBack() const = 0
virtual void run() = 0
inline virtual ~DriverInterface()