Skip to content

feat(core): set parameters with config slot

Description

This extends the multi_config_controller by allowing to specify parameters that can be passed to the launched config. These parameters can be set by calling the set_config slot. The key and the value of the set_config will be used, as if we declared a <parameter replace="[key]" by="[value]" />, with "[key]" and "[value]" the one from the set_config call

ex:

<service uid="nnConfigLauncher" type="sight::app::multi_config_controller">
  <appConfig key="organs" default="liver">
    <config name="liver" id="licorne::config::filter::liverNNConfig" />
    <config name="kidney" id="licorne::config::filter::kidneyNNConfig" />
    <config name="fetus" id="licorne::config::filter::noNNConfig" />
  </appConfig>
  <parameter replace="WID_PARENT" by="sceneCfg" />
  ...
</service

If set_config(_val="human", _key="model_key") is called, then when a "liver" or "kidney" configuration is launched, it will have WID_PARENT=sceneCfg AND model_key=human as parameters.

How to test it?

You need to use an application that use the above code

Edited by Didier WECKMANN

Merge request reports