Open
Description
I went through the Read Only Parameters PR #495 and I experimented a little with Parameters validation via set_on_parameters_set_callback
.
I think that there are 2 important features missing:
- In some cases
READ_ONLY
is too restrictive. The following use-cases should be also possible: a parameter can be modified, but it can't be deleted; a parameter can be modified only by the node that declared it. - Currently it's possible to change the type of a parameter. To me this looks something that should be enabled only in particular cases, while the default behavior is that if a node declares a parameter to be
bool
I can't set it to a string or something else.
Both these things can be already done with a custom callback in set_on_parameters_set_callback
, but it's quite verbose and not well documented.
Do you agree that these features should be present?
In case, should they be part of the ParameterDescriptor
? I was reading about creating a custom structure for parameter constraints, but I haven't found a conclusion.