The uavcan.can.iface standard register specifies a key where you can change can interface to be used.
# REGISTER NAME PATTERN TYPE FLAGS RECOMMENDED DEFAULT
# uavcan.can.iface string mutable, persistent implementation-defined
# uavcan.can.iface is only relevant for software nodes or nodes that are capable of using different CAN interfaces.
# The value is a space-separated list of CAN interface names to use. The name format is implementation-defined
# (for example, "can0").
However the user cannot derive which CAN interfaces are available, in the worst case this would yield a misconfiguration and the node will not be available anymore on the bus.
To solve this I have two potential solutions:
- Create a new standard register e.g.
uavcan.can.ifaces which is not mutable (i.e. read-only) and exposes a list of available interfaces.
- Change the data type of
uavcan.can.iface from string to a bool array i.e. bool[n] where n indicates the number of CAN interfaces and bool[0] correspond to can0 etc, then user can then easily select one or more CAN interfaces to use and this minimize the memory footprint to implement this features as well.
The
uavcan.can.ifacestandard register specifies a key where you can change can interface to be used.However the user cannot derive which CAN interfaces are available, in the worst case this would yield a misconfiguration and the node will not be available anymore on the bus.
To solve this I have two potential solutions:
uavcan.can.ifaceswhich is not mutable (i.e. read-only) and exposes a list of available interfaces.uavcan.can.ifacefrom string to a bool array i.e.bool[n]wherenindicates the number of CAN interfaces andbool[0]correspond tocan0etc, then user can then easily select one or more CAN interfaces to use and this minimize the memory footprint to implement this features as well.