Libbarrett  1.2.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Defines
Classes | Public Member Functions | Protected Member Functions | Protected Attributes
barrett::bus::BusManager Class Reference
Inheritance diagram for barrett::bus::BusManager:
barrett::bus::CommunicationsBus

List of all members.

Classes

struct  Message
class  MessageBuffer

Public Member Functions

 BusManager (CommunicationsBus *bus=NULL)
 BusManager (int port)
const CommunicationsBusgetUnderlyingBus () const
virtual thread::MutexgetMutex () const
virtual void open (int port)
virtual void close ()
virtual bool isOpen () const
virtual int send (int busId, const unsigned char *data, size_t len) const
virtual int receive (int expectedBusId, unsigned char *data, size_t &len, bool blocking=true, bool realtime=false) const
virtual int receiveRaw (int &busId, unsigned char *data, size_t &len, bool blocking=true) const

Protected Member Functions

int updateBuffers () const
void storeMessage (int busId, const unsigned char *data, size_t len) const
bool retrieveMessage (int busId, unsigned char *data, size_t &len) const

Protected Attributes

CommunicationsBusbus
bool deleteBus

Constructor & Destructor Documentation

BusManager Constructors and Destructors


Member Function Documentation

virtual void barrett::bus::BusManager::close ( ) [inline, virtual]

close Method destroys the communication port on CANBus

Implements barrett::bus::CommunicationsBus.

virtual thread::Mutex& barrett::bus::BusManager::getMutex ( ) const [inline, virtual]

Destructor

Implements barrett::bus::CommunicationsBus.

getUnderlyingBus pointer returns bus.

virtual bool barrett::bus::BusManager::isOpen ( ) const [inline, virtual]

isOpen Method is flag for available communication on CANBus

Implements barrett::bus::CommunicationsBus.

virtual void barrett::bus::BusManager::open ( int  port) [inline, virtual]

Open Method creates the communication port on CANBus

Implements barrett::bus::CommunicationsBus.

int barrett::bus::BusManager::receive ( int  expectedBusId,
unsigned char *  data,
size_t &  len,
bool  blocking = true,
bool  realtime = false 
) const [virtual]

receive Method is thread safe way to update CANBus messages

Reimplemented from barrett::bus::CommunicationsBus.

virtual int barrett::bus::BusManager::receiveRaw ( int &  busId,
unsigned char *  data,
size_t &  len,
bool  blocking = true 
) const [inline, virtual]

receiveRaw Method works the same as receive but is realtime safe

Implements barrett::bus::CommunicationsBus.

virtual int barrett::bus::BusManager::send ( int  busId,
const unsigned char *  data,
size_t  len 
) const [inline, virtual]

send Method

Implements barrett::bus::CommunicationsBus.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Defines