[Template Processing] Risk of using wrong default value when a property is not set in the model
In the tool distribution you have a file named iv_custom_attributes.xml
listing the attributes of functions and interfaces. For example "stack_size" with a default value.
However this file is overwritten when installing the tool with the one we provide in taste (default_attributes.xml)
Space Creator properly use the default_attributes.xml file in the GUI
But it seems that the templating engine (CLI tool --aadlconverter) always use iv_custom_attributes.xml
The concrete consequence:
If an interface view lacks an attribute (e.g. stack size), the default value will be taken from the wrong file - and therefore may be wrong.
For example stack_size has a default value of 50 in your file, and 1024 in the one from TASTE
Proposed resolution: I think the following has to be fixed in libs/ivcore/ivpropertytemplateconfig.cpp
:
const static QString kUserAttrsResourceConfigPath = QLatin1String(":/defaults/resources/iv_custom_attributes.xml");
QString IVPropertyTemplateConfig::userAttrsResourceConfigPath() const
{
return kUserAttrsResourceConfigPath;
}