@@ -6,36 +6,10 @@ \section{Cyphal/CAN}\label{sec:transport_can}
66Throughout this section, `` CAN'' implies both Classic CAN 2.0 and CAN FD, unless specifically noted otherwise.
77CAN FD should be considered the primary transport protocol.
88
9- \begin {CyphalSimpleTable }{Cyphal/CAN transport capabilities}{|l X l|}
10- \label {table:transport_can_capabilities }
11- Parameter & Value & References \\
12-
13- Maximum node-ID value &
14- 127 (7 bits wide). &
15- \ref {sec:basic } \\
16-
17- Transfer-ID mode &
18- Cyclic, modulo 32. &
19- \ref {sec:transport_transfer_id } \\
20-
21- Number of transfer priority levels &
22- 8 (no additional levels). &
23- \ref {sec:transport_transfer_priority } \\
24-
25- Largest single-frame transfer payload &
26- Classic CAN -- 7~bytes, CAN FD -- up to 63~bytes. &
27- \ref {sec:transport_transfer_payload } \\
28-
29- Anonymous transfers &
30- Supported with non-deterministic collision resolution policy. &
31- \ref {sec:transport_route_specifier } \\
32- \end {CyphalSimpleTable }
33-
349\subsection {CAN ID field }
3510
3611Cyphal/CAN transport frames are CAN 2.0B frames.
37- The 29-bit CAN ID encodes the session specifier\footnote {Section~\ref {sec:transport_session_specifier }.}
38- of the transfer it belongs to along with its priority.
12+ The 29-bit CAN ID encodes the addressing and priority information of the transfer it belongs to.
3913The CAN data field of every frame contains the transfer payload
4014(or, in the case of multi-frame transfers, a fraction thereof), the transfer-ID, and other metadata.
4115
@@ -283,8 +257,7 @@ \subsubsection{Source node-ID field in anonymous transfers}\label{sec:transport_
283257
284258 The described principles make anonymous transfers highly non-deterministic and inefficient.
285259 This is considered acceptable because the scope of anonymous transfers is limited to a very narrow set of use
286- cases which tolerate their downsides. The Cyphal specification employs anonymous transfers only for the
287- plug-and-play feature defined in section~\ref {sec:application_functions }.
260+ cases which tolerate their downsides.
288261 Deterministic applications are advised to avoid reliance on anonymous transfers completely.
289262
290263 None of the above considerations affect nodes that do not transmit anonymous transfers.
@@ -316,7 +289,7 @@ \subsubsection{Layout}
316289 section~\ref {sec:transport_can_toggle_bit }. \\ \hline
317290 4 & & \multicolumn {2}{c|}{} \\
318291 3 & & \multicolumn {2}{c|}{Modulo 32 (range [0, 31])} \\
319- 2 & \textbf {Transfer-ID } & \multicolumn {2}{c|}{section~ \ref { sec:transport_transfer_id } } \\
292+ 2 & \textbf {Transfer-ID } & \multicolumn {2}{c|}{} \\
320293 1 & & \multicolumn {2}{c|}{} \\
321294 0 & & \multicolumn {2}{c|}{\footnotesize {(least significant bit)}} \\
322295 \hline
@@ -353,7 +326,6 @@ \subsubsection{Transfer payload decomposition}
353326 Usage of padding bytes implies that when a serialized message is being deserialized by a receiving node,
354327 the byte sequence used for deserialization may be longer than the actual byte sequence generated by the
355328 emitting node during serialization.
356- This behavior is compatible with the DSDL specification.
357329
358330 The weak MTU requirement for CAN FD is designed to avoid compatibility issues.
359331\end {remark }
@@ -370,14 +342,15 @@ \subsubsection{Transfer CRC}\label{sec:transport_can_transfer_crc}
370342 This is the native byte order for this CRC function.
371343}.
372344
373- The transfer CRC function is \textbf {CRC-16/CCITT-FALSE } (section~\ref {sec:appendix_crc16ccitt_false }).
345+ The transfer CRC function is \textbf {CRC-16/CCITT-FALSE }:
346+ polynomial $ 0 x1021 $ , initial value $ 0 xFFFF$ , no input or output reflection, no final XOR.
374347
375348\subsection {Examples }
376349
377350\begin {remark }[breakable]
378- Heartbeat from node-ID 42, nominal priority level,
379- uptime starting from 0 and then incrementing by one every transfer, health status is 0,
380- operating mode is 1, vendor-specific status code 161 ( $ A 1 _{16} $ ) :
351+ A periodic 7-byte status message from node-ID 42 at nominal priority level.
352+ The four consecutive transfers differ only in the first payload byte and in the transfer-ID
353+ field of the tail byte :
381354
382355 \begin {CyphalCompactTable }{|l l|}
383356 CAN ID (hex) & CAN data (hex) \\
@@ -387,9 +360,10 @@ \subsection{Examples}
387360 \texttt {107D552A } & \texttt {03 00 00 00 00 01 A1 E3 } \\
388361 \end {CyphalCompactTable }
389362
390- \verb |uavcan.primitive.String.1.0 | under subject-ID 4919 ($ 1337 _{16}$ ) published by an anonymous node,
391- the string is `` \verb |Hello world! |'' (ASCII); one byte of zero padding can be seen between
392- the payload and the tail byte:
363+ A 14-byte payload under subject-ID 4919 ($ 1337 _{16}$ ) published by an anonymous node.
364+ The payload is a two-byte little-endian length prefix ($ 000 C_{16}$ ) followed by the ASCII
365+ string `` \verb |Hello world! |'' ;
366+ one byte of zero padding can be seen between the payload and the tail byte:
393367
394368 \begin {CyphalCompactTable }{|l l|}
395369 CAN ID (hex) & CAN data (hex) \\
@@ -399,8 +373,9 @@ \subsection{Examples}
399373 \texttt {11133775 } & \texttt {0C 00 48 65 6C 6C 6F 20 77 6F 72 6C 64 21 00 E3 } \\
400374 \end {CyphalCompactTable }
401375
402- Node info request from node 123 to node 42 via Classic CAN, then response;
403- notice how the transfer CRC is scattered across two frames:
376+ A zero-payload service request from node 123 to node 42 via Classic CAN,
377+ followed by a multi-frame response carrying a variable-length descriptive string;
378+ notice how the transfer CRC is scattered across the last two frames:
404379
405380 \begin {CyphalCompactTable }{|l l l X|}
406381 CAN ID (hex) & CAN data (hex) & ASCII & Comment \\
@@ -442,8 +417,9 @@ \subsection{Examples}
442417 Transfer CRC, LSB. \\
443418 \end {CyphalCompactTable }
444419
445- \verb |uavcan.primitive.array.Natural8.1.0 | under subject-ID 4919 ($ 1337 _{16}$ ) published by node 59,
446- the array contains an arithmetic sequence $ \left (0 , 1 , 2 , \ldots {}, 89 , 90 , 91 \right )$ ;
420+ A 92-byte payload under subject-ID 4919 ($ 1337 _{16}$ ) published by node 59.
421+ The payload is a two-byte little-endian length prefix ($ 005 C_{16}$ ) followed by the
422+ arithmetic sequence $ \left (0 , 1 , 2 , \ldots {}, 89 , 90 , 91 \right )$ ;
447423 the transport MTU is 64 bytes:
448424
449425 \begin {CyphalCompactTable }{|l X[2] X|}
@@ -479,8 +455,8 @@ \subsubsection{Ordered transmission}
479455\subsubsection {Transmission timestamping }
480456
481457\begin {remark }[breakable]
482- Certain application-level functions of Cyphal may require the driver to timestamp outgoing transport frames,
483- e.g., the time synchronization function .
458+ Some applications may require the driver to timestamp outgoing transport frames,
459+ e.g., to measure end-to-end transmission latency or to support time synchronization.
484460 A sensible approach to transmission timestamping is built around the concept of \emph {loop-back frames },
485461 which is described here.
486462
0 commit comments