CANOpenSharp 0.1.1
dotnet add package CANOpenSharp --version 0.1.1
NuGet\Install-Package CANOpenSharp -Version 0.1.1
<PackageReference Include="CANOpenSharp" Version="0.1.1" />
<PackageVersion Include="CANOpenSharp" Version="0.1.1" />
<PackageReference Include="CANOpenSharp" />
paket add CANOpenSharp --version 0.1.1
#r "nuget: CANOpenSharp, 0.1.1"
#:package CANOpenSharp@0.1.1
#addin nuget:?package=CANOpenSharp&version=0.1.1
#tool nuget:?package=CANOpenSharp&version=0.1.1
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 | Versions 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. |
-
net8.0
- ini-parser (>= 2.5.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.