Crate can_socket

Source
Expand description

CAN socket

This library exposes a CanSocket and related types, allowing you to communicate over a Controller Area Network (CAN) bus.

The is a standard blocking or non-blocking CanSocket, and an asynchronous tokio::CanSocket.

This library uses the SocketCAN interface and only works on Linux.

Supported features:

  • Bind sockets to specific interfaces by name or index.
  • Bind sockets to all CAN interfaces at the same time.
  • Send and receive data frames and RTR frames.
  • Send and receive standard frames and extended frames.
  • Setting per-socket filters.
  • Control over the loopback and recv_own_msgs options.
  • Constructing compile-time checked CAN IDs.

Modules§

Macros§

Structs§

Enums§

  • A CAN ID, either standard (11 bit) or extended (29 bits).

Constants§

Traits§

  • Trait for types that can be used as a timeout or deadline.