Cyphal interface

Cyphal, formerly known as UAVCAN until March 2022, is the primary communication protocol supported by this device. For historical reasons, registers related to the Cyphal stack may be named with the uavcan. prefix.

The product utilizes data types from the vendor-specific DSDL namespace zubax. Human-friendly documentation for this and other DSDL namespaces can be viewed online via Nunaweb.

Magnet control is implemented via a dedicated command topic subscription. Status feedback is implemented by publishing feedback messages to a dedicated topic. Fault reset is done by sending an uavcan.node.ExecuteCommand request with the appropriate opcode.

Configuration registers

The following table contains the list of configuration registers that affect the Cyphal interface. Changes to these registers take effect after reboot unless explicitly indicated otherwise.

Register

Type

Default

Unit

Description

uavcan.node.id

natural16

65535 (plug-and-play)

Plug-and-play node-ID allocation

uavcan.can.mtu

natural8

8

byte

Cyphal/CAN

uavcan.can.bitrate

natural32[2]

1000000, 1000000

\(\frac{\text{bit}}{\text{second}}\)

Cyphal/CAN

uavcan.can.count

natural8

(hardware-dependent)

Cyphal/CAN

uavcan.pub.feedback.id

natural16

65535 (disabled)

Feedback

uavcan.pub.feedback.prio

natural8

4 (nominal)

Feedback

uavcan.sub.command.id

natural16

65535 (disabled)

Command

Port summary

Port kind

Port name

Data type

Priority

Period

Timeout

Description

publication

uavcan.node.Heartbeat.1

4 (nominal)

1 s

period

Heartbeat

publication

uavcan.node.port.List

7 (optional)

10 s

period

See Cyphal Specification

publication

uavcan.pnp.NodeIDAllocationData.1

6 (slow)

random

1 s

Only during PnP node-ID allocation

subscription

uavcan.pnp.NodeIDAllocationData.1

0.5 s

ditto

publication

feedback

zubax.fluxgrip.Feedback.1

uavcan.pub.feedback.prio

1 s and on change

1 s

Feedback

subscription

command

zubax.fluxgrip.Command.1

0.5 s

Command

RPC server

uavcan.node.GetInfo.1

Node info

RPC server

uavcan.node.ExecuteCommand.1

Execute command

RPC server

uavcan.register.List.1

Register

RPC server

uavcan.register.Access.1

Register

Plug-and-play node-ID allocation

By default, the local Cyphal node does not have an assigned node-ID; that is, the uavcan.node.id register is set to 65535 (\(FFFF_{16}\)). When this is the case, the device will commence the standard plug-and-play (PnP) node-ID allocation sequence defined in the Cyphal specification.

Once the node-ID allocation is completed, the uavcan.node.id register will be updated with the allocated node-ID value. This value will be saved to non-volatile memory when the device is commanded to restart.

Publications

Heartbeat

The mode field takes the following values:

  • OPERATIONAL unless the firmware update is in progress.

  • SOFTWARE_UPDATE if a new firmware image is being downloaded; see chapter \ref{sec:bootloader}.

The health field takes the following values:

  • NOMINAL if the device is operating correctly.

  • ADVISORY if the device is operating correctly but minor issues are detected.

  • WARNING if the device is in the fault state and is unable to operate normally.

The vendor_specific_status_code (VSSC) field is split into two orthogonal 4-bit nibbles. The least significant nibble contains the general device status code, while the most significant nibble contains the firmware update process status code.

The interpretation of the general device status code (low VSSC nibble) is as follows:

Low VSSC nibble

Device status

0

Idle, demagnetized

1

Idle, magnetized 🧲

2

Magnetizing

3

Demagnetizing

4

Idle, magnet state unknown

5

Fault: power stage malfunction, or the supply voltage is outside of the operating range (see hardware specification)

6

Fault: power stage sensor error

7

Fault: power stage malfunction

8

Fault: power stage malfunction

9

Fault: power stage sensor error

10 (\(A_{16}\))

Fault: power stage malfunction

11 (\(B_{16}\))

Fault: other

12 (\(C_{16}\))

Reserved

13 (\(D_{16}\))

Reserved

14 (\(E_{16}\))

Reserved

15 (\(F_{16}\))

Fault: invalid configuration

