CanKit.Pro.Addressing
1.2.3
dotnet add package CanKit.Pro.Addressing --version 1.2.3
NuGet\Install-Package CanKit.Pro.Addressing -Version 1.2.3
<PackageReference Include="CanKit.Pro.Addressing" Version="1.2.3" />
<PackageVersion Include="CanKit.Pro.Addressing" Version="1.2.3" />
<PackageReference Include="CanKit.Pro.Addressing" />
paket add CanKit.Pro.Addressing --version 1.2.3
#r "nuget: CanKit.Pro.Addressing, 1.2.3"
#:package CanKit.Pro.Addressing@1.2.3
#addin nuget:?package=CanKit.Pro.Addressing&version=1.2.3
#tool nuget:?package=CanKit.Pro.Addressing&version=1.2.3
CanKit.Pro.Addressing
CAN-ID addressing helpers for CanKit (arc42 "Adressierungs- Helfer"; SRS FR-RAW-040/041): validated 11-bit/29-bit CAN ID construction, J1939 PGN/Priority/ PDU-Format/Source-Address composition and decomposition, J1939 NAME field accessors, and PGN classification helpers, as pure, dependency-free helper functions — no dependency on any other CanKit package.
This generalizes logic that previously only existed as one hard-coded case inside
IsoTpEndpoint.CreateNormalFixed (a single fixed diagnostics PGN) into reusable helpers any
protocol layer (ISO-TP, J1939, CANopen, ...) can call directly.
using CanKit.Pro.Addressing;
// Validated 11/29-bit ID construction (FR-RAW-040)
CanIdRange.ValidateStandard(0x7FF); // ok
CanIdRange.ValidateStandard(0x800); // throws ArgumentOutOfRangeException
// J1939: build a 29-bit ID from priority/PGN/source/destination
var id = J1939Id.ComposePgn(priority: 3, pgn: 0xFED9, sourceAddress: 0x17);
// J1939: decompose a received 29-bit ID
var fields = J1939Id.Decompose(id);
fields.Priority; // 3
fields.Pgn; // 0xFED9
fields.SourceAddress; // 0x17
fields.IsPdu1; // whether PS is a destination address or a Group Extension
fields.DestinationAddress; // null for PDU2 (broadcast-only) PGNs
// J1939: classify common PGNs and TP.CM BAM control bytes
J1939Pgn.IsRequest(0xEA00); // true
J1939Pgn.IsTransportCm(J1939Pgn.TpCm); // true
J1939Pgn.IsBam(J1939Pgn.TpCm, 0x20); // true; BAM is a TP.CM payload control byte
// J1939: compose/decompose a 64-bit NAME and compare address-claim priority
var name = new J1939Name(
identityNumber: 0x155555,
manufacturerCode: 0x5AA,
ecuInstance: 0x5,
functionInstance: 0x12,
function: 0xAB,
reserved: false,
vehicleSystem: 0x35,
vehicleSystemInstance: 0xA,
industryGroup: 0x3,
arbitraryAddressCapable: true);
var sameName = J1939Name.Decompose(name.Value);
J1939Name.CompareClaimPriority(name, sameName); // 0; lower unsigned NAME wins address claiming
CanKit.Pro.RawCan's CanIdFilter also gained an Overlaps(CanIdFilter other) method and
ICanBusService.FindOverlappingFilterSubscriptions() (FR-RAW-041, Should): a diagnostic to catch
misconfigured protocol instances whose ID-range/mask subscriptions were meant to be disjoint but
overlap.
Install
dotnet add package CanKit.Pro.Addressing
No dependencies beyond the .NET base class library.
Part of CanKit.Pro — higher CAN protocol layers built on top of CanKit, which is consumed as a NuGet package rather than forked.
License
MIT — see LICENSE. CanKit itself is a separate project licensed under Apache-2.0; see THIRD-PARTY-NOTICES.md.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
-
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 |
|---|