Public Member Functions | List of all members
can::DriverInterface Class Referenceabstract

#include <interface.h>

Inheritance diagram for can::DriverInterface:
Inheritance graph
[legend]

Public Member Functions

virtual bool doesLoopBack () const =0
 
virtual State getState ()=0
 
virtual bool init (const std::string &device, bool loopback)=0
 
virtual bool init (const std::string &device, bool loopback, SettingsConstSharedPtr settings)
 
virtual bool recover ()=0
 
virtual void run ()=0
 
virtual void shutdown ()=0
 
virtual bool translateError (unsigned int internal_error, std::string &str)=0
 
virtual ~DriverInterface ()
 
- Public Member Functions inherited from can::CommInterface
virtual FrameListenerConstSharedPtr createMsgListener (const FrameFunc &delegate)=0
 
virtual FrameListenerConstSharedPtr createMsgListener (const Frame::Header &, const FrameFunc &delegate)=0
 
template<typename Instance , typename Callable >
FrameListenerConstSharedPtr createMsgListenerM (Instance inst, Callable callable)
 
template<typename Instance , typename Callable >
FrameListenerConstSharedPtr createMsgListenerM (const Frame::Header &header, Instance inst, Callable callable)
 
virtual bool send (const Frame &msg)=0
 
virtual ~CommInterface ()
 
- Public Member Functions inherited from can::StateInterface
virtual StateListenerConstSharedPtr createStateListener (const StateFunc &delegate)=0
 
template<typename Instance , typename Callable >
StateListenerConstSharedPtr createStateListenerM (Instance inst, Callable callable)
 
virtual ~StateInterface ()
 

Additional Inherited Members

- Public Types inherited from can::CommInterface
using FrameFunc = std::function< void(const Frame &)>
 
using FrameListener = Listener< const FrameFunc, const Frame & >
 
using FrameListenerConstSharedPtr = FrameListener::ListenerConstSharedPtr
 
using instead = DelegateHelper< FrameFunc >
 
- Public Types inherited from can::StateInterface
using instead = DelegateHelper< StateFunc >
 
using StateFunc = std::function< void(const State &)>
 
using StateListener = Listener< const StateFunc, const State & >
 
using StateListenerConstSharedPtr = StateListener::ListenerConstSharedPtr
 

Detailed Description

Definition at line 178 of file interface.h.

Constructor & Destructor Documentation

◆ ~DriverInterface()

virtual can::DriverInterface::~DriverInterface ( )
inlinevirtual

Definition at line 223 of file interface.h.

Member Function Documentation

◆ doesLoopBack()

virtual bool can::DriverInterface::doesLoopBack ( ) const
pure virtual

◆ getState()

virtual State can::DriverInterface::getState ( )
pure virtual

◆ init() [1/2]

virtual bool can::DriverInterface::init ( const std::string &  device,
bool  loopback 
)
pure virtual

◆ init() [2/2]

virtual bool can::DriverInterface::init ( const std::string &  device,
bool  loopback,
SettingsConstSharedPtr  settings 
)
inlinevirtual

initialize interface

Parameters
[in]devicedriver-specific device name/path
[in]loopbackloop-back own messages
[in]settingsdriver-specific settings
Returns
true if device was initialized succesfully, false otherwise

Reimplemented in can::SocketCANInterface.

Definition at line 190 of file interface.h.

◆ recover()

virtual bool can::DriverInterface::recover ( )
pure virtual

Recover interface after errors and emergency stops

Returns
true if device was recovered succesfully, false otherwise

Implemented in can::SocketCANInterface, and can::DummyInterface.

◆ run()

virtual void can::DriverInterface::run ( )
pure virtual

◆ shutdown()

virtual void can::DriverInterface::shutdown ( )
pure virtual

shutdown interface

Returns
true if shutdown was succesful, false otherwise

Implemented in can::AsioDriver< Socket >, can::AsioDriver< boost::asio::posix::stream_descriptor >, and can::DummyInterface.

◆ translateError()

virtual bool can::DriverInterface::translateError ( unsigned int  internal_error,
std::string &  str 
)
pure virtual

The documentation for this class was generated from the following file:


socketcan_interface
Author(s): Mathias L├╝dtke
autogenerated on Tue May 4 2021 02:50:18