@@ -255,6 +255,53 @@ \subsection{CAN ID field}
255255 client if request, server if response. \\
256256\end {CyphalSimpleTable }
257257
258+ \subsubsection {Format selection }\label {sec:transport_can_format_selection }
259+
260+ The two message formats differ not only in the CAN ID bit layout but also in the payload carried on the wire.
261+ The v1.1 16-bit format carries a full session-layer message including its session-layer header;
262+ the v1.0 legacy 13-bit format carries only the raw application payload without any session-layer wrapping,
263+ which is what makes it wire-compatible with Cyphal/CAN v1.0 nodes that predate the session layer.
264+
265+ A sender shall use the v1.0 legacy 13-bit format for a message transfer if and only if both of the following hold:
266+ (a) the subject-ID lies in the pinned range $ [0 , 8191 ]$ , and
267+ (b) the message is a best-effort publication.
268+ In all other cases -- auto-allocated subject-IDs, the broadcast subject, gossip shards, reliable messages,
269+ gossip messages, service discovery, and RPC -- the sender shall use the v1.1 16-bit format.
270+
271+ When transmitting on a pinned subject using the 13-bit format, the sender shall strip the session-layer
272+ header from the outgoing message before enqueuing the frame, so that only the raw application payload
273+ appears on the wire. This is what makes a 13-bit frame parseable by Cyphal/CAN v1.0 nodes,
274+ which are unaware of the session layer.
275+
276+ When receiving a 13-bit-format frame on a subscribed pinned subject, the receiver shall reconstruct a
277+ session-layer header consistent with the matching pinned topic and prepend it to the received payload
278+ before forwarding the message to the session layer. The reconstructed header shall declare the message as
279+ best-effort and shall carry a message tag drawn from a monotonically increasing per-subscription counter,
280+ so that session-layer duplicate suppression continues to function.
281+ The reconstructed message shall be otherwise indistinguishable from an equivalent message originated by
282+ a v1.1 node on the same pinned topic.
283+
284+ \begin {remark }
285+ This rule confines every v1.1-specific feature to the 16-bit format, which v1.0 receivers unconditionally
286+ discard at the bit~7 check. A message reaching a v1.0 receiver is therefore always in a form that the
287+ receiver can parse: a plain application payload on a pinned subject-ID.
288+ \end {remark }
289+
290+ \subsubsection {Unicast transfers }\label {sec:transport_can_unicast }
291+
292+ Cyphal/CAN does not define a dedicated CAN ID layout for unicast delivery.
293+ A unicast transfer shall be represented as an RPC-service \emph {request } to the reserved service-ID $ 511 $
294+ addressed to the destination node.
295+ The session layer treats service-ID $ 511 $ as an opaque unicast channel;
296+ no service response is issued at the transport layer, and higher-layer reply semantics, if any,
297+ are carried in subsequent unicast requests in the opposite direction.
298+
299+ The sender shall maintain a $ 128 $ -element array of transfer-ID counters indexed by the destination node-ID,
300+ and increment the entry corresponding to the destination of each outgoing unicast transfer.
301+ This ensures that the receiver observes a monotonic transfer-ID stream on every $ (\text {source}, \text {destination})$
302+ pair, so that the standard transfer-ID timeout check
303+ (section~\ref {sec:transport_can_transfer_id_timeout }) applies without modification.
304+
258305\subsubsection {Transfer priority }
259306
260307Valid values for transfer priority range from 0 to 7, inclusively,
@@ -421,6 +468,33 @@ \subsubsection{Transfer CRC}\label{sec:transport_can_transfer_crc}
421468The transfer CRC function is \textbf {CRC-16/CCITT-FALSE }:
422469polynomial $ 0 x1021 $ , initial value $ 0 xFFFF$ , no input or output reflection, no final XOR.
423470
471+ \subsubsection {Transfer-ID timeout }\label {sec:transport_can_transfer_id_timeout }
472+
473+ The \emph {transfer-ID timeout } governs the duration over which a receiver retains the last-admitted
474+ transfer-ID of a reassembly session for duplicate suppression. A start-of-transfer frame whose transfer-ID
475+ matches the last-admitted value within the timeout window is discarded as a duplicate;
476+ after the timeout elapses, the next admission is accepted unconditionally.
477+ The recommended default value is $ 2 $ seconds.
478+
479+ The timeout applies to the following session kinds:
480+ \begin {itemize }
481+ \item Message (subject) sessions, in both the v1.1 16-bit and the v1.0 legacy 13-bit formats.
482+ \item Service request sessions, including the unicast channel defined in
483+ section~\ref {sec:transport_can_unicast }.
484+ \end {itemize }
485+
486+ A transfer-ID timeout of \emph {zero } shall be used for service \emph {response } sessions.
487+ The transfer-ID of a service response is not generated by the server -- it is echoed from the request being
488+ answered. Because the transfer-ID field is only five bits wide, the client may legitimately re-use the same
489+ transfer-ID value for two different requests to the same server within a short interval as its counter wraps;
490+ with a nonzero timeout, the later matching response would be rejected as a duplicate of the earlier one.
491+ Setting the timeout to zero disables transport-level duplicate suppression on response sessions,
492+ leaving the receiving application to correlate responses with outstanding requests by other
493+ means\footnote {%
494+ See \href {https://github.com/OpenCyphal/libcanard/issues/247}{OpenCyphal/libcanard issue~247}
495+ for the original discussion.
496+ }.
497+
424498\subsection {Examples }
425499
426500\begin {remark }[breakable]
0 commit comments