Skip to content

IsoTpEndpoint Struct

Minimal ISO-TP endpoint value type used by IsoTpFrameCodec to decide the TX/RX CAN identifiers and whether the first payload byte is reserved for an address-extension byte. Runtime channel/session objects live outside this codec-only assembly.

public readonly struct IsoTpEndpoint : System.IEquatable<CanKit.Pro.IsoTp.IsoTpEndpoint>

Implements IEquatable<IsoTpEndpoint>

Properties

IsoTpEndpoint.AddressExtension Property

Address-extension byte written as the first byte of every outbound frame's CAN payload. Only meaningful when UsesAddressExtension is true.

public byte AddressExtension { get; }

Property Value

Byte

Remarks

For Extended this is the peer's target address (the N_TA we address the remote node with). For Mixed it is the shared address-extension byte, which is the same on both directions.

IsoTpEndpoint.AddressExtensionSize Property

The number of payload bytes reserved for the address-extension byte (0 or 1).

public int AddressExtensionSize { get; }

Property Value

Int32

IsoTpEndpoint.AddressingMode Property

Addressing mode; decides whether an address-extension byte is present.

public CanKit.Pro.IsoTp.IsoTpAddressingMode AddressingMode { get; }

Property Value

IsoTpAddressingMode

IsoTpEndpoint.IsExtendedCanId Property

Whether TxCanId/RxCanId use the 29-bit extended CAN-ID format (true) or the 11-bit standard format (false).

public bool IsExtendedCanId { get; }

Property Value

Boolean

IsoTpEndpoint.RxAddressExtension Property

Address-extension byte expected as the first byte of every inbound frame's CAN payload. Only meaningful when UsesAddressExtension is true.

public byte RxAddressExtension { get; }

Property Value

Byte

Remarks

For Extended this is the local node's own source address (from the peer's perspective, we are the target of frames they send back, so they write our source address into the AE byte). Storing this separately from the outbound AddressExtension is required for correct RX filtering when the two differ (Bugbot 3594960802). For Mixed and Normal/NormalFixed this equals AddressExtension.

IsoTpEndpoint.RxCanId Property

Inbound (peer -> this-node) CAN identifier.

public uint RxCanId { get; }

Property Value

UInt32

IsoTpEndpoint.TxCanId Property

Outbound (this-node -> peer) CAN identifier.

public uint TxCanId { get; }

Property Value

UInt32

IsoTpEndpoint.UsesAddressExtension Property

true when AddressingMode is Extended or Mixed; the first payload byte is then consumed by the address-extension byte and only the remaining bytes carry PCI + data.

public bool UsesAddressExtension { get; }

Property Value

Boolean

Methods

IsoTpEndpoint.Extended(uint, uint, byte, byte, bool) Method

Creates an endpoint using ISO 15765-2 <em>Extended</em> addressing. The targetAddress is placed as the first byte of every outbound frame (the peer's N_TA); the runtime filters inbound frames on sourceAddress, which is what the peer writes into the AE byte when addressing us.

public static CanKit.Pro.IsoTp.IsoTpEndpoint Extended(uint txCanId, uint rxCanId, byte sourceAddress, byte targetAddress, bool isExtendedCanId=false);

Parameters

txCanId UInt32

rxCanId UInt32

sourceAddress Byte

targetAddress Byte

isExtendedCanId Boolean

Returns

IsoTpEndpoint

IsoTpEndpoint.Mixed(uint, uint, byte, bool) Method

Creates an endpoint using ISO 15765-2 <em>Mixed</em> addressing. The addressExtension byte is written as the first byte of every outbound frame and is expected as the first byte of every inbound frame.

public static CanKit.Pro.IsoTp.IsoTpEndpoint Mixed(uint txCanId, uint rxCanId, byte addressExtension, bool isExtendedCanId=false);

Parameters

txCanId UInt32

rxCanId UInt32

addressExtension Byte

isExtendedCanId Boolean

Returns

IsoTpEndpoint

IsoTpEndpoint.Normal(uint, uint, bool) Method

Creates an endpoint using ISO 15765-2 <em>Normal</em> addressing.

public static CanKit.Pro.IsoTp.IsoTpEndpoint Normal(uint txCanId, uint rxCanId, bool isExtendedCanId=false);

Parameters

txCanId UInt32

rxCanId UInt32

isExtendedCanId Boolean

Returns

IsoTpEndpoint

IsoTpEndpoint.NormalFixed(uint, uint) Method

Creates an endpoint using ISO 15765-2 <em>Normal-Fixed</em> addressing (29-bit).

public static CanKit.Pro.IsoTp.IsoTpEndpoint NormalFixed(uint txCanId, uint rxCanId);

Parameters

txCanId UInt32

rxCanId UInt32

Returns

IsoTpEndpoint

Operators

IsoTpEndpoint.operator ==(IsoTpEndpoint, IsoTpEndpoint) Operator

Equality operator.

public static bool operator ==(CanKit.Pro.IsoTp.IsoTpEndpoint left, CanKit.Pro.IsoTp.IsoTpEndpoint right);

Parameters

left IsoTpEndpoint

right IsoTpEndpoint

Returns

Boolean

IsoTpEndpoint.operator !=(IsoTpEndpoint, IsoTpEndpoint) Operator

Inequality operator.

public static bool operator !=(CanKit.Pro.IsoTp.IsoTpEndpoint left, CanKit.Pro.IsoTp.IsoTpEndpoint right);

Parameters

left IsoTpEndpoint

right IsoTpEndpoint

Returns

Boolean