Skip to content

UdsDownloadResponse Struct

Positive-response parameters returned by RequestDownload (0x34, ISO 14229-1 §14.2.2).

public readonly struct UdsDownloadResponse

Remarks

The ECU echoes a <em>lengthFormatIdentifier</em> byte whose high nibble encodes how many bytes follow to convey maxNumberOfBlockLength. That value is the maximum number of bytes (SID included) the tester may put in a single TransferData request, which the convenience DownloadAsync(byte, byte, ReadOnlyMemory<byte>, ReadOnlyMemory<byte>, ReadOnlyMemory<byte>, CancellationToken) uses to chunk the payload.

Constructors

UdsDownloadResponse(byte, ulong) Constructor

Creates the response wrapper.

public UdsDownloadResponse(byte lengthFormatIdentifier, ulong maxNumberOfBlockLength);

Parameters

lengthFormatIdentifier Byte

maxNumberOfBlockLength UInt64

Properties

UdsDownloadResponse.LengthFormatIdentifier Property

Raw lengthFormatIdentifier byte echoed by the ECU (byte 1 of the positive response). The high nibble is the width, in bytes, of the following maxNumberOfBlockLength field; the low nibble is reserved.

public byte LengthFormatIdentifier { get; }

Property Value

Byte

UdsDownloadResponse.MaxNumberOfBlockLength Property

Maximum number of bytes (including SID) the ECU is willing to accept in a single TransferData (0x36) request. Callers MUST NOT exceed this value; the payload chunk in each TransferData is therefore at most MaxNumberOfBlockLength - 2 bytes (SID + blockSequenceCounter overhead).

public ulong MaxNumberOfBlockLength { get; }

Property Value

UInt64