Skip to content

J1939TpDatagram Struct

One fully reassembled J1939 multi-packet PDU as delivered by IJ1939TpChannel. Carries the transport-service context every J1939 application layer needs to route the message: the PGN of the announced data, the source address of the transmitter, the destination address (0xFF for BAM, the local address for TP.CM), and whether it was carried by TP.BAM or TP.CM.

public readonly struct J1939TpDatagram

Constructors

J1939TpDatagram(uint, byte, byte, J1939TpKind, byte[]) Constructor

Creates a new J1939TpDatagram.

public J1939TpDatagram(uint pgn, byte sourceAddress, byte destinationAddress, CanKit.Pro.J1939Tp.J1939TpKind kind, byte[] payload);

Parameters

pgn UInt32

sourceAddress Byte

destinationAddress Byte

kind J1939TpKind

payload Byte[]

Properties

J1939TpDatagram.DestinationAddress Property

Destination address (0xFF for BAM; local SA for TP.CM).

public byte DestinationAddress { get; }

Property Value

Byte

J1939TpDatagram.Kind Property

Which J1939-21 §5.10 transport flavor delivered the PDU.

public CanKit.Pro.J1939Tp.J1939TpKind Kind { get; }

Property Value

J1939TpKind

J1939TpDatagram.Payload Property

The reassembled payload bytes (owned by the receiver; not aliased to any frame buffer).

public byte[] Payload { get; }

Property Value

Byte[]

J1939TpDatagram.Pgn Property

The J1939 data PGN announced by the transport session (from RTS/BAM bytes 5..7).

public uint Pgn { get; }

Property Value

UInt32

J1939TpDatagram.SourceAddress Property

Source address of the transmitting node.

public byte SourceAddress { get; }

Property Value

Byte