Responsibility for unique controller IDs
Currently if you want to assign an entity to a controller the unique controller_id is required. This Id is retrieved from the IControllerConfig. The ControllerCreator of the openScenarioEngine has a counter for controller ids, which increments it accordingly for each new controller.
The issue we encounter is the separation of responsibilities regarding controller creation (mantleAPI) and unique ids of controllers (openScenarioEngine).
In our use case we want to additionally create controllers directly in openPASS regardless of the scenarioEngine. But this could lead to conflicting ids, because the unique counter is not handled centralised in the environment (mantleAPI). Therefore I was wondering, if should create a IControllerRepository which is responsible for the ID.
Another issue I encountered is the void return statement of CreateController(). In most of our use cases we create an entity and a controller at the same time. And afterwards we want to add the entity to the controller. But currently we have no way of knowing the controller_id after creation. Therefore I was thinking about returning either the controller or the controller id upon creation. (Note: Within the scenarioEngine this is currently not an issue since it currently holds the counter for controller ids)