Suucha.Can Documentation

Welcome to Suucha.Can - Modern, type-safe, and high-performance .NET wrapper for CAN devices.

📦 Features

  • 🎯 Type-Safe API - No more IntPtr and manual marshaling
  • 🔒 Resource Management - Automatic disposal with IDisposable pattern
  • 🚀 High Performance - Zero-allocation receive paths
  • 📦 Multi-Device Support - Extensible architecture for all ZLG device families
  • 🔄 Async/Await - Modern asynchronous programming support
  • 💻 Multi-Architecture - Supports both x86 (32-bit) and x64 (64-bit)

📋 Quick Start

Installation

dotnet add package Suucha.Can.Zlg.Devices

Basic Usage

using Suucha.Can.Core.Models;
using Suucha.Can.Zlg.Devices;

// Open device
using var device = new ZlgCanDevice(DeviceType.USBCAN2, deviceIndex: 0);
device.Open();

// Configure and open channel
var config = ChannelConfig.Standard250K();
using var channel = device.OpenChannel(channelIndex: 0, config);

// Start receiving
channel.MessageReceived += (sender, frame) =>
{
    Console.WriteLine($"Received: ID=0x{frame.Id:X3}");
};

channel.Start();

// Send a message
var message = new CanFrame
{
    Id = 0x123,
    Data = new byte[] { 0x11, 0x22, 0x33, 0x44 }
};

await channel.SendAsync(message);

📚 Documentation Sections

Getting Started

Learn how to install and use Suucha.Can in your project.

API Reference

Complete API documentation generated from source code.

Guides

In-depth guides for common scenarios.

Examples

Real-world code examples.

🤝 Contributing

We welcome contributions! Please see our Contributing Guide.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.