Crate host_can

Crate host_can 

Source
Expand description

A library for talking to CAN adapters on different platforms (MacOS via PCANBasic and Linux via socketcan currently).

NOTE: this is an early development version and APIs are not yet stabilized.

§Platforms and Adapters

  • MacOS
  • Linux
    • Uses SocketCAN interface, all adapters with kernel drivers supported

§Usage

Add host-can to your project, specifying the pcan (MacOS) or socketcan (Linux) feature:

cargo add host-can --features=<pcan | socketcan>

See the tests/ directory for example code.

§TODO

  • Async APIs
  • CanFD support
  • Timestamp support
  • Adapter-specific APIs for device control/queries
  • More tests / docs / examples

Modules§

adapter
CAN Adapter Interface
frame
id