cisst-saw
|
A BitCtrl CAN device. More...
#include <osaBitCtrl.h>
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... | |
![]() | |
osaCANBus (osaCANBus::Rate rate, osaCANBus::Loopback loopback=osaCANBus::LOOPBACK_OFF) | |
Default constructor. More... | |
virtual | ~osaCANBus () |
Default destructor. More... | |
Additional Inherited Members | |
![]() | |
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 } |
![]() | |
osaCANBus::Rate | rate |
The rate of the device. More... | |
osaCANBus::Loopback | loopback |
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.
osaBitCtrl::osaBitCtrl | ( | const std::string & | candevname, |
osaCANBus::Rate | rate | ||
) |
osaBitCtrl::~osaBitCtrl | ( | ) |
|
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.
|
virtual |
Close the CAN device.
Implements osaCANBus.
|
virtual |
Open the CAN device.
Implements osaCANBus.
|
virtual |
Receive a CAN frame.
Call this method to receive a CAN frame. The method can be blocking.
frame[out] | The CAN frame received from the bus |
block | Block the device until a CAN frame is received |
Implements osaCANBus.
|
virtual |
Send a CAN frame on the bus.
Call this method to send a CAN frame on the bus. The method can be blocking
frame[in] | The CAN frame to send on the bus |
block | Block the device until the operation is completed |
Implements osaCANBus.