Skip to content

SdoTransferMode Enum

Selects which CiA 301 SDO transport the SdoUploadAsync / SdoDownloadAsync APIs on ICanOpenNode should use for a single transfer.

public enum SdoTransferMode

Fields

Auto 0

Select the transport from the payload length (download) or from the server's initiate response (upload), using SdoBlockThresholdBytes as the download block-transfer threshold.

Block 3

Force block transfer (CiA 301 §7.2.4.3.15).

Remarks

The value stays 3, the gap left by the removed members notwithstanding. Renumbering it to 1 would silently reuse the value Expedited carried in 1.2.x: an already-compiled caller, or a persisted or transmitted numeric value, supplies the literal 1 and would go from requesting a no-op hint to forcing block transfer — a real change on the wire, and one that hangs against a peer with no block support. A compile error is the loud failure this break wants; a gap in an enum costs nothing.

Remarks

Auto is the recommended default. The choice between the expedited codec (CiA 301 §7.2.4.3.3) and the segmented codec (CiA 301 §7.2.4.3.5..14) is not a caller decision — it follows from the payload length, exactly as CiA 301 prescribes: - Download. Payloads at or above SdoBlockThresholdBytes switch to block transfer (CiA 301 §7.2.4.3.15). Below that threshold the payload length picks the codec: 1..4 bytes expedited, 5 bytes and up segmented. The threshold is tested first, so it bounds the expedited range too — the options permit a threshold of 1..4, and such a node sends even a one-byte payload by block transfer. - Upload. The payload length is unknown until the server replies, so the server dictates the codec: it answers the initiate with either an expedited or a segmented response and the client follows either transparently. Auto therefore cannot apply the block heuristic on upload — pass Block explicitly for a block upload.

Block is the only transport a caller can force, because it is the only one the client actually decides: it is negotiated in the initiate frame instead of being derived from a payload length that is either already known (download) or not yet known (upload).