#include <asio_base.h>
Public Member Functions | |
virtual FrameListenerConstSharedPtr | createMsgListener (const FrameDelegate &delegate) |
virtual FrameListenerConstSharedPtr | createMsgListener (const Frame::Header &h, const FrameDelegate &delegate) |
virtual StateListenerConstSharedPtr | createStateListener (const StateDelegate &delegate) |
State | getState () |
virtual void | run () |
virtual bool | send (const Frame &msg) |
virtual void | shutdown () |
virtual | ~AsioDriver () |
Public Member Functions inherited from can::DriverInterface | |
virtual bool | doesLoopBack () const =0 |
virtual bool | init (const std::string &device, bool loopback)=0 |
virtual bool | recover ()=0 |
virtual bool | translateError (unsigned int internal_error, std::string &str)=0 |
virtual | ~DriverInterface () |
Public Member Functions inherited from can::CommInterface | |
virtual | ~CommInterface () |
Public Member Functions inherited from can::StateInterface | |
virtual | ~StateInterface () |
Protected Member Functions | |
AsioDriver () | |
void | dispatchFrame (const Frame &msg) |
virtual bool | enqueue (const Frame &msg)=0 |
void | frameReceived (const boost::system::error_code &error) |
void | setDriverState (State::DriverState state) |
void | setErrorCode (const boost::system::error_code &error) |
void | setInternalError (unsigned int internal_error) |
void | setNotReady () |
virtual void | triggerReadSome ()=0 |
Protected Attributes | |
Frame | input_ |
boost::asio::io_service | io_service_ |
Socket | socket_ |
boost::asio::strand | strand_ |
Private Types | |
typedef FilteredDispatcher< const unsigned int, CommInterface::FrameListener > | FrameDispatcher |
typedef SimpleDispatcher< StateInterface::StateListener > | StateDispatcher |
Private Attributes | |
FrameDispatcher | frame_dispatcher_ |
boost::mutex | socket_mutex_ |
State | state_ |
StateDispatcher | state_dispatcher_ |
boost::mutex | state_mutex_ |
Additional Inherited Members | |
Public Types inherited from can::CommInterface | |
typedef fastdelegate::FastDelegate1< const Frame & > | FrameDelegate |
typedef Listener< const FrameDelegate, const Frame & > | FrameListener |
typedef FrameListener::ListenerConstSharedPtr | FrameListenerConstSharedPtr |
Public Types inherited from can::StateInterface | |
typedef fastdelegate::FastDelegate1< const State & > | StateDelegate |
typedef Listener< const StateDelegate, const State & > | StateListener |
typedef StateListener::ListenerConstSharedPtr | StateListenerConstSharedPtr |
Definition at line 14 of file asio_base.h.
|
private |
Definition at line 15 of file asio_base.h.
|
private |
Definition at line 16 of file asio_base.h.
|
inlineprotected |
Definition at line 76 of file asio_base.h.
|
inlinevirtual |
Definition at line 81 of file asio_base.h.
|
inlinevirtual |
acquire a listener for the specified delegate, that will get called for all messages
[in] | delegate | delegate to be bound by the listener |
Implements can::CommInterface.
Definition at line 119 of file asio_base.h.
|
inlinevirtual |
acquire a listener for the specified delegate, that will get called for messages with demanded ID
[in] | header | CAN header to restrict listener on |
[in] | delegate | delegate to be bound listener |
Implements can::CommInterface.
Definition at line 122 of file asio_base.h.
|
inlinevirtual |
acquire a listener for the specified delegate, that will get called for all state changes
[in] | delegate | delegate to be bound by the listener |
Implements can::StateInterface.
Definition at line 125 of file asio_base.h.
|
inlineprotected |
Definition at line 37 of file asio_base.h.
|
protectedpure virtual |
Implemented in can::SocketCANInterface.
|
inlineprotected |
Definition at line 66 of file asio_base.h.
|
inlinevirtual |
Implements can::DriverInterface.
Definition at line 83 of file asio_base.h.
|
inlinevirtual |
Implements can::DriverInterface.
Definition at line 87 of file asio_base.h.
|
inlinevirtual |
enqueue frame for sending
[in] | msg | message to be enqueued |
Implements can::CommInterface.
Definition at line 107 of file asio_base.h.
|
inlineprotected |
Definition at line 55 of file asio_base.h.
|
inlineprotected |
Definition at line 40 of file asio_base.h.
|
inlineprotected |
Definition at line 47 of file asio_base.h.
|
inlineprotected |
Definition at line 62 of file asio_base.h.
|
inlinevirtual |
shutdown interface
Implements can::DriverInterface.
Definition at line 111 of file asio_base.h.
|
protectedpure virtual |
Implemented in can::SocketCANInterface.
|
private |
Definition at line 17 of file asio_base.h.
|
protected |
Definition at line 32 of file asio_base.h.
|
protected |
Definition at line 25 of file asio_base.h.
|
protected |
Definition at line 31 of file asio_base.h.
|
private |
Definition at line 22 of file asio_base.h.
|
private |
Definition at line 20 of file asio_base.h.
|
private |
Definition at line 18 of file asio_base.h.
|
private |
Definition at line 21 of file asio_base.h.
|
protected |
Definition at line 29 of file asio_base.h.