High VSSC nibble

Firmware update status

0

Idle or in progress, depending on the mode field

1

Filesystem error

2

Network remote file read timed out

3

Filesystem error

4

Filesystem error

5

Network remote file read timed out

6

Firmware image file is too large

7

Reserved

8

Reserved

9

Reserved

10 (\(A_{16}\))

Reserved

11 (\(B_{16}\))

Reserved

12 (\(C_{16}\))

Reserved

13 (\(D_{16}\))

Reserved

14 (\(E_{16}\))

Reserved

15 (\(F_{16}\))

Reserved

Definition of uavcan.node.Heartbeat.1.0; extent 12 bytes:

 1# Abstract node status information.
 2# This is the only high-level function that shall be implemented by all nodes.
 3#
 4# All Cyphal nodes that have a node-ID are required to publish this message to its fixed subject periodically.
 5# Nodes that do not have a node-ID (also known as "anonymous nodes") shall not publish to this subject.
 6#
 7# The default subject-ID 7509 is 1110101010101 in binary. The alternating bit pattern at the end helps transceiver
 8# synchronization (e.g., on CAN-based networks) and on some transports permits automatic bit rate detection.
 9#
10# Network-wide health monitoring can be implemented by subscribing to the fixed subject.
11
12uint16 MAX_PUBLICATION_PERIOD = 1   # [second]
13# The publication period shall not exceed this limit.
14# The period should not change while the node is running.
15
16uint16 OFFLINE_TIMEOUT = 3          # [second]
17# If the last message from the node was received more than this amount of time ago, it should be considered offline.
18
19uint32 uptime                       # [second]
20# The uptime seconds counter should never overflow. The counter will reach the upper limit in ~136 years,
21# upon which time it should stay at 0xFFFFFFFF until the node is restarted.
22# Other nodes may detect that a remote node has restarted when this value leaps backwards.
23
24Health.1.0 health
25# The abstract health status of this node.
26
27Mode.1.0 mode
28# The abstract operating mode of the publishing node.
29# This field indicates the general level of readiness that can be further elaborated on a per-activity basis
30# using various specialized interfaces.
31
32uint8 vendor_specific_status_code
33# Optional, vendor-specific node status code, e.g. a fault code or a status bitmask.
34
35@assert _offset_ % 8 == {0}
36@assert _offset_ == {56}  # Fits into a single-frame Classic CAN transfer (least capable transport, smallest MTU).
37@extent 12 * 8

Feedback

This topic is published to at a low fixed frequency and possibly on change. Applications that do not require the extended status information can subscribe to this topic using primitive types like zubax.primitive.boolean.Scalar.1.

Definition of zubax.fluxgrip.Feedback.1.0; extent 63 bytes:

 1# Zubax EPM status feedback message.
 2# This type is a structural subtype of uavcan.primitive.scalar.Bit.
 3
 4bool magnetized
 5# True if the magnet is currently turned on.
 6# The value is a best guess if remagnetization is currently in progress.
 7
 8int3 remagnetization_state
 9# -1 -- the magnet is being demagnetized (turning off).
10#  0 -- the magnet is idle.
11# +1 -- the magnet is being magnetized (turning on).
12
13void4
14
15@assert _offset_ == {8}
16
17uint24[2] cycles_on_off
18# The number of magnetization and demagnetization cycles commenced, respectively, since the device was powered on.
19# The values are incremented immediately at the commencement of the cycle.
20
21@extent 63 * 8

Subscriptions

Command

The published values are interpreted as specified below; values that are not explicitly listed shall not be used. See Functional description for the state transition logic.

Value

Interpretation

0

OFF

1

ON

2

FORCE

The command subscription can also accept boolean primitives like zubax.primitive.boolean.Scalar.1 or uavcan.primitive.scalar.Bit.1, since falsity is interpreted as zero, and truth as +1. This enables simplified control of the magnet through a simple boolean flag commanding the desired state.

Multiple magnets can subscribe to the same command topic to implement lockstep operation.

Definition of uavcan.primitive.scalar.Integer8.1.0; extent 1 bytes:

1int8 value
2@sealed

RPC servers

Node info

The node name is reported as com.zubax.fluxgrip.

Contact Zubax Robotics for the details on the hardware version numbering and the certificate of authenticity (CoA) validation.

