Type to use in registers

Sorry for my approach as beginner; we are working on a project for a professional weather station migrating from a previous implementation I2C based
https://github.com/r-map/rmap .
I am not sure how use registers in applications.
I have defined some simple registers
Cyphal-demos/public_regulated_data_types/reg/rmap/metadata at main · r-map/Cyphal-demos · GitHub
and I am trying to use them in a derivated demo application
Cyphal-demos/main.c at main · r-map/Cyphal-demos · GitHub

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.

To get a better feel of registers, consider using Yakut with the register manipulation commands. See its README, section “Working with registers” and then “Node configuration example”.

It helps to picture registers as either configuration parameters or performance counters.

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.

Thanks for any suggestions

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.