The goal is to emulate a I2C, SPI or UART interface on the host. The idea is that this is useful in the development stage of a system by allowing to extend and test already known and supported sensors in the (UAV) system. As the sensor usage matures and proves itself to the system integrator, a node shall dedicate itself to that sensor by implementing the related messages.
From reading the docs, here is how I see this implementation.
The emulation driver on the host (master) can use uavcan.register API to configure the I2C, SPI or UART by modifying “registers” such a “baudrate”.
The available i2c devices or SPI chip selects can be seen with the uavcan.file API
Reading and modification of the remote SPI or I2C device can be done by uavcan.file.Read and uavcan.file.Modify API.
UART is somewhat different as it is an asynchronous interface, It would hence need a subject id with which any data received on the uart can be published. Writing to the UART by the host may require some specific service implementation.
This is all just early thought process as I start to read the docs. Any pointing in the right direction is much appreciated.
PS. “uavcan.primitive.Unstructured” is the datatype. What would be the subject ID / service ID? Does this use case require the creation of new ID’s?