Definition of uavcan.node.GetInfo.1.0; extent 0 / 448 bytes:

 1# Full node info request.
 2# All of the returned information shall be static (unchanged) while the node is running.
 3# It is highly recommended to support this service on all nodes.
 4
 5@sealed
 6
 7---
 8
 9Version.1.0 protocol_version
10# The Cyphal protocol version implemented on this node, both major and minor.
11# Not to be changed while the node is running.
12
13Version.1.0 hardware_version
14Version.1.0 software_version
15# The version information shall not be changed while the node is running.
16# The correct hardware version shall be reported at all times, excepting software-only nodes, in which
17# case it should be set to zeros.
18# If the node is equipped with a Cyphal-capable bootloader, the bootloader should report the software
19# version of the installed application, if there is any; if no application is found, zeros should be reported.
20
21uint64 software_vcs_revision_id
22# A version control system (VCS) revision number or hash. Not to be changed while the node is running.
23# For example, this field can be used for reporting the short git commit hash of the current
24# software revision.
25# Set to zero if not used.
26
27uint8[16] unique_id
28# The unique-ID (UID) is a 128-bit long sequence that is likely to be globally unique per node.
29# The vendor shall ensure that the probability of a collision with any other node UID globally is negligibly low.
30# UID is defined once per hardware unit and should never be changed.
31# All zeros is not a valid UID.
32# If the node is equipped with a Cyphal-capable bootloader, the bootloader shall use the same UID.
33
34@assert _offset_ == {30 * 8}
35# Manual serialization note: only fixed-size fields up to this point. The following fields are dynamically sized.
36
37uint8[<=50] name
38# Human-readable non-empty ASCII node name. An empty name is not permitted.
39# The name shall not be changed while the node is running.
40# Allowed characters are: a-z (lowercase ASCII letters) 0-9 (decimal digits) . (dot) - (dash) _ (underscore).
41# Node name is a reversed Internet domain name (like Java packages), e.g. "com.manufacturer.project.product".
42
43uint64[<=1] software_image_crc
44# The value of an arbitrary hash function applied to the software image. Not to be changed while the node is running.
45# This field can be used to detect whether the software or firmware running on the node is an exact
46# same version as a certain specific revision. This field provides a very strong identity guarantee,
47# unlike the version fields above, which can be the same for different builds of the software.
48# As can be seen from its definition, this field is optional.
49#
50# The exact hash function and the methods of its application are implementation-defined.
51# However, implementations are recommended to adhere to the following guidelines, fully or partially:
52#   - The hash function should be CRC-64-WE.
53#   - The hash function should be applied to the entire application image padded to 8 bytes.
54#   - If the computed image CRC is stored within the software image itself, the value of
55#     the hash function becomes ill-defined, because it becomes recursively dependent on itself.
56#     In order to circumvent this issue, while computing or checking the CRC, its value stored
57#     within the image should be zeroed out.
58
59uint8[<=222] certificate_of_authenticity
60# The certificate of authenticity (COA) of the node, 222 bytes max, optional. This field can be used for
61# reporting digital signatures (e.g., RSA-1776, or ECDSA if a higher degree of cryptographic strength is desired).
62# Leave empty if not used. Not to be changed while the node is running.
63
64@assert _offset_ % 8 == {0}
65@assert _offset_.max == (313 * 8)     # At most five CAN FD frames
66@extent 448 * 8

Execute command

Commands that are not explicitly listed return STATUS_BAD_COMMAND. Commands whose command code is less than 32768 which are not listed here shall not be invoked; otherwise, permanent hardware damage may occur.

Command

Parameter

Description

0 (vendor-specific)

Clear the latched fault; do nothing if no fault is present.

65530 = STORE_PERSISTENT_STATES

Alias for RESTART.

65532 = FACTORY_RESET

Reset all configuration registers to defaults upon next RESTART.

65533 = BEGIN_SOFTWARE_UPDATE

Firmware image file name

Commence firmware update. The device will remain operational while the firmware is being downloaded.

65535 = RESTART

Restart the device saving the configuration registers.

