feat: Add Kvaser CANlib Windows plugin for virtual and physical CAN devices#631
feat: Add Kvaser CANlib Windows plugin for virtual and physical CAN devices#631arcostasi wants to merge 3 commits intoOpen-Agriculture:mainfrom
Conversation
hardware_integration/include/isobus/hardware_integration/obsolete.h
Outdated
Show resolved
Hide resolved
hardware_integration/include/isobus/hardware_integration/canlib.h
Outdated
Show resolved
Hide resolved
…ders - Rename CAN_DRIVER option from WindowsCANlib to WindowsKvaserCANlib for clarity - Remove obsolete.h header file (not needed) - Remove obsolete.h include from canlib.h - Apply clang-format to all modified files - Keep only essential headers: canlib.h, canstat.h, canevt.h, predef.h Addresses review feedback from PR Open-Agriculture#631
…ders - Rename CAN_DRIVER option from WindowsCANlib to WindowsKvaserCANlib for clarity - Remove obsolete.h header file (not needed) - Remove obsolete.h include from canlib.h - Apply clang-format to all modified files - Keep only essential headers: canlib.h, canstat.h, canevt.h, predef.h Addresses review feedback from PR Open-Agriculture#631
3014f5c to
102bc3c
Compare
…ders - Rename CAN_DRIVER option from WindowsCANlib to WindowsKvaserCANlib for clarity - Remove obsolete.h header file (not needed) - Remove obsolete.h include from canlib.h - Apply clang-format to all modified files - Keep only essential headers: canlib.h, canstat.h, canevt.h, predef.h Addresses review feedback from PR Open-Agriculture#631
102bc3c to
6abd804
Compare
|
Hi @martonmiklos, thank you for the review feedback! I've made all the requested changes: ✅ Removed Please let me know if there's anything else that needs to be adjusted. |
|
Hi @arcostasi, thanks for your PR. Really nice to see Kvaser support being added! I have used their controllers in the past and liked it. However, we should be careful with including their header files, especially since they are not MIT licensed! See here. Hence I think we should try to link the headers dynamically when the SDK is installed, like we do with NTCAN here: AgIsoStack-plus-plus/hardware_integration/CMakeLists.txt Lines 320 to 327 in 736f6f9 |
Summary
This PR adds support for Kvaser CANlib devices on Windows, including virtual CAN channels which are useful for development and testing without physical hardware.
Changes
CANLibWindowsPluginclass implementing theCANHardwarePlugininterface.canlib.hcanstat.hcanevt.hpredef.hobsolete.hcanlib32.libcanlib32.dll(supports both x86 and x64)
Build System
CMakeLists.txtto support the newWindowsCANlibdriver.Driver Registration
available_can_drivers.hpp.Usage
cmake -B build -DCAN_DRIVER=WindowsCANlib -G "Visual Studio 17 2022" -A x64 cmake --build build --config Release