DiagKit.VectorCdd 1.0.0

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

DiagKit.VectorCdd

License: Apache 2.0 NuGet .NET

A C# library for reading Vector CANoe .cdd files (CANdela Diagnostic Description) and decoding raw UDS diagnostic bytes into human-readable values.

.cdd files are XML documents based on the CANDELA schema. VectorCdd deserializes that XML into a typed object model, wires cross-references, and applies the data type definitions found in the file to convert diagnostic payloads.

Requirements

  • .NET 10.0 SDK
  • MSTest for the test project

Install

dotnet add package DiagKit.VectorCdd

Build And Test

dotnet restore DiagKit.VectorCdd.slnx
dotnet build DiagKit.VectorCdd.slnx
dotnet test DiagKit.VectorCdd.slnx
dotnet test DiagKit.VectorCdd.slnx --filter "TestCategory!=Integration"
dotnet pack src/VectorCdd/VectorCdd.csproj -c Release

Integration tests expect private .cdd fixtures configured through ref/cdd-files.json outside the public repository. Public CI runs non-integration tests by default.

Quick Start

using DiagKit.VectorCdd.Common;
using DiagKit.VectorCdd.XmlParser;

var xml = File.ReadAllText("sample.cdd");
var candela = xml.DeserializeXmlToObject<CanDela>();

// Wire cross-references such as dtref links.
candela.SetCanDelaReference();

// Optional: choose the language used by Name/Description/TextTable lookups.
candela.Language = "en-US";

var did = candela.EcuDocument.DataIdentities.DataIdentities
    .First(d => d.DataIdentityValue == 0xF190);

var result = did.Convert(Convert.FromHexString("01020304"));
Console.WriteLine(result.DisplayText());

Object Model

Most CDD model objects derive from CanDelaBase and General.

  • CanDelaBase stores a reference to the root CanDela document.
  • General exposes common CANDELA attributes such as id, oid, temploid, NAME, DESC, QUAL, and dtref.
  • CanDela.SetCanDelaReference() should be called after deserialization so reference properties can resolve linked objects.

Decoding Model

The DataTypes namespace contains the conversion engine:

  • ValueType interprets bytes as unsigned/signed integers, BCD, floats, ASCII, or Unicode using the CDD byte order and display format.
  • Identity passes decoded values through without physical conversion.
  • Linear applies physical = (code * factor / divisor) + offset and validates configured ranges.
  • TextTable maps numeric values to localized text.
  • Packet decodes structured data objects in sequence.
  • BitsField decodes bit-level structures.
  • Multiplexer selects a structure based on a selector value.

All decodable objects implement IConvert.Convert(byte[] rawData) and return BaseDataType.ConvertResult.

Language Selection

Language selection is instance-based. Set CanDela.Language to choose the default language for a parsed document. Individual General-derived objects can set their own Language override.

This replaces the old global General.Language behavior so multiple CDD documents can be decoded concurrently without changing each other's localized text.

Error Handling

Expected input or CDD-domain issues are returned as unsuccessful ConvertResult values with an error type and message. Programming errors, unsupported model shapes, and corrupted object state throw exceptions so callers keep the original stack trace.

License

This project is licensed under the Apache License 2.0. See LICENSE.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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.
  • net10.0

    • No dependencies.

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.0 87 5/13/2026
1.0.0-preview.1 53 5/13/2026

Automatically parse DID data content from .cdd files.