Definition of uavcan.node.ExecuteCommand.1.3; extent 300 / 48 bytes:

 1# Instructs the server node to execute or commence execution of a simple predefined command.
 2# All standard commands are optional; i.e., not guaranteed to be supported by all nodes.
 3
 4uint16 command
 5# Standard pre-defined commands are at the top of the range (defined below).
 6# Vendors can define arbitrary, vendor-specific commands in the bottom part of the range (starting from zero).
 7# Vendor-specific commands shall not use identifiers above 32767.
 8
 9uint16 COMMAND_RESTART = 65535
10# Reboot the node.
11# Note that some standard commands may or may not require a restart in order to take effect; e.g., factory reset.
12
13uint16 COMMAND_POWER_OFF = 65534
14# Shut down the node; further access will not be possible until the power is turned back on.
15
16uint16 COMMAND_BEGIN_SOFTWARE_UPDATE = 65533
17# Begin the software update process using uavcan.file.Read. This command makes use of the "parameter" field below.
18# The parameter contains the path to the new software image file to be downloaded by the server from the client
19# using the standard service uavcan.file.Read. Observe that this operation swaps the roles of the client and
20# the server.
21#
22# Upon reception of this command, the server (updatee) will evaluate whether it is possible to begin the
23# software update process. If that is deemed impossible, the command will be rejected with one of the
24# error codes defined in the response section of this definition (e.g., BAD_STATE if the node is currently
25# on-duty and a sudden interruption of its activities is considered unsafe, and so on).
26# If an update process is already underway, the updatee should abort the process and restart with the new file,
27# unless the updatee can determine that the specified file is the same file that is already being downloaded,
28# in which case it is allowed to respond SUCCESS and continue the old update process.
29# If there are no other conditions precluding the requested update, the updatee will return a SUCCESS and
30# initiate the file transfer process by invoking the standard service uavcan.file.Read repeatedly until the file
31# is transferred fully (please refer to the documentation for that data type for more information about its usage).
32#
33# While the software is being updated, the updatee should set its mode (the field "mode" in uavcan.node.Heartbeat)
34# to MODE_SOFTWARE_UPDATE. Please refer to the documentation for uavcan.node.Heartbeat for more information.
35#
36# It is recognized that most systems will have to interrupt their normal services to perform the software update
37# (unless some form of software hot swapping is implemented, as is the case in some high-availability systems).
38#
39# Microcontrollers that are requested to update their firmware may need to stop execution of their current firmware
40# and start the embedded bootloader (although other approaches are possible as well). In that case,
41# while the embedded bootloader is running, the mode reported via the message uavcan.node.Heartbeat should be
42# MODE_SOFTWARE_UPDATE as long as the bootloader is runing, even if no update-related activities
43# are currently underway. For example, if the update process failed and the bootloader cannot load the software,
44# the same mode MODE_SOFTWARE_UPDATE will be reported.
45# It is also recognized that in a microcontroller setting, the application that served the update request will have
46# to pass the update-related metadata (such as the node-ID of the server and the firmware image file path) to
47# the embedded bootloader. The tactics of that transaction lie outside of the scope of this specification.
48
49uint16 COMMAND_FACTORY_RESET = 65532
50# Return the node's configuration back to the factory default settings (may require restart).
51# Due to the uncertainty whether a restart is required, generic interfaces should always force a restart.
52
53uint16 COMMAND_EMERGENCY_STOP = 65531
54# Cease activities immediately, enter a safe state until restarted.
55# Further operation may no longer be possible until a restart command is executed.
56
57uint16 COMMAND_STORE_PERSISTENT_STATES = 65530
58# This command instructs the node to store the current configuration parameter values and other persistent states
59# to the non-volatile storage. Nodes are allowed to manage persistent states automatically, obviating the need for
60# this command by committing all such data to the non-volatile memory automatically as necessary. However, some
61# nodes may lack this functionality, in which case this parameter should be used. Generic interfaces should always
62# invoke this command in order to ensure that the data is stored even if the node doesn't implement automatic
63# persistence management.
64
65uint16 COMMAND_IDENTIFY = 65529
66# This command instructs the node to physically identify itself in some way--e.g., by flashing a light or
67# emitting a sound. The duration and the nature of the identification process is implementation-defined.
68# This command can be useful for human operators to match assigned node-ID values to physical nodes during setup.
69
70uint8[<=uavcan.file.Path.2.0.MAX_LENGTH] parameter
71# A string parameter supplied to the command. The format and interpretation is command-specific.
72# The standard commands do not use this field (ignore it), excepting the following:
73#   - COMMAND_BEGIN_SOFTWARE_UPDATE
74
75@extent 300 * 8
76
77---
78
79uint8 STATUS_SUCCESS        = 0     # Started or executed successfully
80uint8 STATUS_FAILURE        = 1     # Could not start or the desired outcome could not be reached
81uint8 STATUS_NOT_AUTHORIZED = 2     # Denied due to lack of authorization
82uint8 STATUS_BAD_COMMAND    = 3     # The requested command is not known or not supported
83uint8 STATUS_BAD_PARAMETER  = 4     # The supplied parameter cannot be used with the selected command
84uint8 STATUS_BAD_STATE      = 5     # The current state of the node does not permit execution of this command
85uint8 STATUS_INTERNAL_ERROR = 6     # The operation should have succeeded but an unexpected failure occurred
86uint8 status
87# The result of the request.
88
89uint8[<=46] output
90# Any output that could be useful that has the capability to convey detailed information.
91# Users can send commands and receive specific data, like device status or measurements back in a streamlined manner.
92# The standard commands should leave this field empty unless explicitly specified otherwise.
93
94@extent 48 * 8

