cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
osaBitCtrl Class Reference

A BitCtrl CAN device. More...

#include <osaBitCtrl.h>

Inheritance diagram for osaBitCtrl:
osaCANBus

Public Member Functions

 osaBitCtrl (const std::string &candevname, osaCANBus::Rate rate)
 
 ~osaBitCtrl ()
 
osaCANBus::Errno Open ()
 Open the CAN device. More...
 
osaCANBus::Errno Close ()
 Close the CAN device. More...
 
osaCANBus::Errno Send (const osaCANBusFrame &frame, osaCANBus::Flags flags=osaCANBus::MSG_NOFLAG)
 Send a CAN frame on the bus. More...
 
osaCANBus::Errno Recv (osaCANBusFrame &frame, osaCANBus::Flags flags=osaCANBus::MSG_NOFLAG)
 Receive a CAN frame. More...
 
osaCANBus::Errno AddFilter (const osaCANBus::Filter &)
 Add a CAN filter to the device. More...
 
- Public Member Functions inherited from osaCANBus
 osaCANBus (osaCANBus::Rate rate, osaCANBus::Loopback loopback=osaCANBus::LOOPBACK_OFF)
 Default constructor. More...
 
virtual ~osaCANBus ()
 Default destructor. More...
 

Additional Inherited Members

- Public Types inherited from osaCANBus
enum  Rate { RATE_150 =150000, RATE_300 =300000, RATE_1000 =1000000 }
 The different CAN rates. More...
 
enum  Errno { ESUCCESS, EFAILURE }
 The different CAN rates. More...
 
enum  Flags { MSG_NOFLAG = 0x00, MSG_CONFIRM = 0x01, MSG_DONTWAIT = 0x02 }
 
enum  Loopback { LOOPBACK_ON, LOOPBACK_OFF }
 
- Protected Attributes inherited from osaCANBus
osaCANBus::Rate rate
 The rate of the device. More...
 
osaCANBus::Loopback loopback
 

Detailed Description

A BitCtrl CAN device.

This implements a CAN device based on the BitCtrl driver. It's not really a driver since it only provides an API and uses ISO C read/write.

Constructor & Destructor Documentation

osaBitCtrl::osaBitCtrl ( const std::string &  candevname,
osaCANBus::Rate  rate 
)
osaBitCtrl::~osaBitCtrl ( )

Member Function Documentation

osaCANBus::Errno osaBitCtrl::AddFilter ( const osaCANBus::Filter filter)
inlinevirtual

Add a CAN filter to the device.

Call this method to add a CAN filter to the device. This is OS and dependant as it typically interacts with the driver to screen CAN frames.

Implements osaCANBus.

osaCANBus::Errno osaBitCtrl::Close ( )
virtual

Close the CAN device.

Implements osaCANBus.

osaCANBus::Errno osaBitCtrl::Open ( )
virtual

Open the CAN device.

Implements osaCANBus.

osaCANBus::Errno osaBitCtrl::Recv ( osaCANBusFrame frame,
osaCANBus::Flags  flags = osaCANBus::MSG_NOFLAG 
)
virtual

Receive a CAN frame.

Call this method to receive a CAN frame. The method can be blocking.

Parameters
frame[out]The CAN frame received from the bus
blockBlock the device until a CAN frame is received

Implements osaCANBus.

osaCANBus::Errno osaBitCtrl::Send ( const osaCANBusFrame frame,
osaCANBus::Flags  flags = osaCANBus::MSG_NOFLAG 
)
virtual

Send a CAN frame on the bus.

Call this method to send a CAN frame on the bus. The method can be blocking

Parameters
frame[in]The CAN frame to send on the bus
blockBlock the device until the operation is completed

Implements osaCANBus.


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