Published packages:
- CanKit.Abstractions 0.5.5
- CanKit.Core 0.5.5
- CanKit.Adapter.ControlCAN 0.5.5
- CanKit.Adapter.Kvaser 0.5.5
- CanKit.Adapter.PCAN 0.5.5
- CanKit.Adapter.SocketCAN 0.5.5
- CanKit.Adapter.Vector 0.5.5
- CanKit.Adapter.Virtual 0.5.5
- CanKit.Adapter.ZLG 0.5.5
- Support for ZlgCloud (ZlgCAN cloud devices), including device discovery and connection.
FrameObservedevent as the preferred replacement forFrameReceived, to make theCanFramelifecycle clearer.
- Improved cancellation handling in CAN bus poll loops.
FrameReceivedis now marked asObsoletein favor ofFrameObserved, but remains available for backward compatibility.
- Echo transmission in ZLGCAN when operating in CAN 2.0 mode.
- None.
- None.
FaultOccurredevent for reporting unrecoverable faults.CanExceptionPolicyto standardize how adapter and receive exceptions are classified and handled.
- Removed the duplicated and unused
ZCAN_PCIE_CANFD_200Uentry and implementation.
CancellationTokenSourcedisposal whenCanBusis disposed or a receive task stops after an exception.- Subscriber callback isolation so exceptions in
FrameReceiveandErrorOccurredhandlers do not stop the receive loop.
- None.
- None.
- None.
- Tightened frame-length validation across all adapters so that incoming frames cannot exceed the underlying buffer or protocol limits. Invalid frames are now handled defensively instead of propagating unexpected sizes to the application.
ArrayPoolBufferAllocatorMemorylength: Fixed an issue where the createdMemoryslice could expose aLengthgreater than the size of the rented buffer.- SocketCAN Classic receive payload size: Corrected the maximum application data length for Classic CAN frames in the SocketCAN receive path from 64 bytes to 8 bytes.
- Adapter receive robustness: Added length constraints to the
Receiveimplementations of other adapters to prevent exceptions when the underlying interface returns malformed or oversized data.
- None.
- None.
- ZlgCAN USBCANFD bitrate in CAN 2.0 mode: Fixed an issue where the ZLGCAN USBCANFD series could not have its bitrate configured while operating in CAN 2.0 mode.
CanFrameremote frame flag handling: Fixed a bug where setting the remote frame flag when constructing aCanFramewould overwrite other flag bits.
- None.
- Vector device enumeration: Added helpers to query available Vector devices (filters by AppName
"CANoe").
SocketCanBusTX path: Optimized the send logic to reduce GC allocations and overhead.- Adapter registration: Refactored registration patterns and entry points to leave room for upcoming Transport/Protocol layers (ISO-TP work in progress).
VectorBusaccessMask: Corrected the way theaccessMaskis obtained.
- Lower allocations on transmit via the optimized
SocketCanBussend path.
- None.
CanKit.Abstractions: New project with a corresponding NuGet package.- Receive payload allocator:
CanBusreceive path now supports anIBufferAllocatorforCanFramepayloads to optimize memory usage and reduce GC. Two default implementations are included:ArrayPoolBufferAllocatorandDefaultBufferAllocator. - Queued transmission: Introduced
QueuedCanBusthat adds a TX queue to any existing bus. Create viaICanBus.WithQueuedTx(QueuedCanBusOptions).
- Timing source: ZLG and SocketCAN adapters now use
Stopwatchinstead ofEnvironment.TickCountfor more stable timing.
- Lower allocations on receive via the allocator-based payload path.
- Fewer conversions in hot paths thanks to a unified frame type (see breaking changes).
- Unified frame type: Removed
ICanFrame,CanClassicFrame, andCanFdFrame. Introduced a singleCanFramefor all CAN frame kinds. Create frames usingCanFrame.Classic(...),CanFrame.Fd(...), orCanFrame.Create(...).
VectorandControlCANadapters are now supported.- ZLG: Automatic detection of the hardware auto-send/throughput limit to prevent oversend scenarios.
- Reworked the background async read task for better efficiency and stability.
- Reduced value-copy costs for several method parameters to cut unnecessary allocations and CPU usage.
- Eliminated a race condition when starting and stopping the background read task during initialization/shutdown.
- None.
- Added
MaskFilterandRangeFilterenums toCanFeaturefor more precise device capability detection.
- Added exception handling around
Endpoint.Enumerate()to prevent crashes when the required driver is not installed. - Revised the criteria for software-substitute filtering on ZLG adapters to make the filtering semantics explicit.
- Query device capabilities before opening a device via
CanBus.QueryCapabilities("kvaser://0"). - More
Transmit/TransmitAsyncoverloads for easier and faster sending. - WPF Listener sample with a simple transmit dialog for quick RX/TX experimentation.
- Updated README with examples, including the new capability query snippet.
- Fake Backend: Introduced a mock backend implementation for easier unit testing and integration simulation.
NativeHandleinICanBus: Allows direct access to the underlying native handle for advanced scenarios and custom native library calls.uintoverload forAccMaskinIBusInitOptionsConfiguratorfor more flexibility in bus initialization options.
- Expanded and improved unit test coverage for better reliability and maintainability.
- Optimized ZLG adapter and SocketCAN adapter performance for faster and more stable communication.
- Fixed multiple issues across all adapters, improving overall stability and compatibility.
- None. Starting from this release, the API is considered stable. Future updates will not introduce breaking changes unless explicitly noted.
- Fixed
VirtualBusreceive handling. - Ensured adapters throw consistent disposal exceptions to prevent stuck listeners.
- Corrected
ZlgCanBusFrameReceivedbehavior so subscriptions receive frames as expected.
- Reworked SocketCAN receive loops, reducing overhead and improving throughput under load.
- Optimized Kvaser/PCAN transmit, yielding faster benchmarks; removed timeout logic from PCAN/Kvaser transceivers.
- Adjusted public APIs to better match common usage patterns.
- Added
Custom(key, value)to pass adapter-specific parameters directly.
- Reduced GC pressure in transmit/receive across all adapters.
- Improved receive path for Kvaser and PCAN to increase throughput.