Register

Helpful Yakut commands:

y r 125 uavcan.sub.command.id 1001            # Assign the command topic ID to 1001 on node 125
y r 125 uavcan.sub.command.id                 # Just read the register
y rl 125                                      # Read all register names on node 125
y rl 125 | y --yaml rb -omp 125 > config.yaml # Save all mutable persistent registers of node 125 into a YAML file
y rb 125 < config.yaml                        # Restore the registers from the YAML file

Definition of uavcan.register.List.1.0; extent 2 / 256 bytes:

 1# This service allows the caller to discover the names of all registers available on the server
 2# by iterating the index field from zero until an empty name is returned.
 3#
 4# The ordering of the registers shall remain constant while the server is running.
 5# The ordering is not guaranteed to remain unchanged when the server node is restarted.
 6
 7uint16 index
 8
 9@sealed
10
11---
12
13Name.1.0 name
14# Empty name in response means that the index is out of bounds, i.e., discovery is finished.
15
16@sealed

Definition of uavcan.register.Access.1.0; extent 515 / 267 bytes:

  1# Registers are strongly-typed named values used to store the configuration parameters of a node.
  2# This service is used to write and read a register.
  3#
  4#
  5#   READ/WRITE BEHAVIORS
  6#
  7# The write operation is performed first, unless skipped by sending an empty value in the request.
  8# The server may attempt to convert the type of the supplied value to the correct type if there is a type mismatch
  9# (e.g. uint8 may be converted to uint16); however, servers are not required to perform implicit type conversion,
 10# and the rules of such conversion are not explicitly specified, so this behavior should not be relied upon.
 11#
 12# On the next step the register will be read regardless of the outcome of the write operation. As such, if the write
 13# operation could not be performed (e.g. due to a type mismatch or any other issue), the register will retain its old
 14# value. By evaluating the response the caller can determine whether the register was written successfully.
 15#
 16# The write-read sequence is not guaranteed to be atomic, meaning that external influences may cause the register to
 17# change its value between the write and the subsequent read operation. The caller is responsible for handling that
 18# case properly.
 19#
 20# The timestamp provided in the response corresponds to the time when the register was read. The timestamp may
 21# be empty if the server does not support timestamping or its clock is not (yet) synchronized with the network.
 22#
 23# If only read is desired, but not write, the caller shall provide a value of type 'empty'. That will signal the server
 24# that the write operation shall be skipped, and it will proceed to read the register immediately.
 25#
 26# If the requested register does not exist, the write operation will have no effect and the returned value will be
 27# empty. Existing registers should not return 'empty' when read since that would make them indistinguishable from
 28# nonexistent registers.
 29#
 30#
 31#   REGISTER DEFINITION REQUIREMENTS
 32#
 33# Registers shall never change their type or flags as long as the server is running. Meaning that:
 34#   - Mutability and persistence flags cannot change their states.
 35#   - Read operations shall always return values of the same type and same dimensionality.
 36#     The dimensionality requirement does not apply to inherently variable-length values such as strings and
 37#     unstructured chunks.
 38#
 39# Register name should contain only:
 40#   - Lowercase ASCII alphanumeric characters (a-z, 0-9)
 41#   - Full stop (.)
 42#   - Low line (underscore) (_)
 43# With the following limitations/recommendations:
 44#   - The name shall not begin with a decimal digit (0-9).
 45#   - The name shall neither begin nor end with a full stop.
 46#   - A low line shall not be followed by a non-alphanumeric character.
 47#   - The name should contain at least one full stop character.
 48# Other patterns and ASCII characters are reserved for special function registers (introduced below).
 49#
 50#
 51#   ENVIRONMENT VARIABLES
 52#
 53# This section applies only to software nodes executed in a high-level operating system that supports environment
 54# variables or an equivalent mechanism.
 55#
 56# When a software node is launched, it is usually necessary to provide some of its configuration information early,
 57# particularly that which is related to Cyphal networking, before the node is started. Environment variables offer
 58# a convenient way of addressing this. Software nodes that support the register interface should evaluate the
 59# available environment variables during initialization and update their registers (whether they are stored in
 60# a persistent storage or in memory) accoringly. This should be completed before the first register read access.
 61#
 62# A register name is mapped to an environment variable name as follows:
 63#   - the name is upper-cased;
 64#   - full stop characters are replaced with double low line characters.
 65# For example: 'motor.inductance_dq' is mapped to 'MOTOR__INDUCTANCE_DQ'.
 66#
 67# Register values are represented in environment variables as follows:
 68#   - string:                         utf-8 or platform-specific
 69#   - unstructured:                   as-is
 70#   - bit, integer*, natural*, real*: space-separated decimals
 71#
 72# If an environment variable matches the name of an existing register but its value cannot be converted to the
 73# register's type, an error should be raised.
 74#
 75# If an environment variable does not match the name of any register, it may be ignored. However, if the implementation
 76# can reliably deduce the type and purpose of the register, it may create one automatically. This provision is to
 77# support applications where the register schema may be altered by configuration.
 78#
 79#
 80#   SPECIAL FUNCTION REGISTERS
 81#
 82# The following optional special function register names are defined:
 83#   - suffix '<' is used to define an immutable persistent value that contains the maximum value
 84#     of the respective register.
 85#   - suffix '>' is like above, used to define the minimum value of the respective register.
 86#   - suffix '=' is like above, used to define the default value of the respective register.
 87#   - prefix '*' is reserved for raw memory access (to be defined later).
 88# Examples:
 89#   - register name "system.parameter"
 90#   - maximum value is contained in the register named "system.parameter<" (optional)
 91#   - minimum value is contained in the register named "system.parameter>" (optional)
 92#   - default value is contained in the register named "system.parameter=" (optional)
 93#
 94# The type and dimensionality of the special function registers containing the minimum, maximum, and the default
 95# value of a register shall be the same as those of the register they relate to.
 96#
 97# If a written value exceeds the minimum/maximum specified by the respective special function registers,
 98# the server may either adjust the value automatically, or to retain the old value, depending on which behavior
 99# suits the objectives of the application better.
