Lely core libraries  1.9.2
doc/can/overview.md
1 CAN library overview
2 ====================
3 
4 The generic CAN message type is struct #can_msg (see lely/can/msg.h). This
5 struct can represent both CAN and CAN FD frames (if CAN FD support is enabled).
6 The #can_msg struct does not correspond to any specific driver or interface.
7 Conversion functions to and from IXXAT VCI V4 and SocketCAN can be found in
8 lely/can/vci.h and lely/can/socket.h, respectively.
9 
10 The CAN bus is a broadcast bus, so each node receives all messages. Applications
11 typically only listen to messages with a specific CAN identifier. The CAN
12 network interface (#can_net_t, see lely/can/net.h) assists the user with
13 processing CAN frames by allowing callback functions to be registered for
14 individual CAN identifiers (#can_recv_t). Additionally, callback functions can
15 be registered to be invoked at specific times (#can_timer_t). The CAN network
16 interface is passive, relying on the application to feed it CAN frames or notify
17 it of the current time. A C++ interface can be found in lely/can/net.hpp.
18 
19 When processing CAN frames it is often necessary to buffer incoming or outgoing
20 messages. A thread-safe, lock-free circular buffer (#can_buf) is provided in
21 lely/can/buf.h (see lely/can/buf.hpp for the C++ interface).
22