Oakrey.HardwareManager.Client.CANEmulator 5.1.0

dotnet add package Oakrey.HardwareManager.Client.CANEmulator --version 5.1.0
                    
NuGet\Install-Package Oakrey.HardwareManager.Client.CANEmulator -Version 5.1.0
                    
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="Oakrey.HardwareManager.Client.CANEmulator" Version="5.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Oakrey.HardwareManager.Client.CANEmulator" Version="5.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Oakrey.HardwareManager.Client.CANEmulator" />
                    
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 Oakrey.HardwareManager.Client.CANEmulator --version 5.1.0
                    
#r "nuget: Oakrey.HardwareManager.Client.CANEmulator, 5.1.0"
                    
#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 Oakrey.HardwareManager.Client.CANEmulator@5.1.0
                    
#: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=Oakrey.HardwareManager.Client.CANEmulator&version=5.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Oakrey.HardwareManager.Client.CANEmulator&version=5.1.0
                    
Install as a Cake Tool

Oakrey.HardwareManager.Client.CANEmulator

.NET 11 client for controlling CAN Emu devices through Oakrey HardwareManager.

Usage

using Oakrey.HardwareManager.Client.CANEmulator;

CancellationToken cancellationToken = CancellationToken.None;
var devices = await CanEmulatorClientFactory.GetAvailableDevices(cancellationToken);
var deviceId = devices.First().DeviceId!;

using ICanEmulatorClient emulator = await CanEmulatorClientFactory.GetDevice(deviceId, cancellationToken);
await emulator.WriteInputValue(index: 0, value: 123, cancellationToken);
await emulator.UploadEmulation(@"C:\Emulations\simulation.hex", cancellationToken);
Console.WriteLine($"Device: {emulator.Info.DeviceId}, CRC: {emulator.Info.SimCrc}");

WriteInputValue uses the virtual port's portindex and a raw unsigned 16-bit value (0–65535). Apply any profile scale and offset before calling it if your application works with physical values.

UploadEmulation reads a HEX file on the client computer and streams it to the /canemu hub in 16 KiB blocks. The maximum file size is 16 MiB. The server uploads the received file to the connected device and removes its temporary copy on success or failure. A successful operation refreshes Info.SimCrc and device metadata.

Cancellation interrupts transfer or waiting for the result. Once device programming has started, it continues even if the client cancels or disconnects. Keep the device connected until programming finishes.

The channel-free GetDevice(deviceId, cancellationToken) overload selects a CAN Emu device. Existing overloads with a channel parameter remain available for source compatibility. To supply a license explicitly, use GetDevice(deviceId, licenseId, cancellationToken). GetFirstDevice selects the first connected CAN Emu device. HardwareManager still validates the license when connecting.

Device and transfer failures are returned through the awaited tasks. Calls on a disconnected client fail immediately.

Integration checks

From the repository root:

dotnet run --project Tests/CanEmulator.IntegrationTests/CanEmulator.IntegrationTests.csproj

The checks start a local SignalR server on a dynamic loopback port and use a fake emulator. No CAN Emu hardware is required.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Oakrey.HardwareManager.Client.CANEmulator:

Package Downloads
Oakrey.HardwareManager.Plugin.Base

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.1.0 80 12/1/2026
5.0.0 122 11/15/2026
4.0.1 212 6/30/2026
4.0.0 183 3/6/2026
1.1.1 132 2/27/2026
1.1.0 157 1/9/2026