CanKit.Pro.J1939Tp
1.2.3
dotnet add package CanKit.Pro.J1939Tp --version 1.2.3
NuGet\Install-Package CanKit.Pro.J1939Tp -Version 1.2.3
<PackageReference Include="CanKit.Pro.J1939Tp" Version="1.2.3" />
<PackageVersion Include="CanKit.Pro.J1939Tp" Version="1.2.3" />
<PackageReference Include="CanKit.Pro.J1939Tp" />
paket add CanKit.Pro.J1939Tp --version 1.2.3
#r "nuget: CanKit.Pro.J1939Tp, 1.2.3"
#:package CanKit.Pro.J1939Tp@1.2.3
#addin nuget:?package=CanKit.Pro.J1939Tp&version=1.2.3
#tool nuget:?package=CanKit.Pro.J1939Tp&version=1.2.3
CanKit.Pro.J1939Tp
SAE J1939-21 Transport Protocol (TP) for CanKit.Pro. Implements both flavors of the J1939-21 §5.10 transport service:
- TP.BAM (Broadcast Announce Message) — one sender pushes an up-to-1785-byte PDU to every node on the bus, no acknowledgement (FR-TP-030).
- TP.CM (Connection Mode: RTS / CTS / EndOfMsgAck / Connection Abort) — point-to-point, with block-size negotiation and end-of-message acknowledgement (FR-TP-031).
TP.DT (Data Transfer) frames carry the segmented payload for both flavors, sequence-numbered from 1 (FR-TP-032). Every session runs on its own actor-owned state and its own set of IDeadlines (T1, T2, T3, T4, Tr, Th — FR-TP-033), so multiple sessions can execute in parallel over the same physical bus (FR-TP-034/035) without interfering with each other.
The channel ships on nuget.org alongside the other CanKit.Pro.* L2/L3 building blocks. It re-uses:
CanKit.Pro.RawCan— oneICanBusServiceper channel to demultiplex the TP.CM / TP.DT frames back out of the shared bus stream and to confirm outbound frames.CanKit.Pro.Actor— oneIProtocolActormailbox for single-writer session state.CanKit.Pro.Reliability—IDeadlineSchedulerfor T1/T2/T3/T4/Tr/Th, cancelled/re-armed on the actor's loop.CanKit.Pro.Addressing—J1939Id/J1939Pgnfor composing the TP.CM (PGN 0xEC00) and TP.DT (PGN 0xEB00) 29-bit IDs.
Basic usage
using CanKit.Abstractions.API.Can;
using CanKit.Core;
using CanKit.Pro.J1939Tp;
// One bus, two nodes on their own source addresses.
using var bus = CanBus.Open("virtual://demo/0",
cfg => cfg.SetProtocolMode(CanProtocolMode.Can20).Baud(500_000));
using var sender = J1939Tp.Open(bus, sourceAddress: 0x01);
using var receiver = J1939Tp.Open(bus, sourceAddress: 0x02);
// TP.BAM: broadcast to every node.
await sender.SendBamAsync(pgn: 0xFECA, payload: new byte[100]);
// TP.CM: point-to-point with RTS/CTS/EOM.
await sender.SendCmAsync(pgn: 0xFECB, destinationAddress: 0x02, payload: new byte[300]);
var received = await receiver.ReceiveAsync();
// received.Pgn / received.SourceAddress / received.DestinationAddress / received.Payload
Coverage
| Requirement | Status |
|---|---|
| FR-TP-030 (TP.BAM send/receive) | Yes |
| FR-TP-031 (TP.CM RTS/CTS/EndOfMsgAck) | Yes |
| FR-TP-032 (TP.DT reassembly, SN 1..N) | Yes |
| FR-TP-033 (T1/T2/T3/T4/Tr/Th via DeadlineScheduler, Connection Abort) | Yes |
| FR-TP-034 (parallel sessions on shared bus) | Yes |
| FR-TP-035 (multiple concurrent TP.CM peers) | Yes |
Install
dotnet add package CanKit.Pro.J1939Tp
# plus a CanKit adapter for the hardware you actually talk to, e.g.
dotnet add package CanKit.Adapter.Virtual # loopback, no hardware
Dependencies: CanKit.Abstractions, CanKit.Pro.Actor, CanKit.Pro.Addressing, CanKit.Pro.RawCan, CanKit.Pro.Reliability.
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
- CanKit.Abstractions (>= 0.5.6)
- CanKit.Pro.Actor (>= 1.2.3)
- CanKit.Pro.Addressing (>= 1.2.3)
- CanKit.Pro.RawCan (>= 1.2.3)
- CanKit.Pro.Reliability (>= 1.2.3)
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.12)
- System.Memory (>= 4.6.3)
- System.Threading.Channels (>= 10.0.12)
-
net10.0
- CanKit.Abstractions (>= 0.5.6)
- CanKit.Pro.Actor (>= 1.2.3)
- CanKit.Pro.Addressing (>= 1.2.3)
- CanKit.Pro.RawCan (>= 1.2.3)
- CanKit.Pro.Reliability (>= 1.2.3)
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 |
|---|