Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
can::DummyInterface Class Reference

#include <dummy.h>

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

Public Member Functions

bool add (const std::string &k, const Frame &v, bool multi)
 
bool add (const Frame &k, const Frame &v, bool multi)
 
bool add (const std::string &k, const std::string &v, bool multi)
 
bool add (const Frame &k, const std::string &v, bool multi)
 
virtual FrameListenerConstSharedPtr createMsgListener (const FrameDelegate &delegate)
 
virtual FrameListenerConstSharedPtr createMsgListener (const Frame::Header &h, const FrameDelegate &delegate)
 
virtual StateListenerConstSharedPtr createStateListener (const StateDelegate &delegate)
 
virtual bool doesLoopBack () const
 
 DummyInterface (bool loopback)
 
virtual State getState ()
 
bool init (const std::string &device, bool loopback)
 
virtual bool recover ()
 
virtual void run ()
 
virtual bool send (const Frame &msg)
 
virtual void shutdown ()
 
virtual bool translateError (unsigned int internal_error, std::string &str)
 
- Public Member Functions inherited from can::DriverInterface
virtual ~DriverInterface ()
 
- Public Member Functions inherited from can::CommInterface
virtual ~CommInterface ()
 
- Public Member Functions inherited from can::StateInterface
virtual ~StateInterface ()
 

Private Types

typedef FilteredDispatcher< const unsigned int, CommInterface::FrameListenerFrameDispatcher
 
typedef boost::unordered_multimap< std::string, FrameMap
 
typedef SimpleDispatcher< StateInterface::StateListenerStateDispatcher
 

Private Member Functions

bool add_noconv (const std::string &k, const Frame &v, bool multi)
 

Private Attributes

FrameDispatcher frame_dispatcher_
 
bool loopback_
 
Map map_
 
State state_
 
StateDispatcher state_dispatcher_
 

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
 

Detailed Description

Definition at line 11 of file dummy.h.

Member Typedef Documentation

Definition at line 12 of file dummy.h.

typedef boost::unordered_multimap<std::string, Frame> can::DummyInterface::Map
private

Definition at line 14 of file dummy.h.

Definition at line 13 of file dummy.h.

Constructor & Destructor Documentation

can::DummyInterface::DummyInterface ( bool  loopback)
inline

Definition at line 29 of file dummy.h.

Member Function Documentation

bool can::DummyInterface::add ( const std::string &  k,
const Frame v,
bool  multi 
)
inline

Definition at line 31 of file dummy.h.

bool can::DummyInterface::add ( const Frame k,
const Frame v,
bool  multi 
)
inline

Definition at line 34 of file dummy.h.

bool can::DummyInterface::add ( const std::string &  k,
const std::string &  v,
bool  multi 
)
inline

Definition at line 37 of file dummy.h.

bool can::DummyInterface::add ( const Frame k,
const std::string &  v,
bool  multi 
)
inline

Definition at line 40 of file dummy.h.

bool can::DummyInterface::add_noconv ( const std::string &  k,
const Frame v,
bool  multi 
)
inlineprivate

Definition at line 21 of file dummy.h.

virtual FrameListenerConstSharedPtr can::DummyInterface::createMsgListener ( const FrameDelegate delegate)
inlinevirtual

acquire a listener for the specified delegate, that will get called for all messages

Parameters
[in]delegatedelegate to be bound by the listener
Returns
managed pointer to listener

Implements can::CommInterface.

Definition at line 56 of file dummy.h.

virtual FrameListenerConstSharedPtr can::DummyInterface::createMsgListener ( const Frame::Header ,
const FrameDelegate delegate 
)
inlinevirtual

acquire a listener for the specified delegate, that will get called for messages with demanded ID

Parameters
[in]headerCAN header to restrict listener on
[in]delegatedelegate to be bound listener
Returns
managed pointer to listener

Implements can::CommInterface.

Definition at line 59 of file dummy.h.

virtual StateListenerConstSharedPtr can::DummyInterface::createStateListener ( const StateDelegate delegate)
inlinevirtual

acquire a listener for the specified delegate, that will get called for all state changes

Parameters
[in]delegatedelegate to be bound by the listener
Returns
managed pointer to listener

Implements can::StateInterface.

Definition at line 90 of file dummy.h.

virtual bool can::DummyInterface::doesLoopBack ( ) const
inlinevirtual

Implements can::DriverInterface.

Definition at line 78 of file dummy.h.

virtual State can::DummyInterface::getState ( )
inlinevirtual
Returns
current state of driver

Implements can::DriverInterface.

Definition at line 66 of file dummy.h.

bool can::DummyInterface::init ( const std::string &  device,
bool  loopback 
)
inlinevirtual

initialize interface

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

Implements can::DriverInterface.

Definition at line 82 of file dummy.h.

virtual bool can::DummyInterface::recover ( )
inlinevirtual

Recover interface after errors and emergency stops

Returns
true if device was recovered succesfully, false otherwise

Implements can::DriverInterface.

Definition at line 64 of file dummy.h.

virtual void can::DummyInterface::run ( )
inlinevirtual

Implements can::DriverInterface.

Definition at line 80 of file dummy.h.

virtual bool can::DummyInterface::send ( const Frame msg)
inlinevirtual

enqueue frame for sending

Parameters
[in]msgmessage to be enqueued
Returns
true if frame was enqueued succesfully, otherwise false

Implements can::CommInterface.

Definition at line 43 of file dummy.h.

virtual void can::DummyInterface::shutdown ( )
inlinevirtual

shutdown interface

Returns
true if shutdown was succesful, false otherwise

Implements can::DriverInterface.

Definition at line 68 of file dummy.h.

virtual bool can::DummyInterface::translateError ( unsigned int  internal_error,
std::string &  str 
)
inlinevirtual

Implements can::DriverInterface.

Definition at line 70 of file dummy.h.

Member Data Documentation

FrameDispatcher can::DummyInterface::frame_dispatcher_
private

Definition at line 15 of file dummy.h.

bool can::DummyInterface::loopback_
private

Definition at line 19 of file dummy.h.

Map can::DummyInterface::map_
private

Definition at line 18 of file dummy.h.

State can::DummyInterface::state_
private

Definition at line 17 of file dummy.h.

StateDispatcher can::DummyInterface::state_dispatcher_
private

Definition at line 16 of file dummy.h.


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


socketcan_interface
Author(s): Mathias Lüdtke
autogenerated on Fri May 14 2021 02:59:39