Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: UAVCAN UAVCAN_Subscriber
ICanDriver Class Reference
Generic CAN driver. More...
#include <can.hpp>
Inherited by CanDriverMock, PairableCanDriver, SocketCanDriver, CanDriver, CanDriver, and VirtualCanDriver< SharedMemoryPoolSize >.
Public Member Functions | |
| virtual ICanIface * | getIface (uint8_t iface_index)=0 |
| Returns an interface by index, or null pointer if the index is out of range. | |
| virtual const ICanIface * | getIface (uint8_t iface_index) const |
| Default implementation of this method calls the non-const overload of getIface(). | |
| virtual uint8_t | getNumIfaces () const =0 |
| Total number of available CAN interfaces. | |
| virtual int16_t | select (CanSelectMasks &inout_masks, const CanFrame *(&pending_tx)[MaxCanIfaces], MonotonicTime blocking_deadline)=0 |
| Block until the deadline, or one of the specified interfaces becomes available for read or write. | |
Detailed Description
Generic CAN driver.
Definition at line 197 of file include/uavcan/driver/can.hpp.
Member Function Documentation
| virtual ICanIface* getIface | ( | uint8_t | iface_index ) | [pure virtual] |
| virtual const ICanIface* getIface | ( | uint8_t | iface_index ) | const [virtual] |
Default implementation of this method calls the non-const overload of getIface().
Can be overriden by the application if necessary.
Definition at line 211 of file include/uavcan/driver/can.hpp.
| virtual uint8_t getNumIfaces | ( | ) | const [pure virtual] |
Total number of available CAN interfaces.
This value shall not change after initialization.
Implemented in SocketCanDriver, CanDriver, and CanDriver.
| virtual int16_t select | ( | CanSelectMasks & | inout_masks, |
| const CanFrame *(&) | pending_tx[MaxCanIfaces], | ||
| MonotonicTime | blocking_deadline | ||
| ) | [pure virtual] |
Block until the deadline, or one of the specified interfaces becomes available for read or write.
Iface masks will be modified by the driver to indicate which exactly interfaces are available for IO.
Bit position in the masks defines interface index.
Note that it is allowed to return from this method even if no requested events actually happened, or if there are events that were not requested by the library.
The pending TX argument contains an array of pointers to CAN frames that the library wants to transmit next, per interface. This is intended to allow the driver to properly prioritize transmissions; many drivers will not need to use it. If a write flag for the given interface is set to one in the select mask structure, then the corresponding pointer is guaranteed to be valid (not UAVCAN_NULLPTR).
- Parameters:
-
[in,out] inout_masks Masks indicating which interfaces are needed/available for IO. [in] pending_tx Array of frames, per interface, that are likely to be transmitted next. [in] blocking_deadline Zero means non-blocking operation.
- Returns:
- Positive number of ready interfaces or negative error code.
Generated on Tue Jul 12 2022 17:17:37 by
1.7.2