Oakrey.Applications.Dashboards.CAN 1.0.1

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

Oakrey.Applications.Dashboards.CAN

A .NET 10 Windows library for building persistent WPF dashboards from CAN signals decoded with DBC definitions. It connects Oakrey.Applications.DecodingServices.CAN with the shared Oakrey dashboard infrastructure.

Main features

  • Represents a dashboard entry as a validated DBC SignalValue binding.
  • Assigns decoded signals by source device, CAN channel, message identifier, and signal name.
  • Automatically binds an unassigned dashboard item to the first matching CAN source.
  • Prevents duplicate dashboard entries.
  • Loads, appends, saves, and clears JSON dashboard configurations.
  • Publishes configuration-load and collection-change notifications.
  • Provides WPF commands and connection-state notifications through DashboardViewModel.
  • Supports gauge, digital value, bulb, graph, and histogram views.

Architecture

flowchart LR
    Decoder[ICANDecodingService] -->|ReceivedCanMessage| Dashboard[DashboardItemCollection]
    Dashboard --> Items[DashboardItem]
    JSON[IJsonService] <--> Dashboard
    CAN[ICanDeviceService] --> ViewModel[DashboardViewModel]
    Dashboard --> ViewModel

Key types

Type Description
IDashboardService / DashboardItemCollection CAN dashboard contract and persistent observable collection.
DashboardItem Dashboard model tied to a DBC signal and optionally to a specific CAN device and channel.
DashboardViewModel WPF view model exposing dashboard commands, items, and CAN connection state.
IDashboardServiceConfig CAN-specialized configuration contract.
IDashboardServiceManagement CAN-specific item management and decoded-message assignment contract.

Requirements

  • .NET 10 for Windows 10, version 1809 or later
  • WPF
  • A configured ICANDecodingService from Oakrey.Applications.DecodingServices.CAN
  • A configured ICanDeviceService from Oakrey.Applications.Ohm.CAN
  • Configured IJsonService and IAppConfigPath implementations

Installation

.NET CLI

dotnet add package Oakrey.Applications.Dashboards.CAN

Package Manager Console

Install-Package Oakrey.Applications.Dashboards.CAN

NuGet Package Manager

Search for Oakrey.Applications.Dashboards.CAN in Tools > NuGet Package Manager > Manage NuGet Packages for Solution.

Registration

Register one collection instance for both the concrete and interface service types:

services.AddSingleton<DashboardItemCollection>();
services.AddSingleton<IDashboardService>(provider =>
    provider.GetRequiredService<DashboardItemCollection>());
services.AddTransient<DashboardViewModel>();

Example usage

Create an unassigned item and feed decoded CAN updates into the dashboard:

dashboardService.Add(signal);

IDisposable updateSubscription = decodingService.MessageUpdated.Subscribe(
    dashboardService.AssignMessageSignalsToItems);

The first matching message binds an unassigned item to its device and channel. Later messages update only the item with the same device, channel, DBC message ID, and signal name. To pin an item immediately, provide the device serial number and channel when adding it:

dashboardService.Add(signal, relatedDevice: "device-serial", relatedChannel: 0);

Load the default configuration or observe items loaded during preload:

IDisposable loadedSubscription = dashboardService.ItemsLoaded.Subscribe(items =>
{
    Console.WriteLine($"Loaded {items.Count} CAN dashboard items.");
});

await dashboardService.LoadDashboardConfig(cancellationToken);

The default configuration is stored as userDashboardCan.json below the configured application-data path. Dispose subscriptions when no longer needed and dispose the dashboard collection during application shutdown.

Project information

Field Value
Author Oakrey
License MIT
Target framework net10.0-windows10.0.17763.0
NuGet package Oakrey.Applications.Dashboards.CAN
Repository https://dev.azure.com/oakrey/OpenPackages/_git/ApplicationServices

License

This project is licensed under the MIT License. See the repository's LICENSE file for details.

Product Compatible and additional computed target framework versions.
.NET net10.0-windows10.0.17763 is compatible. 
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
1.0.1 58 9/4/2026
1.0.0 62 9/4/2026