Is not clear to me witch type I have to use for registers; now I use uavcan.register.Value.1.0 that is a union (is the union more memory expensive than a simple integer ?)
Can I use any type for registers or I have to use uavcan.register.Value.1.0 only?
Thanks in advance
These are not registers but data types. Wrong link?
A register cannot be a union. It may be any of: array of [u]int{8,16,32,64}, array of float{16,32,64}, array of bool, string, or bytes. All possible types for a register are defined in uavcan.register.Value. It is not possible to define a register of any other type.
Thanks a lot for your response Pavel,
my question was written with a lot of confusion…
OK, now is clear and our demo works as expected with yacut using our defined registers, pub/subscribe and services starting from DSDL.
We are going to evaluate how to use plug and play and all the Cyphal specifications in our project.
We have one master board that will manage GSM communication, data storage and works as orchestrator. Other (slave) board have sensors connected (sample time 0.25 / 3 sec); every 15 minutes elaborate some statistical elaboration of data (mean, max, min …), collected by master that compose a report (a collect of statistical elaboration of data synchronized in time).
We are evaluating pros and cons using some register to drive the plug and play process (we can have two or more identical boards making the same measure with only some different metadata) following this process:
write slave register with metada unatantum (in the factory)
on master launch a PnP node-ID allocator and assign all node-IDs
on master read slave register with metada
master assign subject-IDs and service-IDs linked to metadata
sync time in the network
start to measure by commands
collect data on the master board every 15 minutes by subscribe or services.
That sounds okay but I wouldn’t rely on PnP in a production setting too much. If possible, consider static allocation as it would remove some complexity and variability from your system.