100# The values of registers containing non-scalar numerical entities should be compared elementwise.
101#
102#
103#   STANDARD REGISTERS
104#
105# The following table specifies the register name patterns that are reserved by the specification for
106# common functions. These conventions are not mandatory to follow, but implementers are recommended to adhere because
107# they enable enhanced introspection capabilities and simplify device configuration and diagnostics.
108#
109#   REGISTER NAME PATTERN                               TYPE            FLAGS                   RECOMMENDED DEFAULT
110# =====================================================================================================================
111#
112#   uavcan.node.id                                      natural16[1]    mutable, persistent     65535 (unset/PnP)
113#
114# Contains the node-ID of the local node. Values above the maximum valid node-ID for the current transport
115# indicate that the node-ID is not set; if plug-and-play is supported, it will be used by the node to obtain an
116# automatic node-ID. Invalid values other than 65535 should be avoided for consistency.
117#
118# ---------------------------------------------------------------------------------------------------------------------
119#
120#   uavcan.node.description                             string          mutable, persistent     (empty)
121#
122# User/integrator-defined, human-readable description of this specific node.
123# This is intended for use by a system integrator and should not be set by the manufacturer of a component.
124# For example: on a quad-rotor drone this might read "motor 2" for one of the ESC nodes.
125#
126# ---------------------------------------------------------------------------------------------------------------------
127#
128#   uavcan.pub.PORT_NAME.id                             natural16[1]    mutable, persistent     65535 (unset, invalid)
129#   uavcan.sub.PORT_NAME.id                             ditto           ditto                   ditto
130#   uavcan.cln.PORT_NAME.id                             ditto           ditto                   ditto
131#   uavcan.srv.PORT_NAME.id                             ditto           ditto                   ditto
132#
133# Publication/subscription/client/server port-ID, respectively. These registers are configured by the system integrator
134# or an autoconfiguration authority when the node is first connected to a network.
135#
136# The "PORT_NAME" defines the human-friendly name of the port, which is related to the corresponding function
137# or a network service supported by the node. The name shall match the following POSIX ERE expression:
138#
139#   [a-zA-Z_][a-zA-Z0-9_.]*
140#
141# The names are defined by the vendor of the node. The user/integrator is expected to understand their meaning and
142# relation to the functional capabilities of the node by reading the technical documentation provided by the vendor.
143#
144# A port whose port-ID register is unset (invalid value) remains inactive (unused); the corresponding function may
145# be disabled. For example, a register named "uavcan.pub.measurement.id" defines the subject-ID of a measurement
146# published by this node; if the register contains an invalid value (above the maximum valid subject-ID),
147# said measurement is not published.
148#
149# The same name is used in other similar registers defined below. Network introspection and autoconfiguration tools
150# will expect to find a register of this form for every configurable port supported by the node.
151#
152# ---------------------------------------------------------------------------------------------------------------------
153#
154#   uavcan.pub.PORT_NAME.type                           string          immutable, persistent   N/A
155#   uavcan.sub.PORT_NAME.type                           ditto           ditto                   ditto
156#   uavcan.cln.PORT_NAME.type                           ditto           ditto                   ditto
157#   uavcan.srv.PORT_NAME.type                           ditto           ditto                   ditto
158#
159# Publication/subscription/client/server full data type name and dot-separated version numbers, respectively.
160# These registers are set by the vendor once and typically they are to remain unchanged (hence "immutable").
161# The "PORT_NAME" defines the human-friendly name of the port as specified above.
162# For example, a register named "uavcan.pub.measurement.type" may contain "uavcan.si.sample.angle.Quaternion.1.0".
163#
164# ---------------------------------------------------------------------------------------------------------------------
165#
166#   uavcan.diagnostic.*
167#
168# Prefix reserved for future use.
169#
170# ---------------------------------------------------------------------------------------------------------------------
171#
172#   uavcan.can.bitrate                                  natural32[2]    implementation-defined  implementation-defined
173#   uavcan.can.iface                                    string          mutable, persistent     implementation-defined
174#
175# These registers are only relevant for nodes that support Cyphal/CAN.
176#
177# uavcan.can.bitrate defines the CAN bus bit rate: the first value is the arbitration bit rate, the second is the
178# data phase bit rate. Nodes that support only Classic CAN should ignore the second value. Nodes that support CAN FD
179# should initialize in the Classic CAN mode (MTU 8 bytes, BRS flag not set) if the values are equal. If CAN bitrate
180# is not configurable or is always auto-detected, this register may be omitted or made immutable; otherwise it should
181# be mutable and persistent.
182#
183# uavcan.can.iface is only relevant for software nodes or nodes that are capable of using different CAN interfaces.
184# The value is a space-separated list of CAN interface names to use. The name format is implementation-defined
185# (for example, "can0").
186#
187# ---------------------------------------------------------------------------------------------------------------------
188#
189#   uavcan.udp.*
190#
191# Prefix reserved for future use.
192#
193# ---------------------------------------------------------------------------------------------------------------------#
194#
195#   uavcan.serial.*
196#
197# Prefix reserved for future use.
198#
199# ---------------------------------------------------------------------------------------------------------------------
200
201Name.1.0 name
202# The name of the accessed register. Shall not be empty.
203# Use the List service to obtain the list of registers on the node.
204
205Value.1.0 value
206# Value to be written. Empty if no write is required.
207
208@sealed
209
210---
211
212uavcan.time.SynchronizedTimestamp.1.0 timestamp
213# The moment of time when the register was read (not written).
214# Zero if the server does not support timestamping.
215
216bool mutable
217# Mutable means that the register can be written using this service.
218# Immutable registers cannot be written, but that doesn't imply that their values are constant (unchanging).
219
220bool persistent
221# Persistence means that the register retains its value permanently across power cycles or any other changes
222# in the state of the server, until it is explicitly overwritten (either via Cyphal, any other interface,
223# or by the device itself).
224#
225# The server is recommended to manage persistence automatically by committing changed register values to a
226# non-volatile storage automatically as necessary. If automatic persistence management is not implemented, it
227# can be controlled manually via the standard service uavcan.node.ExecuteCommand. The same service can be used
228# to return the configuration to a factory-default state. Please refer to its definition for more information.
229#
230# Consider the following examples:
231#   - Configuration parameters are usually both mutable and persistent.
232#   - Diagnostic values are usually immutable and non-persisient.
233#   - Registers that trigger an activity when written are typically mutable but non-persisient.
234#   - Registers that contain factory-programmed values such as calibration coefficients that can't
235#     be changed are typically immutable but persistent.
236
237void6
238
239Value.1.0 value
240# The value of the register when it was read (beware of race conditions).
241# Registers never change their type and dimensionality while the node is running.
242# Empty value means that the register does not exist (in this case the flags should be cleared/ignored).
243# By comparing the returned value against the write request the caller can determine whether the register
244# was written successfully, unless write was not requested.
245# An empty value shall never be returned for an existing register.
246
247@sealed

