Template Class AsioDriver
Defined in File asio_base.hpp
Inheritance Relationships
Base Type
public can::DriverInterface
(Class DriverInterface)
Class Documentation
-
template<typename Socket>
class AsioDriver : public can::DriverInterface Public Functions
-
inline virtual ~AsioDriver()
-
inline virtual void run()
-
inline virtual bool send(const Frame &msg)
enqueue frame for sending
- Parameters:
msg – [in] message to be enqueued
- Returns:
true if frame was enqueued succesfully, otherwise false
-
inline virtual void shutdown()
shutdown interface
- Returns:
true if shutdown was succesful, false otherwise
-
inline virtual FrameListenerConstSharedPtr createMsgListener(const FrameFunc &delegate)
acquire a listener for the specified delegate, that will get called for all messages
- Parameters:
delegate – [in] delegate to be bound by the listener
- Returns:
managed pointer to listener
-
inline virtual FrameListenerConstSharedPtr createMsgListener(const Frame::Header &h, const FrameFunc &delegate)
acquire a listener for the specified delegate, that will get called for messages with demanded ID
- Parameters:
header – [in] CAN header to restrict listener on
delegate – [in] delegate to be bound listener
- Returns:
managed pointer to listener
-
inline virtual StateListenerConstSharedPtr createStateListener(const StateFunc &delegate)
acquire a listener for the specified delegate, that will get called for all state changes
- Parameters:
delegate – [in] delegate to be bound by the listener
- Returns:
managed pointer to listener
Protected Functions
-
virtual void triggerReadSome() = 0
-
inline void setErrorCode(const boost::system::error_code &error)
-
inline void setInternalError(unsigned int internal_error)
-
inline void setDriverState(State::DriverState state)
-
inline void setNotReady()
-
inline void frameReceived(const boost::system::error_code &error)
-
inline AsioDriver()
-
inline virtual ~AsioDriver()