CANOpenSharp 0.1.1

dotnet add package CANOpenSharp --version 0.1.1
                    
NuGet\Install-Package CANOpenSharp -Version 0.1.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CANOpenSharp" Version="0.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CANOpenSharp" Version="0.1.1" />
                    
Directory.Packages.props
<PackageReference Include="CANOpenSharp" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CANOpenSharp --version 0.1.1
                    
#r "nuget: CANOpenSharp, 0.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CANOpenSharp@0.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CANOpenSharp&version=0.1.1
                    
Install as a Cake Addin
#tool nuget:?package=CANOpenSharp&version=0.1.1
                    
Install as a Cake Tool

CANOpenSharp

A modern .NET 8.0 library for simple CANOpen Communication. Barebones, just enough to interface with CANOpen Devices, does not act as a CANOpen Device itself, though that functionality is possible.

Features

  • CANopen Protocol Support: Barebones implimentation of CANOpen.
  • EDS File Parsing: Parse Electronic Data Sheet (EDS) files to automatically configure device object dictionaries
  • SocketCAN Interface: Native Linux SocketCAN support for CAN bus communication
  • Object Dictionary Management: Complete object dictionary implementation with type-safe data access
  • Node Management: Manage multiple CANopen nodes in a network
  • Frame Handling: Comprehensive CAN frame creation, parsing, and manipulation
  • Asynchronous Operations: Modern async/await patterns for non-blocking communication
  • Type Safety: Strongly typed data types for CANopen objects

Installation

Install the package via NuGet Package Manager:

dotnet add package CANOpenSharp

Or via Package Manager Console:

Install-Package CANOpenSharp

Requirements

  • .NET 8.0 or higher
  • Linux operating system (for SocketCAN support)
  • CAN interface hardware

Quick Start

Basic Network Setup

using CANOpenSharp;

// Create a new CAN network
var network = new CanNetwork(CanInterface.SocketCan, "can0");

// Connect to the CAN interface
await network.Connect();

// Add a node with an EDS file
network.AddNode(1, "Path/to/device.eds");

Core Components

CanNetwork

The main class for managing CANopen networks. Handles connection to CAN interfaces and manages multiple nodes.

CanNode

Represents a device in the CAN network with its associated object dictionary parsed from EDS files.

CanFrame

Represents a CAN frame with ID, data length code (DLC), and data payload.

CanObjectDictionary

Contains all objects and their attributes defined in EDS files, providing structured access to device parameters.

EdsParser

Parses Electronic Data Sheet (EDS) files to create object dictionaries for CANopen devices.

Platform Support

Currently supports:

  • Linux: Full SocketCAN support
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.1 3,433 7/9/2025
0.1.0 201 7/2/2025