DiagKit.VectorCdd
1.0.0
dotnet add package DiagKit.VectorCdd --version 1.0.0
NuGet\Install-Package DiagKit.VectorCdd -Version 1.0.0
<PackageReference Include="DiagKit.VectorCdd" Version="1.0.0" />
<PackageVersion Include="DiagKit.VectorCdd" Version="1.0.0" />
<PackageReference Include="DiagKit.VectorCdd" />
paket add DiagKit.VectorCdd --version 1.0.0
#r "nuget: DiagKit.VectorCdd, 1.0.0"
#:package DiagKit.VectorCdd@1.0.0
#addin nuget:?package=DiagKit.VectorCdd&version=1.0.0
#tool nuget:?package=DiagKit.VectorCdd&version=1.0.0
DiagKit.VectorCdd
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.
CanDelaBasestores a reference to the rootCanDeladocument.Generalexposes common CANDELA attributes such asid,oid,temploid,NAME,DESC,QUAL, anddtref.CanDela.SetCanDelaReference()should be called after deserialization so reference properties can resolve linked objects.
Decoding Model
The DataTypes namespace contains the conversion engine:
ValueTypeinterprets bytes as unsigned/signed integers, BCD, floats, ASCII, or Unicode using the CDD byte order and display format.Identitypasses decoded values through without physical conversion.Linearappliesphysical = (code * factor / divisor) + offsetand validates configured ranges.TextTablemaps numeric values to localized text.Packetdecodes structured data objects in sequence.BitsFielddecodes bit-level structures.Multiplexerselects 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 | Versions 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. |
-
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.