Support for loading multiple configurations as addons - #762
Support for loading multiple configurations as addons#762SebSparrowHawk wants to merge 2 commits into
Conversation
2fc4794 to
9d1ae02
Compare
66f5af6 to
a8c244a
Compare
a8c244a to
51d36b1
Compare
| "global": { | ||
| "asil-level": "B", | ||
| "applicationID": 1234, | ||
| "queue-size": { | ||
| "QM-receiver": 8, | ||
| "B-receiver": 5, | ||
| "B-sender": 12 | ||
| }, | ||
| "shm-size-calc-mode": "SIMULATION" | ||
| }, | ||
| "tracing": { | ||
| "enable": true, | ||
| "applicationInstanceID": "ara_com_example", | ||
| "traceFilterConfigPath": "./mw_com_trace_filter.json" | ||
| } |
There was a problem hiding this comment.
These are parts of the "AddOn" configuration that we should not allow IMHO. A library provider cannot know global values!
| /// \brief flag, to identify if an add-on configuration has already been loaded, which has been handled as the | ||
| /// initial configuration. Used to identify that such a configuration has been loaded before the user explicitly | ||
| /// loaded a configuration. | ||
| static bool addon_configuration_loaded_; |
There was a problem hiding this comment.
I would not do that. IMHO we should never load an "AddOn" configuration as initial configuration. This can only lead to problems.
I would clearly state, that AddOn configurations can only be loaded after mw::com was correctly initalized.
Or we make it completly interexchangeable, but then we should not use this variable.
| #include <score/assert.hpp> | ||
| #include <score/utility.hpp> | ||
|
|
||
| #include <exception> |
There was a problem hiding this comment.
Why is this include required?
|
|
||
| std::vector<InstanceIdentifier> Runtime::resolve(const InstanceSpecifier& specifier) const | ||
| { | ||
| std::lock_guard<std::mutex> lock{configuration_mutex_}; |
There was a problem hiding this comment.
So you added here locks for what reason? To ensure that we have no race condition of using the configuration while extending it?
How would we handle configuration usages from e.g. Proxy / Skeleton creations.
No description provided.