Skip to content

Commit a62b521

Browse files
CAN update
1 parent da3667f commit a62b521

1 file changed

Lines changed: 36 additions & 5 deletions

File tree

specification/transport/can/can.tex

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -275,18 +275,49 @@ \subsubsection{Format selection}\label{sec:transport_can_format_selection}
275275

276276
When receiving a 13-bit-format frame on a subscribed pinned subject, the receiver shall reconstruct a
277277
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.
278+
before forwarding the message to the session layer. The reconstructed message shall be otherwise
279+
indistinguishable from an equivalent message originated by a v1.1 node on the same pinned topic.
283280

284281
\begin{remark}
285282
This rule confines every v1.1-specific feature to the 16-bit format, which v1.0 receivers unconditionally
286283
discard at the bit~7 check. A message reaching a v1.0 receiver is therefore always in a form that the
287284
receiver can parse: a plain application payload on a pinned subject-ID.
288285
\end{remark}
289286

287+
\subsubsection{Session header reconstruction}\label{sec:transport_can_v10_header_reconstruction}
288+
289+
The reconstructed header shall be a session-layer message header
290+
whose fields are populated as listed in table~\ref{table:transport_can_v10_header_reconstruction},
291+
with $S$ denoting the pinned subject-ID of the received frame. All other header fields shall take their
292+
default values for a best-effort message. The resulting message shall be otherwise indistinguishable from
293+
an equivalent message originated by a v1.1 node on the same pinned topic.
294+
295+
\begin{CyphalSimpleTable}{Session header field values for reconstructed 13-bit message transfers}{|l X|}
296+
\label{table:transport_can_v10_header_reconstruction}
297+
Field & Value \\
298+
299+
Header type & Message, best-effort. \\
300+
301+
Log-age & $-1$, signalling that no causality information is available. \\
302+
303+
Eviction counter & The canonical pinned-topic encoding of the subject-ID $S$. \\
304+
305+
Topic hash & $\mathrm{rapidhash}(D(S))$, where $D(S)$ is the ASCII decimal representation of $S$
306+
without leading zeros (e.g.\ $S=42$ yields the two-byte string \texttt{"42"};
307+
$S=0$ yields the one-byte string \texttt{"0"}), and $\mathrm{rapidhash}$ is the 64-bit
308+
rapidhash function invoked with the default seed of zero. \\
309+
310+
Message tag & A monotonically increasing per-subscription counter that is incremented once for every
311+
reconstructed message, so that session-layer duplicate suppression continues to function.
312+
The initial value is implementation-defined. \\
313+
\end{CyphalSimpleTable}
314+
315+
A symmetric rule applies on the transmit side: a sender using the 13-bit format shall strip the session-layer
316+
header from the outgoing message and transmit only the remaining application payload.
317+
The session layer is expected to ensure that the stripped header corresponds to a best-effort message
318+
on a pinned topic, which is the only case in which the 13-bit format is used
319+
(section~\ref{sec:transport_can_format_selection}).
320+
290321
\subsubsection{Unicast transfers}\label{sec:transport_can_unicast}
291322

292323
Cyphal/CAN does not define a dedicated CAN ID layout for unicast delivery.

0 commit comments

Comments
 (0)