Transports

Cyphal/CAN

A single or doubly-redundant CAN bus interface is available in some hardware models. The primary interface is labeled CAN0 and the redundant, if available, is labeled CAN1.

Important

Firmware revisions prior to v1.3 do not support CAN FD; only Classic CAN is supported. Do not attempt to use CAN FD with these firmware revisions.

The value of register uavcan.can.count reflects the number of CAN interfaces that are actually used in the application. If a redundant CAN interface is available but only one is used, the used interface shall be strictly CAN0, and the count register shall be set to 1, thereby disabling CAN1. If set to zero, the device will no longer be possible to contact via Cyphal/CAN.

The CAN bitrates are configured via register uavcan.can.bitrate, where the first value sets the arbitration phase bitrate and the second value sets the data phase bitrate. If the configured bitrate is not supported, the device will automatically revert to the default value, which is 1 Mbps for both arbitration and identification phases (i.e., BRS disabled).

The CAN MTU is set via uavcan.can.mtu; the only valid values are 8 and 64 bytes. Setting MTU to 8 bytes and both arbitration and data phase bitrates to the same value will disable CAN FD and select Classic CAN instead, which enables compatibility with legacy CAN networks. The Classic CAN compatibility is enabled by default to simplify deployment; the CAN FD support needs to be enabled explicitly if necessary.

The device does not support automatic CAN configuration detection. The factory-default CAN parameters are as follows: 1 Mbps for both arbitration and data phase bitrates, MTU 8 bytes, Classic CAN mode.

The device automatically recovers from the bus-off and error-passive states following the CAN bus specification.

For the CAN hardware specifications, please refer to your product documentation.

“On CAN bus topology and termination” provides recommendations on the usage of CAN bus in relevant applications.

CAN bus LED indicators

Devices equipped with CAN bus interfaces may contain two LED indicators per CAN interface, labeled RX and TX.

While the CAN controller resides in the error-active state[1], the RX LED illuminates briefly upon successful receipt of a valid CAN frame accepted by the hardware filters; similarly, a TX LED illuminates briefly when the device successfully transmits a CAN frame with acknowledgement.

In the error-passive state, the TX LED blinks rapidly continuously, while the RX LED continues to operate normally. This choice reflects the fact that in the error-passive state the device can only receive CAN frames, but cannot transmit them.

In the bus-off state, both RX and TX indicators blink rapidly. This choice reflects the fact that in the bus-off state the device cannot transmit or receive CAN frames.

Cyphal/UDP via SPE 10BASE-T1S

Please contact Zubax Robotics.