iCub-main
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
yarp::dev::CanBusAccessPoint Class Reference

sharedcan : implements ICanBus interface for multiple access from a single access can driver (for example cfw2can). More...

#include <SharedCanBus.h>

+ Inheritance diagram for yarp::dev::CanBusAccessPoint:

Public Member Functions

 CanBusAccessPoint ()
 
 ~CanBusAccessPoint ()
 
bool hasId (unsigned int id)
 
bool pushReadMsg (CanMessage &msg)
 
virtual bool canGetBaudRate (unsigned int *rate)
 
virtual bool canSetBaudRate (unsigned int rate)
 
virtual bool canIdAdd (unsigned int id)
 
virtual bool canIdDelete (unsigned int id)
 
virtual bool canRead (CanBuffer &msgs, unsigned int size, unsigned int *nmsg, bool wait=false)
 
virtual bool canWrite (const CanBuffer &msgs, unsigned int size, unsigned int *sent, bool wait=false)
 
virtual CanBuffer createBuffer (int nmessage)
 
virtual void destroyBuffer (CanBuffer &msgs)
 
virtual bool open (yarp::os::Searchable &config)
 
virtual bool close ()
 

Protected Attributes

std::mutex mtx_waitRead
 
std::condition_variable cv_waitRead
 
std::mutex synchroMutex
 
bool waitingOnRead
 
unsigned int nRecv
 
CanBuffer readBuffer
 
char * reqIds
 
unsigned int mBufferSize
 
SharedCanBusmSharedPhysDevice
 

Detailed Description

sharedcan : implements ICanBus interface for multiple access from a single access can driver (for example cfw2can).

It wraps the low level device driver (physdevice in the configuration file) in a higher level, multiple access virtual device driver.

YARP device name
sharedcan

Definition at line 50 of file SharedCanBus.h.

Constructor & Destructor Documentation

◆ CanBusAccessPoint()

yarp::dev::CanBusAccessPoint::CanBusAccessPoint ( )
inline

Definition at line 56 of file SharedCanBus.h.

◆ ~CanBusAccessPoint()

yarp::dev::CanBusAccessPoint::~CanBusAccessPoint ( )
inline

Definition at line 71 of file SharedCanBus.h.

Member Function Documentation

◆ canGetBaudRate()

bool yarp::dev::CanBusAccessPoint::canGetBaudRate ( unsigned int *  rate)
virtual

Definition at line 421 of file SharedCanBus.cpp.

◆ canIdAdd()

bool yarp::dev::CanBusAccessPoint::canIdAdd ( unsigned int  id)
virtual

Definition at line 428 of file SharedCanBus.cpp.

◆ canIdDelete()

bool yarp::dev::CanBusAccessPoint::canIdDelete ( unsigned int  id)
virtual

Definition at line 445 of file SharedCanBus.cpp.

◆ canRead()

virtual bool yarp::dev::CanBusAccessPoint::canRead ( CanBuffer &  msgs,
unsigned int  size,
unsigned int *  nmsg,
bool  wait = false 
)
inlinevirtual

Definition at line 116 of file SharedCanBus.h.

◆ canSetBaudRate()

virtual bool yarp::dev::CanBusAccessPoint::canSetBaudRate ( unsigned int  rate)
inlinevirtual

Definition at line 107 of file SharedCanBus.h.

◆ canWrite()

bool yarp::dev::CanBusAccessPoint::canWrite ( const CanBuffer &  msgs,
unsigned int  size,
unsigned int *  sent,
bool  wait = false 
)
virtual

Definition at line 414 of file SharedCanBus.cpp.

◆ close()

bool yarp::dev::CanBusAccessPoint::close ( )
virtual

Definition at line 405 of file SharedCanBus.cpp.

◆ createBuffer()

yarp::dev::CanBuffer yarp::dev::CanBusAccessPoint::createBuffer ( int  nmessage)
virtual

Definition at line 462 of file SharedCanBus.cpp.

◆ destroyBuffer()

void yarp::dev::CanBusAccessPoint::destroyBuffer ( CanBuffer &  msgs)
virtual

Definition at line 471 of file SharedCanBus.cpp.

◆ hasId()

bool yarp::dev::CanBusAccessPoint::hasId ( unsigned int  id)
inline

Definition at line 78 of file SharedCanBus.h.

◆ open()

bool yarp::dev::CanBusAccessPoint::open ( yarp::os::Searchable &  config)
virtual

Definition at line 390 of file SharedCanBus.cpp.

◆ pushReadMsg()

bool yarp::dev::CanBusAccessPoint::pushReadMsg ( CanMessage &  msg)
inline

Definition at line 83 of file SharedCanBus.h.

Member Data Documentation

◆ cv_waitRead

std::condition_variable yarp::dev::CanBusAccessPoint::cv_waitRead
protected

Definition at line 169 of file SharedCanBus.h.

◆ mBufferSize

unsigned int yarp::dev::CanBusAccessPoint::mBufferSize
protected

Definition at line 179 of file SharedCanBus.h.

◆ mSharedPhysDevice

SharedCanBus* yarp::dev::CanBusAccessPoint::mSharedPhysDevice
protected

Definition at line 181 of file SharedCanBus.h.

◆ mtx_waitRead

std::mutex yarp::dev::CanBusAccessPoint::mtx_waitRead
protected

Definition at line 168 of file SharedCanBus.h.

◆ nRecv

unsigned int yarp::dev::CanBusAccessPoint::nRecv
protected

Definition at line 174 of file SharedCanBus.h.

◆ readBuffer

CanBuffer yarp::dev::CanBusAccessPoint::readBuffer
protected

Definition at line 175 of file SharedCanBus.h.

◆ reqIds

char* yarp::dev::CanBusAccessPoint::reqIds
protected

Definition at line 177 of file SharedCanBus.h.

◆ synchroMutex

std::mutex yarp::dev::CanBusAccessPoint::synchroMutex
protected

Definition at line 170 of file SharedCanBus.h.

◆ waitingOnRead

bool yarp::dev::CanBusAccessPoint::waitingOnRead
protected

Definition at line 172 of file SharedCanBus.h.


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