I have been asked recently @ddiez about the difference between variable
and parameter
inside the RML. I believe I got asked by someone else. The truth it is that I am not 100% sure.
From my understanding, a parameter
is something that is directly connected with the data member at the respective class. And a variable
is something that can be used to define a number/expression that can be reused later on in the RML.
In other words, the parameter parName
will be identified with the class member fParName
.
On top of that, any definitions at <globals>
will be transferred to any other sections. I.e. if I define a <parameter ...>
at globals, this parameter will be placed at any other metadata class or process, if the corresponding metadata member does not exist in the corresponding class, it will just be ignored.
I guess the same applies to variable
defined at globals, they are transported to any class.
Then, a parameter can be inserted at it RML section as a field. I.e. instead of doing:
<TRestXX>
<parameter name="parName" value="XX" />
</TRestXX>
we are allowed to do:
<TRestXX parName="XX" />
There are any other remarks or comments about this @nkx?
Tx!